Skip to content

idevanshu/p2pfiletransferRust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Transfer Application

Overview

This file transfer application, crafted in Rust and powered by the tokio library, facilitates seamless file exchange over TCP connections. Designed to operate in dual modes—send and receive—it ensures efficient and reliable transmission of files. It supports sending and receiving files over TCP connections. The application can operate in two modes: `send` and `receive`.

Prerequisites

Before you start, ensure you have the following installed:
  • 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)

Setup

To set up the project, follow these steps:
  1. Clone the repository: git clone https://github.com/idevanshu/p2pfiletransferRust.git
  2. Navigate to the project directory: cd p2pfiletransferRust
  3. Build the project: cargo build

Example Usage

With Port Forwarding on Port 8000

To Send a File or Folder:
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

With Ngrok

To Send a File or Folder:
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.

About

This sophisticated file transfer application, developed in Rust and leveraging the tokio library, is engineered for seamless file exchange over TCP connections. It features dual operational modes: send and receive, providing a versatile and robust solution for efficient and reliable file transmission.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages