MicroSocks v2 โ SOCKS5 proxy with bandwidth control
1.4K
Here is the full English translation of your document:
MicroSocks v2 is an upgraded version of microsocksโ , integrated with the tc (Traffic Control) tool to directly limit upload and download speeds inside the container.
This solution is ideal when you:
๐ Github:
bibicadotnet/microsocksv2โ
Run the automatic script:
wget -qO microsocks_v2.sh https://go.bibica.net/microsocks_v2 && bash microsocks_v2.sh
The script handles everything automatically. You can rerun the script to create multiple accounts or change the download/upload limits for each account.
Create a compose.yml file:
services:
account1:
image: bibica/microsocks-v2
container_name: account1
restart: always
ports:
- "10001:1080" # Host:Container port
cap_add:
- NET_ADMIN # Required to run tc, modprobe, ip inside the container
environment:
- PORT=1080
- AUTH_ONCE=true
- QUIET=true
- USERNAME=account1
- PASSWORD=account1
- DOWNLOAD_RATE=10Mbps
- UPLOAD_RATE=10Mbps
logging:
driver: "none"
Start the container:
docker compose up -d
Just copy the services section and modify the following:
container_nameUSERNAME, PASSWORDportsDOWNLOAD_RATE, UPLOAD_RATE speedsExample:
account2:
image: bibica/microsocks-v2
container_name: account2
ports:
- "10002:1080"
cap_add:
- NET_ADMIN
environment:
- PORT=1080
- USERNAME=account2
- PASSWORD=account2
- DOWNLOAD_RATE=20Mbps
- UPLOAD_RATE=20Mbps
logging:
driver: "none"
account3:
image: bibica/microsocks-v2
container_name: account3
ports:
- "10003:1080"
cap_add:
- NET_ADMIN
environment:
- PORT=1080
- USERNAME=account3
- PASSWORD=account3
# No bandwidth limit
logging:
driver: "none"
Use curl to test the SOCKS5 proxy (pre-installed in the automated setup):
curl -x socks5h://account1:account1@localhost:10001 http://ifconfig.me
| Variable | Description |
|---|---|
PORT | SOCKS5 listening port (default: 1080) |
USERNAME, PASSWORD | SOCKS5 authentication credentials |
DOWNLOAD_RATE | Download speed limit (e.g., 10Mbps) |
UPLOAD_RATE | Upload speed limit |
AUTH_ONCE=true | Authenticate only once per session |
QUIET=true | Suppress output logs |
NET_ADMIN privileges to configure bandwidthContent type
Image
Digest
sha256:8224e75eaโฆ
Size
6.1 MB
Last updated
over 1 year ago
docker pull bibica/microsocks-v2