Skip to main content

A SOCKS proxy that aggregates multiple remote SOCKS proxies

Project description

MultiSocks

A SOCKS proxy that aggregates multiple remote SOCKS proxies, distributing traffic across them to increase overall bandwidth.

What MultiSocks Can Do

  • Connection Distribution: Routes different TCP connections through different proxies using a round-robin or weighted load balancing approach
  • Increased Total Bandwidth: Improves overall throughput for applications that make multiple concurrent connections
  • Automatic Proxy Management: Handles failed or slow proxies by routing around them
  • Dynamic Optimization: Automatically adjusts how many proxies to use based on your bandwidth needs
  • Protocol Support: Works with SOCKS4, SOCKS4a, SOCKS5, and SOCKS5h protocols
  • Detailed Logging: Provides visibility into proxy performance and connection routing

What MultiSocks Cannot Do

  • True Channel Bonding: Cannot split a single TCP connection across multiple proxies (single-connection speeds won't increase)
  • UDP Bonding: Does not currently support UDP traffic distribution
  • Transport Layer Bonding: Doesn't combine connections at the packet level like MPTCP or VPN bonding solutions
  • Custom Protocols: Only works with applications that support SOCKS proxy configuration

Ideal Use Cases

MultiSocks works best with:

  • Web browsers (which open many connections to different resources)
  • Download managers that support multiple connections
  • Applications that establish multiple TCP connections
  • Scenarios where anonymity through multiple exit points is desired

Features

  • Supports multiple remote SOCKS proxies
  • Round-robin or weighted load balancing
  • Automatic handling of failed or slow proxies
  • Support for SOCKS4, SOCKS4a, SOCKS5, and SOCKS5h protocols
  • Detailed logging
  • Load proxies from command line or text file
  • Auto-optimization to dynamically adjust proxy usage based on bandwidth

Installation

From PyPI

pip install multisocks

From Source

git clone https://github.com/tboy1337/multisocks.git
cd multisocks
pip install -r requirements.txt

Usage

# Show help
multisocks --help

# Show version
multisocks --version

# Start the proxy server with multiple remote proxies specified on the command line
multisocks start --port 1080 --proxies socks5://user:pass@proxy1.example.com:1080/10 socks5h://proxy2.example.com:1080/5

# Start the proxy server with proxies loaded from a text file
multisocks start --port 1080 --proxy-file proxies.txt

# Start with auto-optimization (automatically adjusts how many proxies to use based on your connection speed)
multisocks start --port 1080 --proxy-file proxies.txt --auto-optimize

Proxy Format

Proxies are specified in the format: protocol://[username:password@]hostname:port[/weight]

  • protocol: Either socks4, socks4a, socks5, or socks5h
  • username:password: Optional authentication for SOCKS5/SOCKS5h
  • hostname: The proxy server hostname or IP address
  • port: The proxy server port
  • weight: Optional priority weight (default: 1)

Protocol Information

  • socks4: Basic SOCKS4 protocol with IP addresses only
  • socks4a: Extended SOCKS4 with hostname resolution on the proxy server
  • socks5: SOCKS5 protocol with hostname resolution on the client
  • socks5h: SOCKS5 protocol with hostname resolution on the proxy server (useful for avoiding DNS leaks)

Proxy File Format

You can specify proxies in a text file, with one proxy per line:

# This is a comment
socks5://user:pass@proxy1.example.com:1080/10
socks5h://proxy2.example.com:1080/5
socks4://proxy3.example.com:1080
  • Empty lines are ignored
  • Lines starting with # are treated as comments and ignored

Auto-Optimization

When enabled with the --auto-optimize flag, MultiSocks will:

  1. Measure your direct connection speed
  2. Test the speed of your proxies
  3. Automatically determine how many proxies to use to saturate your connection
  4. Periodically adjust the active proxy count based on network conditions

This feature is especially useful when:

  • You have a large list of proxies but don't want to manually configure how many to use
  • Your internet connection speed varies throughout the day
  • You want to maximize your connection bandwidth without manual tuning

Auto-optimization is re-evaluated every 10 minutes to adjust to changing network conditions.

Development

Setup Development Environment

git clone https://github.com/tboy1337/multisocks.git
cd multisocks
pip install -r requirements.txt

Run Tests

python -m unittest discover tests

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

multisocks-1.0.4.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

multisocks-1.0.4-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file multisocks-1.0.4.tar.gz.

File metadata

  • Download URL: multisocks-1.0.4.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for multisocks-1.0.4.tar.gz
Algorithm Hash digest
SHA256 e52df5f5bc176b92bf89533488da56b9a3ba22226169a8a5d1f13df1f08bda4f
MD5 49a3e5cc5a97763d2982e05fe024ce0a
BLAKE2b-256 b6a724edd75365d0bee7d9b1ada501aaba6fb47e41804e89e8b9d705e8983ee2

See more details on using hashes here.

File details

Details for the file multisocks-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: multisocks-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for multisocks-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 040eb231179fa26a206fa96932d1f6d1b948dd979b89a09bc7131d2fc1f3591d
MD5 72bfe35b3256c7ffe7d3fddd147d55b9
BLAKE2b-256 3dbe0201ee71da335c2bb4866c16a3dd6b447859ad5f41fa67d81f52e17710bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page