Crates.io | dispatch-proxy |
lib.rs | dispatch-proxy |
version | 0.2.0 |
source | src |
created_at | 2021-07-18 19:32:50.457261 |
updated_at | 2024-04-07 18:55:19.204976 |
description | A SOCKS proxy that balances traffic between network interfaces. |
homepage | |
repository | https://github.com/alexkirsz/dispatch |
max_upload_size | |
id | 424464 |
size | 96,139 |
A SOCKS proxy that balances traffic between network interfaces.
Should work on macOS, Windows, and Linux. Only tested on macOS for now.
This is a Rust rewrite of dispatch-proxy, originally written in CoffeeScript and targeting Node.js.
You can download pre-built binaries for macOS, Windows, and Linux from the releases page.
You'll need Rust version 1.51.0 or later. You can use rustup to install the latest version of the Rust compiler toolchain.
cargo install dispatch-proxy
You often find yourself with multiple unused internet connections—be it 5G mobile hotspot or a free Wi-Fi network—that your system won't let you use alongside your primary one.
For instance, my first student residence used to provide me with cabled and wireless internet accesses. Both were separately capped at a bandwidth 1,200kB/s. My 3G mobile internet access provided me with an additional 400kB/s. Combining all of these with dispatch and a download manager resulted in a 2,800kB/s effective bandwidth!
The possibilities are endless:
$ dispatch
A SOCKS proxy that balances traffic between network interfaces.
Usage: dispatch [OPTIONS] <COMMAND>
Commands:
list Lists all available network interfaces
start Starts the SOCKS proxy server
help Print this message or the help of the given subcommand(s)
Options:
-d, --debug Write debug logs to stdout instead of a file
-h, --help Print help
-V, --version Print version
$ dispatch start -h
Starts the SOCKS proxy server
Usage: dispatch start [OPTIONS] <ADDRESSES>...
Arguments:
<ADDRESSES>... The network interface IP addresses to dispatch to, in the form of <address>[/priority]
Options:
--ip <IP> Which IP to accept connections from [default: 127.0.0.1]
--port <PORT> Which port to listen to for connections [default: 1080]
-h, --help Print help
$ dispatch list
Lists all available network interfaces.
$ dispatch start 10.0.0.0 fdaa:bbcc:ddee:0:1:2:3:4
Dispatch incoming connections to local addresses 10.0.0.0
and fdaa:bbcc:ddee:0:1:2:3:4
.
$ dispatch start 10.0.0.0/7 10.0.0.1/3
Dispatch incoming connections to 10.0.0.0
7 times out of 10 and to 10.0.0.1
3 times out of 10.
Whenever the SOCKS proxy server receives an connection request to an address or domain, it selects one of the provided local addresses using the Weighted Round Robin algorithm. All further connection traffic will then go through the interface corresponding to the selected local address.
Beware: If the requested address or domain resolves to an IPv4 (resp. IPv6) address, an IPv4 (resp. IPv6) local address must be provided.