|
1 | 1 | #!/usr/bin/env bash |
2 | 2 |
|
3 | 3 | # 当前脚本版本号 |
4 | | -VERSION='v1.3.14 (2026.06.20)' |
| 4 | +VERSION='v1.3.14 (2026.06.27)' |
5 | 5 |
|
6 | 6 | # Github 反代加速代理 |
7 | 7 | GITHUB_PROXY=('https://hub.glowp.xyz/' 'https://proxy.vvvv.ee/') |
@@ -56,8 +56,8 @@ E[7]="Install dependence-list:" |
56 | 56 | C[7]="安装依赖列表:" |
57 | 57 | E[8]="All dependencies already exist and do not need to be installed additionally." |
58 | 58 | C[8]="所有依赖已存在,不需要额外安装" |
59 | | -E[9]="To upgrade, press [y]. No upgrade by default:" |
60 | | -C[9]="升级请按 [y],默认不升级:" |
| 59 | +E[9]="Whether to upgrade [y/N] (default is N):" |
| 60 | +C[9]="是否升级 [y/N] (默认为 N):" |
61 | 61 | E[10]="Please enter VPS IP (Default: \${SERVER_IP_DEFAULT}):" |
62 | 62 | C[10]="请输入 VPS IP (默认为: \${SERVER_IP_DEFAULT}):" |
63 | 63 | E[11]="Please enter the starting port number. Must be \${MIN_PORT} - \${MAX_PORT}, consecutive \${NUM} free ports are required (Default: \${START_PORT_DEFAULT}):" |
@@ -204,8 +204,8 @@ E[81]="Adaptive Clash / V2rayN / Throne / ShadowRocket / SFI / SFA / SFM Clients |
204 | 204 | C[81]="自适应 Clash / V2rayN / Throne / ShadowRocket / SFI / SFA / SFM 客户端" |
205 | 205 | E[82]="template" |
206 | 206 | C[82]="模版" |
207 | | -E[83]="To uninstall Nginx press [y], it is not uninstalled by default:" |
208 | | -C[83]="如要卸载 Nginx 请按 [y],默认不卸载:" |
| 207 | +E[83]="Whether to uninstall Nginx [y/N] (default is N):" |
| 208 | +C[83]="是否卸载 Nginx [y/N] (默认为 N):" |
209 | 209 | E[84]="Set SElinux: enforcing --> disabled" |
210 | 210 | C[84]="设置 SElinux: enforcing --> disabled" |
211 | 211 | E[85]="Please enter Argo Token, Argo Json or Cloudflare API\n\n [*] Token: Visit https://dash.cloudflare.com/ , Zero Trust > Networks > Connectors > Create a tunnel > Select Cloudflared\n\n [*] Json: Users can easily obtain it through the following website: https://fscarmen.cloudflare.now.cc\n\n [*] Cloudflare API: Visit https://dash.cloudflare.com/profile/api-tokens > Create Token > Create Custom Token > Add the following permissions:\n - Account > Cloudflare One Connectors: cloudflared > Edit\n - Zone > DNS > Edit\n\n - Account Resources: Include > Required Account\n - Zone Resources: Include > Specific zone > Argo Root Domain" |
@@ -278,8 +278,8 @@ E[118]="Please enter [Token, Json, API] value:" |
278 | 278 | C[118]="请输入 [Token, Json, API] 的值:" |
279 | 279 | E[119]="Using Cloudflare API to create Tunnel and handle DNS config..." |
280 | 280 | C[119]="使用 Cloudflare API 创建 Tunnel 和处理 DNS 配置..." |
281 | | -E[120]="Found existing tunnel with the same name. Tunnel ID: \$EXISTING_TUNNEL_ID. Status: \$EXISTING_TUNNEL_STATUS. Overwrite? [y/N] (default y):" |
282 | | -C[120]="发现同名隧道已创建,隧道 ID: \$EXISTING_TUNNEL_ID,状态: \$EXISTING_TUNNEL_STATUS。是否覆盖? [y/N] (默认为 y):" |
| 281 | +E[120]="Found existing tunnel with the same name. Tunnel ID: \$EXISTING_TUNNEL_ID. Status: \$EXISTING_TUNNEL_STATUS. Overwrite? [Y/n] (default is Y):" |
| 282 | +C[120]="发现同名隧道已创建,隧道 ID: \$EXISTING_TUNNEL_ID,状态: \$EXISTING_TUNNEL_STATUS。是否覆盖? [Y/n] (默认为 Y):" |
283 | 283 | E[121]="Change node configuration (sb -d)" |
284 | 284 | C[121]="修改节点配置 (sb -d)" |
285 | 285 | E[122]="Invalid access token. Please roll at https://dash.cloudflare.com/profile/api-tokens to re-generate." |
@@ -332,8 +332,8 @@ E[145]="UFW is not active. PortHopping forwarding rules were written, but you sh |
332 | 332 | C[145]="UFW 未处于激活状态。PortHopping 转发规则已写入,但建议手动启用 UFW 以确保策略生效" |
333 | 333 | E[146]="Failed to update UFW PortHopping forwarding rules. Please check UFW configuration files manually." |
334 | 334 | C[146]="更新 UFW 的 PortHopping 转发规则失败,请手动检查 UFW 配置文件" |
335 | | -E[147]="Hysteria2 Realm is useful for China-back routing or machines without public inbound access. It is not recommended when the server already has a public inbound IP/port. Enable Realm? [y/N]:" |
336 | | -C[147]="Hysteria2 Realm 适用于回国或者没有公网入口的机器;有公网入口时不建议使用。是否启用?[y/N]:" |
| 335 | +E[147]="Hysteria2 Realm is useful for China-back routing or machines without public inbound access. It is not recommended when the server already has a public inbound IP/port. Enable Realm? [y/N] (default is N):" |
| 336 | +C[147]="Hysteria2 Realm 适用于回国或者没有公网入口的机器;有公网入口时不建议使用。是否启用?[y/N] (默认为 N):" |
337 | 337 | E[148]="WARP-assisted hole punching is useful in strict NAT environments. When direct hole punching fails, Cloudflare WARP can provide a CF egress path to improve success. Enable it? [y/N]:" |
338 | 338 | C[148]="WARP 辅助打洞(适用于 NAT 严格环境):当 NAT 类型较严格(如对称 NAT)导致直连打洞失败时,可借助 Cloudflare WARP 获取一个 CF 出口 IP 作为中转,提升打洞成功率。是否启用?[y/N]:" |
339 | 339 | E[150]="Custom warp-ep outbounds rules (rules: \${CUSTOM_ROUTE_COUNT:-0})" |
@@ -417,7 +417,7 @@ calc_install_steps() { |
417 | 417 | # 检测是否需要启用 Github CDN,如能直接连通 api.github.com,则不使用 |
418 | 418 | check_cdn() { |
419 | 419 | local PROXY CODE PID CMD |
420 | | - local _WAIT_COUNT=120 |
| 420 | + local _WAIT_COUNT=40 |
421 | 421 | local PIDS=() |
422 | 422 | local API_URL='https://api.github.com/repos/SagerNet/sing-box/releases' |
423 | 423 |
|
@@ -2128,7 +2128,7 @@ get_sing_box_version() { |
2128 | 2128 | local API_RESPONSE=$(wget --no-check-certificate --server-response --tries=2 --timeout=3 -qO- "${GH_PROXY}https://api.github.com/repos/SagerNet/sing-box/releases" 2>&1 | grep -E '^[ ]+HTTP/|tag_name') |
2129 | 2129 | if grep -q 'HTTP.* 200' <<< "$API_RESPONSE"; then |
2130 | 2130 | local VERSION_LATEST=$(awk -F '["v-]' '/tag_name/{print $5}' <<< "$API_RESPONSE" | sort -Vr | sed -n '1p') |
2131 | | - local RESULT_VERSION=$(wget --no-check-certificate --tries=2 --timeout=3 -qO- ${GH_PROXY}https://api.github.com/repos/SagerNet/sing-box/releases | awk -F '["v]' -v var="tag_name.*$VERSION_LATEST" '$0 ~ var {print $5; exit}') |
| 2131 | + local RESULT_VERSION=$(awk -F '["v]' -v var="tag_name.*$VERSION_LATEST" '$0 ~ var {print $5; exit}' <<< "$API_RESPONSE") |
2132 | 2132 | else |
2133 | 2133 | local RESULT_VERSION="$DEFAULT_NEWEST_VERSION" |
2134 | 2134 | fi |
@@ -5249,7 +5249,7 @@ change_protocols() { |
5249 | 5249 |
|
5250 | 5250 | # 用于新节点的配置信息 |
5251 | 5251 | if [ "${#UUID[@]}" -gt 0 ]; then |
5252 | | - UUID_CONFIRM="${UUID[0]}" |
| 5252 | + UUID_CONFIRM="$(printf "%s\n" "${UUID[@]}" | grep -m 1 . )" |
5253 | 5253 | elif grep -q '.' <<< "${TROJAN_PASSWORD}"; then |
5254 | 5254 | UUID_CONFIRM="${TROJAN_PASSWORD}" |
5255 | 5255 | else |
|
0 commit comments