mirror of
https://github.com/fscarmen/sing-box.git
synced 2026-08-10 17:55:16 +08:00
v1.2.18 Support AnyTLS URI in v2rayN v7.14.3+
This commit is contained in:
+7
-40
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# 当前脚本版本号
|
||||
VERSION='v1.2.17 (2025.08.22)'
|
||||
VERSION='v1.2.18 (2025.08.27)'
|
||||
|
||||
# 各变量默认值
|
||||
GH_PROXY='https://gh-proxy.com/'
|
||||
GH_PROXY='https://hub.glowp.xyz/'
|
||||
TEMP_DIR='/tmp/sing-box'
|
||||
WORK_DIR='/etc/sing-box'
|
||||
START_PORT_DEFAULT='8881'
|
||||
@@ -28,8 +28,8 @@ mkdir -p $TEMP_DIR
|
||||
|
||||
E[0]="Language:\n 1. English (default) \n 2. 简体中文"
|
||||
C[0]="${E[0]}"
|
||||
E[1]="1. Added the ability to change CDNs online using [sb -d]; 2. Change GitHub proxy; 3. Optimize code."
|
||||
C[1]="1. 新增使用 [sb -d] 在线更换 CDN 功能; 2. 更改 GitHub 代理; 3. 优化代码"
|
||||
E[1]="Add support for AnyTLS URI in v2rayN v7.14.3+, including subscription integration"
|
||||
C[1]="支持 v2rayN v7.14.3+,新增 AnyTLS URI,并支持在订阅中使用"
|
||||
E[2]="Downloading Sing-box. Please wait a seconds ..."
|
||||
C[2]="下载 Sing-box 中,请稍等 ..."
|
||||
E[3]="Input errors up to 5 times.The script is aborted."
|
||||
@@ -228,8 +228,8 @@ E[99]="The \${SING_BOX_SCRIPT} is detected to be installed. Script exits."
|
||||
C[99]="检测到已安装 \${SING_BOX_SCRIPT},脚本退出!"
|
||||
E[100]="Can't get the official latest version. Script exits."
|
||||
C[100]="获取不到官方的最新版本,脚本退出!"
|
||||
E[101]="The contents of the AnyTLS configuration file need to be updated for the sing_box kernel."
|
||||
C[101]="AnyTLS 配置文件内容,需要更新 sing_box 内核"
|
||||
E[101]=""
|
||||
C[101]=""
|
||||
E[102]="Backing up old version sing-box to ${WORK_DIR}/sing-box.bak"
|
||||
C[102]="已备份旧版本 sing-box 到 ${WORK_DIR}/sing-box.bak"
|
||||
E[103]="New version \$ONLINE is running successfully, backup file deleted"
|
||||
@@ -2571,40 +2571,7 @@ vless://${UUID[20]}@${SERVER_IP_1}:${PORT_GRPC_REALITY}?encryption=none&security
|
||||
|
||||
[ -n "$PORT_ANYTLS" ] && local V2RAYN_SUBSCRIBE+="
|
||||
----------------------------
|
||||
# $(text 101)
|
||||
|
||||
{
|
||||
\"log\":{
|
||||
\"level\":\"warn\"
|
||||
},
|
||||
\"inbounds\":[
|
||||
{
|
||||
\"listen\":\"127.0.0.1\",
|
||||
\"listen_port\":${PORT_ANYTLS},
|
||||
\"sniff\":true,
|
||||
\"sniff_override_destination\":false,
|
||||
\"tag\": \"${PROTOCOL_LIST[10]}\",
|
||||
\"type\":\"mixed\"
|
||||
}
|
||||
],
|
||||
\"outbounds\":[
|
||||
{
|
||||
\"type\": \"anytls\",
|
||||
\"tag\": \"${NODE_NAME[21]} ${NODE_TAG[10]}\",
|
||||
\"server\": \"${SERVER_IP}\",
|
||||
\"server_port\": ${PORT_ANYTLS},
|
||||
\"password\": \"${UUID[21]}\",
|
||||
\"idle_session_check_interval\": \"30s\",
|
||||
\"idle_session_timeout\": \"30s\",
|
||||
\"min_idle_session\": 5,
|
||||
\"tls\": {
|
||||
\"enabled\": true,
|
||||
\"insecure\": true,
|
||||
\"server_name\": \"\"
|
||||
}
|
||||
}
|
||||
]
|
||||
}"
|
||||
anytls://${UUID[21]}@${SERVER_IP_1}:${PORT_ANYTLS}?security=tls&fp=chrome&allowInsecure=1&type=tcp#${NODE_NAME[21]// /%20}%20${NODE_TAG[10]}"
|
||||
|
||||
echo -n "$V2RAYN_SUBSCRIBE" | sed -E '/^[ ]*#|^[ ]+|^--|^\{|^\}/d' | sed '/^$/d' | base64 -w0 > ${WORK_DIR}/subscribe/v2rayn
|
||||
|
||||
|
||||
Reference in New Issue
Block a user