- Rust Programming Language (version 1.65 or higher)
- Tokio Library (for asynchronous runtime in Rust)
- Clap Library (for command-line argument parsing)
-
Port Forwarding Configuration
If you are using NAT, please configure port forwarding on your router:
TCP Port: 8000 - Ngrok (If your ISP employs CGNat, use Ngrok to expose local servers to the internet)
- Clone the repository:
git clone https://github.com/idevanshu/p2pfiletransferRust.git - Navigate to the project directory:
cd p2pfiletransferRust - Build the project:
cargo build
cargo run -- --mode send -f "/path/to/file_or_folder"
ngrok tcp 8000
To Receive a File or Folder:
cargo run -- --mode receive --address Your_Sender_Ip_Address:8000
cargo run -- --mode send -f "/path/to/file_or_folder"
ngrok tcp 8000
To Receive a File or Folder:
cargo run -- --mode receive --address 0.tcp.ngrok.io:18944
Note: Please replace 0.tcp.ngrok.io:18944 with the actual Ngrok address and port provided in the Ngrok output.