Skip to content

Aneeshie/ByteBridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ByteBridge

ByteBridge is a straightforward, secure command-line file transfer utility written in Go. It allows you to quickly and safely share files between any two computers—whether they are sitting next to each other on the same WiFi, or on completely different internet connections across the world.


🚀 Quick Start & Installation

You will need Go (version 1.20 or newer) installed on your system.

Compiling the Client (Required)

This is the application you will run on your computer to send or receive files.

git clone https://github.com/Aneeshie/ByteBridge.git
cd ByteBridge/cli
go build -o bytebridge ./cmd/bytebridge

Compiling the Relay Server (Optional)

This is only needed if you want to host your own relay server for sharing files across entirely different internet networks.

cd ../server
go build -o bytebridge-relay ./cmd/bytebridge-relay

📖 Step-by-Step Scenario Guides

Below are the step-by-step procedures for transferring files depending on your network setup.

Scenario A: Completely Different Networks (Over the Internet)

Use this when the sender and receiver are far apart (e.g., Computer A is at Home, Computer B is at an Office or Coffee Shop). Because of firewalls and NATs, you will need to use a public Relay Server to bounce the connection.

Step 1: Set up the Relay Server

You must run the relay on a server with a public IP address (such as an AWS EC2, DigitalOcean Droplet, or Linode VPS). Let's assume your public server's IP is 198.51.100.1 and you are using port 8080.

  1. Upload and run the server application on your VPS:
    ./bytebridge-relay
  2. Note the IP and port it is listening on.

Step 2: Set up the Receiver

The person who wants to download the file will run:

./bytebridge receive --relay 198.51.100.1:8080
  • The terminal will immediately give you a Session ID (e.g., SEND-abc123xyz).
  • Send that Session ID to the person who is sending the file.

Step 3: Set up the Sender

The person who wants to upload the file will run the send command using the provided Session ID:

./bytebridge send --relay 198.51.100.1:8080 <session_id> /path/to/my/file.zip

The file transfer will now begin!

✨ Pro Tip: If you frequently use your own relay server, set it as an environment variable so you don't have to type --relay every time! export BYTEBRIDGE_RELAY=198.51.100.1:8080 Then you can just simply type: ./bytebridge receive and ./bytebridge send <session_id> <file>.


Scenario B: Same Network (LAN / Same Wi-Fi)

Use this when both computers are physically in the same building, connected to the exact same Wi-Fi router. You do NOT need a relay server for this.

Step 1: Setup the Receiver

Find out the local IP address of the receiving computer (e.g., 192.168.1.150). Start the receiver on a specific port (we will use 9000 here):

./bytebridge receive 9000

This computer is now actively listening for a direct peer-to-peer connection.

Step 2: Send the File

On the sending computer, simply point the client to the receiver's local IP address and port:

./bytebridge send 192.168.1.150:9000 /path/to/my/file.zip

The file will be securely transferred over your local network at maximum speed without ever touching the public internet!


Scenario C: Port Forwarding (Direct Internet connection without a Relay)

Use this if Computer A and Computer B are on different networks, but Computer A knows how to log into their router to "Port Forward" a specific port.

Step 1: Configure the Router

On the receiving computer's network, log into the main Router and open a port (e.g., 8000) pointing to the local IP of the receiving machine. Determine your home's Public IP address (e.g. by googling "what is my ip"). Let's say it's 203.0.113.50.

Step 2: Start the Receiver

On the receiving computer, run:

./bytebridge receive 8000

Step 3: Send the File

From the sending computer anywhere in the world, use the receiving network's public IP:

./bytebridge send 203.0.113.50:8000 /path/to/my/file.zip

🛠 Features

  • Zero configuration P2P transfers over Wi-Fi
  • Firewall Punching via the public Relay Architecture
  • Cross-Platform: Compiles to a single binary for Windows, macOS, and Linux
  • Secure Sessions: Simple ID tokens to prevent unauthorized downloads when using the relay

🔮 Roadmap & Upcoming Features

The ByteBridge project is constantly evolving. Here are some of the planned features for future releases:

  • End-to-End Encryption (E2EE): While the relay server securely tunnels traffic, E2EE will guarantee that even the relay server node cannot intercept or read the raw file bytes being transferred.
  • Native UDP Hole Punching (STUN/TURN): Implementing built-in NAT traversal so that users don't need to manually rely on third-party overlay networks like ZeroTier to achieve maximum P2P speeds over the internet.
  • Directory & Folder Support: Currently limited to single files; future updates will automatically stream or archive directories on the fly for seamless folder sharing.
  • Transfer Resumption: If an internet connection drops mid-transfer, ByteBridge will intelligently remember the byte-offset and resume exactly from where it left off instead of restarting from 0%.
  • Multi-Peer Broadcasting: Send a single file to multiple receivers simultaneously.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages