A CLI tool for sending and receiving files over TCP, built using Rust and Tokio. This tool allows you to send files to a remote address or receive files from a remote sender.
- Send Files: Transfer files to a specified address.
- Receive Files: Listen for incoming file transfers and save them to a specified directory.
-
Install Rust: Ensure you have Rust installed on your machine. If not, you can install it via rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Clone the Repository:
git clone https://github.com/purushoath02/Transfer.git cd Transfer -
Build the Project:
cargo build --release
This will create an executable in the
target/releasedirectory.
Run the command
./target/release/Transfer receiveYou will get the address of receiver.
To send the file to the receiver, use the following command:
./target/release/Transfer send <file_path> <address>- main.rs: Contains the CLI logic, including argument parsing and handling file sending and receiving modes.
- utils.rs: Contains utility functions for creating connections, sharing files, and receiving files.
- tokio: Asynchronous runtime for Rust.
- clap: Command-line argument parser.
- regex: Regular expressions for filename extraction.
- serde & bincode: For serializing and deserializing file data.