Enhanced: us proxy
This commit is contained in:
parent
ca7c7bbb9a
commit
2bb5f72772
|
|
@ -1,10 +1,9 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
"inbounds": [
|
"inbounds": [
|
||||||
{
|
{
|
||||||
"type": "mixed",
|
"type": "mixed",
|
||||||
"listen": "::",
|
"listen": "::",
|
||||||
"listen_port": 3446
|
"listen_port": 3447
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"outbounds": [
|
"outbounds": [
|
||||||
|
|
@ -27,4 +26,3 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -1,11 +1,19 @@
|
||||||
version: "3.8"
|
version: "3.8"
|
||||||
services:
|
services:
|
||||||
sing-box:
|
sing-box-hk:
|
||||||
image: ghcr.io/sagernet/sing-box
|
image: ghcr.io/sagernet/sing-box
|
||||||
container_name: sing-box
|
container_name: sing-box-hk
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- ./config.json:/etc/sing-box/config.json
|
- ./config-hk.json:/etc/sing-box/config.json
|
||||||
network_mode: "host"
|
network_mode: "host"
|
||||||
command: -D /var/lib/sing-box -C /etc/sing-box/ run
|
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
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,26 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
case "${1:-hk}" in
|
||||||
if [ $# -eq 0 ] || [ "$1" == "start" ]; then
|
hk)
|
||||||
export https_proxy=http://127.0.0.1:3446
|
export https_proxy=http://127.0.0.1:3447
|
||||||
export http_proxy=http://127.0.0.1:3446
|
export http_proxy=http://127.0.0.1:3447
|
||||||
export all_proxy=socks5://127.0.0.1:3446
|
export all_proxy=socks5://127.0.0.1:3447
|
||||||
elif [ "$1" == "stop" ]; then
|
export no_proxy="localhost,127.0.0.1,::1,192.168.0.0/16,10.0.0.0/8,172.16.0.0/12"
|
||||||
unset https_proxy
|
echo "Proxy: HK (127.0.0.1:3447)"
|
||||||
unset http_proxy
|
;;
|
||||||
unset all_proxy
|
us)
|
||||||
fi
|
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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue