All Projects → extremecoders-re → Go Dispatch Proxy

extremecoders-re / Go Dispatch Proxy

Licence: mit
SOCKS5/Transparent load balancing proxy developed in Go, combines multiple internet connections

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Go Dispatch Proxy

Gsnova
Private proxy solution & network troubleshooting tool.
Stars: ✭ 509 (+1083.72%)
Mutual labels:  transparent-proxy
Fabio
Consul Load-Balancing made simple
Stars: ✭ 6,834 (+15793.02%)
Mutual labels:  load-balancer
Traefik
The Cloud Native Application Proxy
Stars: ✭ 36,089 (+83827.91%)
Mutual labels:  load-balancer
Linkerd Tcp
A TCP/TLS load balancer for Linkerd 1.x.
Stars: ✭ 516 (+1100%)
Mutual labels:  load-balancer
Porterlb
Bare Metal Load-balancer for Kubernetes Cluster
Stars: ✭ 671 (+1460.47%)
Mutual labels:  load-balancer
Haproxy Confd
HAProxy combined with confd for HTTP load balancing with SSL offloading
Stars: ✭ 7 (-83.72%)
Mutual labels:  load-balancer
Bfe
A modern layer 7 load balancer from baidu
Stars: ✭ 5,185 (+11958.14%)
Mutual labels:  load-balancer
Terraform
Share Terraform best practices and custom modules with the community
Stars: ✭ 39 (-9.3%)
Mutual labels:  load-balancer
Inlets Operator
Add public LoadBalancers to your local Kubernetes clusters
Stars: ✭ 795 (+1748.84%)
Mutual labels:  load-balancer
Kanary
Kubernetes Operator to manage canary deployment using HAProxy
Stars: ✭ 14 (-67.44%)
Mutual labels:  load-balancer
Roadrunner
🤯 High-performance PHP application server, load-balancer and process manager written in Golang
Stars: ✭ 6,122 (+14137.21%)
Mutual labels:  load-balancer
Multitor
Create multiple TOR instances with a load-balancing.
Stars: ✭ 624 (+1351.16%)
Mutual labels:  load-balancer
Sample Camel Spring Boot
three samples in different branches that illustrates usage of apache camel as microservice framework providing integration with consul, hystrix, ribbon and other tools
Stars: ✭ 24 (-44.19%)
Mutual labels:  load-balancer
Kalitorify
Transparent proxy through Tor for Kali Linux OS
Stars: ✭ 513 (+1093.02%)
Mutual labels:  transparent-proxy
Pm2
Node.js Production Process Manager with a built-in Load Balancer.
Stars: ✭ 36,126 (+83913.95%)
Mutual labels:  load-balancer
Lazy Balancer
nginx for balancer web ui
Stars: ✭ 499 (+1060.47%)
Mutual labels:  load-balancer
F5 Openstack Lbaasv1
OpenStack Neutron LBaaSv1 plugin and agent to control F5 BIG-IP devices
Stars: ✭ 6 (-86.05%)
Mutual labels:  load-balancer
Synchrotron
Caching layer load balancer.
Stars: ✭ 42 (-2.33%)
Mutual labels:  load-balancer
Citadelcore
Cross platform filtering HTTP/S proxy based on .NET Standard 2.0.
Stars: ✭ 28 (-34.88%)
Mutual labels:  transparent-proxy
Nginx Tutorial
这是一个 Nginx 极简教程,目的在于帮助新手快速入门 Nginx。
Stars: ✭ 845 (+1865.12%)
Mutual labels:  load-balancer

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.

Rationale

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.

Installation

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

Usage

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:10.81.201.18
[+] Local Area Connection, IPv4:192.168.1.2

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: 10.81.201.18, contention ratio: 3
[INFO] Load balancer 2: 192.168.1.2, contention ratio: 2
[INFO] SOCKS server started at 127.0.0.1:8080

Example 2

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

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

Out of 5 consecutive connections, the first 3 are routed to 10.81.201.18 and the remaining 2 to 192.168.1.2. The SOCKS server is started by default on 127.0.0.1:8080. 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 127.0.0.1:8080). 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 127.0.0.1:7777 [email protected]
D:\> ssh -D 127.0.0.1:7778 [email protected]

Here we are setting up two SSH tunnels to remote hosts 192.168.1.100, and 192.168.1.101 on local ports 7777 and 7778 respectively. The IP address (127.0.0.1) 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 127.0.0.1:7777 127.0.0.1:7778

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 127.0.0.1:[email protected] 127.0.0.1:[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 https://github.com/extremecoders-re/go-dispatch-proxy.git
$ 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

Credits

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

License

Licensed under MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].