Skip to content

16ratneshkumar/secure_file_transfer_application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Secure File Transfer Application

A high-performance Rust tool designed to transfer files and directories securely over TCP. This project utilizes native-tls for SSL/SSL encryption and indicatif for a real-time visual progress bar.

🚀 Features

  • 🔒 TLS/SSL Encryption: End-to-end encrypted data transmission using native-tls.
  • 🔑 Password Authentication: Mandatory secure authentication (default: 12345) before any data transfer.
  • 📁 Recursive Directory Transfer: Send entire directory structures with nested files effortlessly.
  • 📄 Dynamic Filenames: Preserves original filenames and directory hierarchies on the server side.
  • 📊 Visual Progress Bar: Real-time progress indicator showing bytes sent, ETA, and transfer speed.
  • 🔄 Persistent Client: The client remains running after each transfer for multiple independent uploads.
  • ⚡ Multi-threaded Server: Handles multiple concurrent client connections using standard library threads.

🛠️ Prerequisites

Ensure you have the following installed on your system:

  • Rust (latest stable version)
  • OpenSSL: Required for TLS support (pre-installed on most Linux/macOS; on Windows, use vcpkg or pre-built binaries).

📦 Dependencies

The project relies on:

  • native-tls: Secure SSL/TLS communication.
  • indicatif: Visual progress bars and counters.
  • walkdir: Recursive directory traversal.
  • rpassword: Secure, masked password entry.

🏃 Getting Started

  1. Generate a Certificate: Run the provided PowerShell script in the project root to generate the required identity.p12 file:

    .\generate_cert.ps1
  2. Start the Server:

    cargo run --bin server
  3. Run the Client:

    cargo run --bin client

📊 Sample Output

Client View:

Secure File Transfer Client Started.
Enter transfer password: *****

Enter the Absolute path of the file or directory to send (or type 'exit' to quit):
C:\Users\user\Documents\ProjectFiles
Connected to server. Sending 5 files...
✔ [00:00:04] [########################################] 12.45 MiB/12.45 MiB (0s)
All files sent
Server response: All files received successfully.

⚙️ Configuration

The default port and password can be modified in src/bin/server.rs:

const AUTH_PASSWORD: &str = "12345";
// ...
let listener = TcpListener::bind("127.0.0.1:8080")?;

📝 Future Improvements

  • Custom Port Flags: Allow setting port and address via CLI arguments.
  • Compression: Implement Gzip/Zstd compression for faster transfers.
  • GUI Interface: Build a graphical user interface for easier file selection.

📄 License

This project is open-source and available under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

 
 
 

Contributors