Skip to content

itzme1on/signbox2proxy-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

singbox2proxy Docker

Build and Push Docker Hub Docker Pulls Docker Image Size

Docker image for singbox2proxy — a tool to convert sing-box proxy links into local HTTP/SOCKS5 proxies.

Quick Start

# 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 -d

Or 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

Environment Variables

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

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/tun

Relay Mode

Expose 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"

Build

docker build -t singbox2proxy .

Supported Protocols

See singbox2proxy — Supported Protocols.

About

Docker image for singbox2proxy — run sing-box proxies in containers with full CLI support

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors