From 2bb5f727720ede3d021f30ca4de293e9c8e1f93f Mon Sep 17 00:00:00 2001 From: openclaw Date: Wed, 24 Jun 2026 22:01:54 +0800 Subject: [PATCH] Enhanced: us proxy --- .../{config.json => config-hk.json} | 4 +-- out/sing-box-client/config-us.json | 25 ++++++++++++++ out/sing-box-client/docker-compose.yaml | 14 ++++++-- out/sing-box-client/out | 34 +++++++++++++------ 4 files changed, 61 insertions(+), 16 deletions(-) rename out/sing-box-client/{config.json => config-hk.json} (94%) create mode 100644 out/sing-box-client/config-us.json diff --git a/out/sing-box-client/config.json b/out/sing-box-client/config-hk.json similarity index 94% rename from out/sing-box-client/config.json rename to out/sing-box-client/config-hk.json index 4fa1ce4..1d88877 100644 --- a/out/sing-box-client/config.json +++ b/out/sing-box-client/config-hk.json @@ -1,10 +1,9 @@ - { "inbounds": [ { "type": "mixed", "listen": "::", - "listen_port": 3446 + "listen_port": 3447 } ], "outbounds": [ @@ -27,4 +26,3 @@ } ] } - diff --git a/out/sing-box-client/config-us.json b/out/sing-box-client/config-us.json new file mode 100644 index 0000000..2564d70 --- /dev/null +++ b/out/sing-box-client/config-us.json @@ -0,0 +1,25 @@ +{ + "inbounds": [ + { + "type": "mixed", + "listen": "::", + "listen_port": 3448 + } + ], + "outbounds": [ + { + "type": "vmess", + "server": "skk.moe", + "server_port": 80, + "uuid": "b13c740e-7b41-473b-b071-68d3822e471b", + "security": "none", + "transport": { + "type": "ws", + "path": "/b13c740e-7b41-473b-b071-68d3822e471b-vmess", + "headers": { + "Host": "prep-miami-resolve-nest.trycloudflare.com" + } + } + } + ] +} diff --git a/out/sing-box-client/docker-compose.yaml b/out/sing-box-client/docker-compose.yaml index b6ae0b0..5f1b75a 100644 --- a/out/sing-box-client/docker-compose.yaml +++ b/out/sing-box-client/docker-compose.yaml @@ -1,11 +1,19 @@ version: "3.8" services: - sing-box: + sing-box-hk: image: ghcr.io/sagernet/sing-box - container_name: sing-box + container_name: sing-box-hk restart: unless-stopped volumes: - - ./config.json:/etc/sing-box/config.json + - ./config-hk.json:/etc/sing-box/config.json network_mode: "host" command: -D /var/lib/sing-box -C /etc/sing-box/ run + sing-box-us: + image: ghcr.io/sagernet/sing-box + container_name: sing-box-us + restart: unless-stopped + volumes: + - ./config-us.json:/etc/sing-box/config.json + network_mode: "host" + command: -D /var/lib/sing-box -C /etc/sing-box/ run diff --git a/out/sing-box-client/out b/out/sing-box-client/out index 7d287d7..dc36071 100755 --- a/out/sing-box-client/out +++ b/out/sing-box-client/out @@ -1,12 +1,26 @@ #!/bin/bash - -if [ $# -eq 0 ] || [ "$1" == "start" ]; then - export https_proxy=http://127.0.0.1:3446 - export http_proxy=http://127.0.0.1:3446 - export all_proxy=socks5://127.0.0.1:3446 -elif [ "$1" == "stop" ]; then - unset https_proxy - unset http_proxy - unset all_proxy -fi +case "${1:-hk}" in + hk) + export https_proxy=http://127.0.0.1:3447 + export http_proxy=http://127.0.0.1:3447 + export all_proxy=socks5://127.0.0.1:3447 + export no_proxy="localhost,127.0.0.1,::1,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12" + echo "Proxy: HK (127.0.0.1:3447)" + ;; + us) + export https_proxy=http://127.0.0.1:3448 + export http_proxy=http://127.0.0.1:3448 + export all_proxy=socks5://127.0.0.1:3448 + export no_proxy="localhost,127.0.0.1,::1,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12" + echo "Proxy: US (127.0.0.1:3448)" + ;; + stop) + unset https_proxy http_proxy all_proxy no_proxy + echo "Proxy: stopped" + ;; + *) + echo "Usage: source out [hk|us|stop]" + return 1 + ;; +esac