mirror of
https://github.com/fscarmen/sing-box.git
synced 2026-08-10 17:55:16 +08:00
Fix a bug in Json and Token Tunnels.
This commit is contained in:
@@ -164,7 +164,7 @@ bash <(wget -qO- https://raw.githubusercontent.com/fscarmen/sing-box/main/sing-b
|
||||
```
|
||||
docker run -dit \
|
||||
--pull always \
|
||||
--name sing-box
|
||||
--name sing-box \
|
||||
-p 8800-8820:8800-8820/tcp \
|
||||
-p 8800-8820:8800-8820/udp \
|
||||
-e START_PORT=8800 \
|
||||
@@ -203,8 +203,8 @@ services:
|
||||
networks:
|
||||
- sing-box
|
||||
ports:
|
||||
- "8000-8020:8800-8820/tcp"
|
||||
- "8000-8020:8800-8820/udp"
|
||||
- "8800-8820:8800-8820/tcp"
|
||||
- "8800-8820:8800-8820/udp"
|
||||
environment:
|
||||
- START_PORT=8800
|
||||
- SERVER_IP=123.123.123.123
|
||||
|
||||
+8
-5
@@ -132,7 +132,7 @@ EOF
|
||||
}
|
||||
EOF
|
||||
|
||||
# 生成 route 配置
|
||||
# 生成 route 配置
|
||||
cat > $WORK_DIR/conf/02_route.json << EOF
|
||||
{
|
||||
"route":{
|
||||
@@ -295,7 +295,7 @@ EOF
|
||||
}
|
||||
EOF
|
||||
|
||||
# 生成 ShadowTLS V5 配置
|
||||
# 生成 ShadowTLS V5 配置
|
||||
[ "${SHADOWTLS}" = 'true' ] && ((PORT++)) && PORT_SHADOWTLS=$PORT && cat > $WORK_DIR/conf/14_ShadowTLS_inbounds.json << EOF
|
||||
{
|
||||
"inbounds":[
|
||||
@@ -442,7 +442,7 @@ EOF
|
||||
}
|
||||
EOF
|
||||
|
||||
# 生成 vless + ws + tls 配置
|
||||
# 生成 vless + ws + tls 配置
|
||||
[ "${VLESS_WS}" = 'true' ] && ((PORT++)) && PORT_VLESS_WS=$PORT && cat > $WORK_DIR/conf/18_vless-ws-tls_inbounds.json << EOF
|
||||
// "CDN": "${CDN}"
|
||||
{
|
||||
@@ -643,8 +643,11 @@ stdout_logfile=/dev/null
|
||||
echo "$SUPERVISORD_CONF" > /etc/supervisor.d/daemon.ini
|
||||
|
||||
# 如使用临时隧道,先运行 cloudflared 以获取临时隧道域名
|
||||
$WORK_DIR/$ARGO_RUNS >/dev/null 2>&1 &
|
||||
[ -n "$METRICS_PORT" ] && sleep 3 && ARGO_DOMAIN=$(wget -qO- http://localhost:$METRICS_PORT/quicktunnel | awk -F '"' '{print $4}')
|
||||
if [ -n "$METRICS_PORT" ]; then
|
||||
$WORK_DIR/$ARGO_RUNS >/dev/null 2>&1 &
|
||||
sleep 3
|
||||
local ARGO_DOMAIN=$(wget -qO- http://localhost:$METRICS_PORT/quicktunnel | awk -F '"' '{print $4}')
|
||||
fi
|
||||
|
||||
# 生成 nginx 配置文件
|
||||
local NGINX_CONF="user root;
|
||||
|
||||
Reference in New Issue
Block a user