surban / aggligator

Aggregates multiple links (TCP, Bluetooth, USB or similar) into one connection having their combined bandwidth and provides resiliency against failure of individual links.
https://crates.io/crates/aggligator
Other
129 stars 8 forks source link

An option to consider links with different remote IPs as different #5

Closed PaperStrike closed 6 months ago

PaperStrike commented 6 months ago

Thank you for this amazing project!

My use case may be a litte bit different that I have two servers with high intranet bandwidth (~1Gbps) but distinct external IPs and limited internet speeds (2-3Mbps), which is a common case in my country (business bandwith being far more expensive than residential bandwidth, or like upload and download being differentiated and upload speed being far more expensive than download speed, kind of stuff). I would like to self-hosting game servers like Minecraft to play with my friends, RDP to remote control my computer, things that I can kinda control the clients (they trust me). So I found your project, configured one of my server to port forward TCP through intranet to another, and got it working! The bandwidth is combined!

Well I did a little trick (https://github.com/PaperStrike/aggligator/commit/72d77e039def547755e6854c1b01386f1580ddb2) that I modified the code to differentiate remotes by IP instead of remote_user_data, as the server has the same interface for both internet IP and intranet IP. (The servers are from one of the two largest domestic provider, so it can't be unusal.) I am sharing my tricks with you and the others so that we don't always have to pay for a single server with higher bandwidth (Yep somehow one server with higher bandwidth is far more expensive than two server with splitted bandwidth here).

Could it be added as an option?

Also I admit I struggled a bit to get to grips with your tools, especially without a full example to guide me. So, I've included a working example below to hopefully help others.

Example Configuration

Intranet IP Internet IP
Server A 10.0.1.1 30.1.1.1
Server B 10.0.1.2 30.1.1.2

Imagine a Minecraft Server (TCP version) active on Server A at port 7003. Here's how we could combine the bandwidth:

  1. On Server A, run the following command:
    agg-tunnel server --tcp 7001 --port 7003
  2. Set up Server B to redirect TCP traffic from its port 7002 to Server A at 10.0.1.1:7001.
  3. On the gaming clients, run:
    agg-tunnel client --tcp 30.1.1.1:7001 --tcp 30.1.1.2:7002 --port 7003:7010
  4. To connect, launch Minecraft and use the server address 127.0.0.1:7010.

Thank you again for the amazing work!

surban commented 6 months ago

Thanks for reporting this. I have added a corresponding option.