Docker image for singbox2proxy — a tool to convert sing-box proxy links into local HTTP/SOCKS5 proxies.
# docker-compose.yml
services:
sb2p:
image: itzme1on/singbox2proxy
restart: unless-stopped
ports:
- "1080:1080"
- "8080:8080"
environment:
PROXY_URLS: "vless://..."
HTTP_PORT: "8080"
SOCKS_PORT: "1080"docker compose up -dOr run directly:
docker run -d \
--name sb2p \
-p 1080:1080 \
-p 8080:8080 \
-e PROXY_URLS="vless://..." \
-e HTTP_PORT=8080 \
-e SOCKS_PORT=1080 \
itzme1on/singbox2proxy| Variable | Description | Example |
|---|---|---|
PROXY_URLS |
Proxy URL(s), space-separated | "vmess://... vless://..." |
HTTP_PORT |
HTTP proxy port | 8080 |
SOCKS_PORT |
SOCKS5 proxy port | 1080 |
CHAIN |
Chain multiple proxies sequentially | true |
TEST |
Test proxy connectivity on start | true |
VERBOSE |
Enable debug logging | true |
QUIET |
Disable all logging | true |
CONFIG_ONLY |
Only generate config, don't start | true |
OUTPUT_CONFIG |
Save config to file | /app/config.json |
RELAY |
Relay protocol | vmess, trojan, ss, socks, http |
RELAY_HOST |
Relay server host | myserver.com |
RELAY_PORT |
Relay server port | 8443 |
RELAY_NAME |
Relay identifier | test-relay-identifier |
UUID_SEED |
Seed for persistent relay UUIDs | test-seed |
TUN |
Enable TUN mode (requires NET_ADMIN) | true |
TUN_ADDRESS |
TUN interface address | 172.19.0.1/30 |
TUN_STACK |
TUN stack type | system, gvisor, mixed |
TUN_MTU |
TUN interface MTU | 9000 |
TUN_AUTO_ROUTE |
Disable auto routing when false |
false |
SET_SYSTEM_PROXY |
Set system-level proxy | true |
You can also pass CLI arguments directly:
services:
sb2p:
image: itzme1on/singbox2proxy
command: ["vless://...", "--http-port", "8080", "--verbose"]TUN mode requires additional capabilities:
services:
sb2p:
image: itzme1on/singbox2proxy:latest
environment:
PROXY_URLS: "vless://..."
TUN: true
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tunExpose a relay server for other clients:
services:
sb2p:
image: itzme1on/singbox2proxy:latest
ports:
- "1080:1080"
- "8080:8080"
- "8443:8443"
environment:
PROXY_URLS: "vless://..."
HTTP_PORT: "8080"
SOCKS_PORT: "1080"
RELAY: "vless"
RELAY_HOST: "0.0.0.0"
RELAY_PORT: "8443"docker build -t singbox2proxy .