Awesome Open Source
Awesome Open Source

Go dispatch proxy

A SOCKS5 load balancing proxy to combine multiple internet connections into one. Works on Windows and Linux. Reported to work on macOS. Written in pure Go with no additional dependencies.

It can also be used as a transparent proxy to load balance multiple SSH tunnels.


The idea for this project came from dispatch-proxy which is written in NodeJS. NodeJS is not entirely disk friendly considering the multitude of files it creates even for very simple programs. I needed something light & portable, preferably a single binary without polluting the entire drive.


No installation required. Grab the latest binary for your platform from the CI server or from releases and start speeding up your internet connection!

Build status


The example below are shown on Windows. The steps are similar for other platforms.

1 - Load balance connections

The primary purpose of the tool is to combine multiple internet connections into one. For this we need to know the IP addresses of the interface we wish to combine. You can obtain the IP addresses using the ipconfig (ifconfig on linux) command. Alternatively run go-dispatch-proxy -list.

D:\>go-dispatch-proxy.exe -list
--- Listing the available adresses for dispatching
[+] Mobile Broadband Connection , IPv4:
[+] Local Area Connection, IPv4:

Start go-dispatch-proxy specifying the IP addresses of the load balancers obtained in the previous step. Optionally, along with the IP address you may also provide the contention ratio(after the @ symbol). If no contention ratio is specified, it's assumed as 1.

2 - Load balance SSH tunnels

The tool can load balance multiple SSH tunnels. See Example 3 for usage.

Example 1

SOCKS proxy running on localhost at default port. Contention ratio is specified.

D:\>go-dispatch-proxy.exe [email protected] [email protected]
[INFO] Load balancer 1:, contention ratio: 3
[INFO] Load balancer 2:, contention ratio: 2
[INFO] SOCKS server started at

Example 2

SOCKS proxy running on a different interface at a custom port. Contention ratio is not specified.

D:\>go-dispatch-proxy.exe -lhost -lport 5566
[INFO] Load balancer 1:, contention ratio: 1
[INFO] Load balancer 2:, contention ratio: 1
[INFO] SOCKS server started at

Out of 5 consecutive connections, the first 3 are routed to and the remaining 2 to The SOCKS server is started by default on It can be changed using the -lhost and lport directive.

Now change the proxy settings of your browser, download manager etc to point to the above address (eg Be sure to add this as a SOCKS v5 proxy and NOT as a HTTP/S proxy.

Example 3

The tool can be used to load balance multiple SSH tunnels. In this mode, go-dispatch-proxy acts as a transparent load balancing proxy.

First, setup the tunnels.

D:\> ssh -D [email protected]
D:\> ssh -D [email protected]

Here we are setting up two SSH tunnels to remote hosts, and on local ports 7777 and 7778 respectively. The IP address ( if omitted defaults to localhost. The -D option stands for dynamic port forwarding.

Next, launch go-dispatch-proxy using the -tunnel argument.

D:\> go-dispatch-proxy.exe -tunnel

Both the IP and port must be mentioned while specifying the load balancer addresses.

Optionally, the listening host, port and contention ratio can also be specified like in example 2.

D:\> go-dispatch-proxy.exe -lport 5555 -tunnel[email protected][email protected]

The lport if not specified defaults to 8080. This is the port where you need to point your web browser, download manager etc. Be sure to add this as a SOCKS v5 proxy.

Full Linux Support [NEW]

Go-dispatch-proxy now supports Linux in both normal mode and tunnel mode. On Linux normal mode, Go-dispatch-proxy uses the SO_BINDTODEVICE syscall to bind to the interface corresponding to the load balancer IPs. As a result, the binary must be run with root privilege or by giving it the necessary capabilities as shown below.

$ sudo ./go-dispatch-proxy

OR (Recommended)

$ sudo setcap cap_net_raw=eip ./go-dispatch-proxy
$ ./go-dispatch-proxy

Tunnel mode doesn't require root privilege.

Compiling (For Development)

Ensure that Go is installed and available on the system path.

$ git clone
$ cd go-dispatch-proxy

# Compile for Windows x86
$ GOOS=windows GOARCH=386 go build

# Compile for Windows x64
$ GOOS=windows GOARCH=amd64 go build

# Compile for Linux x86
$ GOOS=linux GOARCH=386 go build

# Compile for Linux x64
$ GOOS=linux GOARCH=amd64 go build

# Compile for Macos x64
$ GOOS=darwin GOARCH=amd64 go build


  • dispatch-proxy: A SOCKS5/HTTP load balancing proxy written in NodeJS.


Licensed under MIT

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
go (15,379
golang (3,969
load-balancer (57
socks5-proxy (29
transparent-proxy (21