A SOCKS proxy that aggregates multiple remote SOCKS proxies
Project description
MultiSocks
A SOCKS proxy that aggregates multiple remote SOCKS proxies, increasing your bandwidth by distributing traffic across them.
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: Eithersocks4,socks4a,socks5, orsocks5husername:password: Optional authentication for SOCKS5/SOCKS5hhostname: The proxy server hostname or IP addressport: The proxy server portweight: Optional priority weight (default: 1)
Protocol Information
socks4: Basic SOCKS4 protocol with IP addresses onlysocks4a: Extended SOCKS4 with hostname resolution on the proxy serversocks5: SOCKS5 protocol with hostname resolution on the clientsocks5h: 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:
- Measure your direct connection speed
- Test the speed of your proxies
- Automatically determine how many proxies to use to saturate your connection
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multisocks-1.0.3.tar.gz.
File metadata
- Download URL: multisocks-1.0.3.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
906c9cb8113a2082ff655220a0a1d781d41194a86f6b68ad9d82fc2d9b6be2a3
|
|
| MD5 |
588e6888490b8d6f06af699396c6e9e4
|
|
| BLAKE2b-256 |
6e95b1446b372c76239c8d0db5cca3b3e59c23506b52ce5ead4fca5e7efd15d6
|
File details
Details for the file multisocks-1.0.3-py3-none-any.whl.
File metadata
- Download URL: multisocks-1.0.3-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdc0753e46d50a5574f33278b7513040b1c10ac1fbd22cd7ee09bfde656946bf
|
|
| MD5 |
e830f55d31fca68d4a6c491a2a194e1c
|
|
| BLAKE2b-256 |
156c29e8185f1e701f6e8fb11ec0bea9552dce546864a4d7cdc153525c41fe7e
|