From 96ca1a167dd2625a082abf1a0310b1709897a768 Mon Sep 17 00:00:00 2001 From: juewuy Date: Mon, 1 Dec 2025 18:17:47 +0800 Subject: [PATCH] =?UTF-8?q?~=E4=BF=AE=E5=A4=8D=E5=92=8C=E4=BC=98=E5=8C=96d?= =?UTF-8?q?ns=E5=8A=AB=E6=8C=81=E9=97=AE=E9=A2=98=20~=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=AF=81=E4=B9=A6=E9=85=8D=E7=BD=AE=E5=B9=B6=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=B7=B3=E8=BF=87=E8=AF=81=E4=B9=A6=E9=AA=8C=E8=AF=81=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=20~=E5=A2=9E=E5=8A=A0=E5=81=9C=E6=AD=A2=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E6=97=B6=E6=B8=85=E7=90=86=E7=BC=93=E5=AD=98=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E7=9A=84=E5=8A=9F=E8=83=BD=20~=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=AF=B9sub-store=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E7=9A=84?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20~=E6=9B=B4=E6=96=B0=E5=9C=A8=E7=BA=BF?= =?UTF-8?q?=E8=AE=A2=E9=98=85=E8=BD=AC=E6=8D=A2=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/servers.list | 2 +- scripts/start.sh | 37 ++++++++++++++++++++++--------------- scripts/webget.sh | 2 +- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/public/servers.list b/public/servers.list index 5570593..6d6ca41 100644 --- a/public/servers.list +++ b/public/servers.list @@ -9,7 +9,7 @@ 202 http私人内测源(危险!非必要请勿使用) http://t.jwsc.eu.org 开发版 401 作者提供,支持vless|hy2 https://sub.jwsc.eu.org ua -402 肥羊提供(有广告),支持vless|hy2 https://sub.d1.mk diyua +402 肥羊提供(有广告),支持vless|hy2 https://api.v1.mk diyua 403 肥羊提供(有广告),支持vless|hy2 https://url.v1.mk diyua 501 Acl4SSR全能优化版 https://github.com/juewuy/ShellCrash/raw/master/rules/ShellClash.ini (推荐) diff --git a/scripts/start.sh b/scripts/start.sh index 5c598c3..dbe091c 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -295,8 +295,10 @@ check_singbox_config() { #检查singbox配置文件 exit 1 fi #删除不兼容的旧版内容 - sed -i 's/^.*"inbounds":/{"inbounds":/' "$core_config_new" - sed -i 's/{[^{}]*"dns-out"[^{}]*}//g' "$core_config_new" + [ "$(wc -l < "$core_config_new")" -lt 3 ] && { + sed -i 's/^.*"inbounds":/{"inbounds":/' "$core_config_new" + sed -i 's/{[^{}]*"dns-out"[^{}]*}//g' "$core_config_new" + } #检测并去除无效策略组 [ -n "$url_type" ] && { #获得无效策略组名称 @@ -724,12 +726,8 @@ EOF ], "rules": [ - { "action": "route", "server": "dns_fakeip", "strategy": "$strategy", "disable_cache": true, "rewrite_ttl": 1 }, - { "action": "route", "server": "dns_proxy", "strategy": "$strategy", "disable_cache": true }, - { "action": "route", "server": "dns_direct", "strategy": "$strategy", "disable_cache": true }, - - { "clash_mode": "Global", "server": "$global_dns" }, - { "clash_mode": "Direct", "server": "dns_direct" }, + { "clash_mode": "Global", "server": "$global_dns", "strategy": "$strategy", "disable_cache": true }, + { "clash_mode": "Direct", "server": "dns_direct", "strategy": "$strategy", "disable_cache": true }, { "domain_suffix": ["services.googleapis.cn"], "server": "dns_fakeip" }, $fake_ip_filter_domain @@ -737,10 +735,7 @@ EOF $fake_ip_filter_regex $direct_dns - { - "query_type": ["A", "AAAA"], - "server": "dns_fakeip" - } + { "query_type": ["A", "AAAA"], "server": "dns_fakeip", "strategy": "$strategy", "disable_cache": true, "rewrite_ttl": 1 } ], "strategy": "$strategy", "final": "dns_proxy", @@ -751,7 +746,7 @@ EOF EOF #生成add_route.json #域名嗅探配置 - [ "$sniffer" = "已启用" ] && sniffer_set='{ "inbound": [ "redirect-in", "dns-in", "tproxy-in", "tun-in" ], "action": "sniff", "timeout": "500ms" },' + [ "$sniffer" = "已启用" ] && sniffer_set='{ "inbound": [ "redirect-in", "tproxy-in", "tun-in" ], "action": "sniff", "timeout": "500ms" },' cat >"$TMPDIR"/jsons/add_route.json <"$TMPDIR"/jsons/certificate.json </dev/null 2>&1 + #清理缓存目录 + rm -rf "$TMPDIR"/crash_start_time + rm -rf "$TMPDIR"/CrashCore.tar.gz ;; restart) $0 stop diff --git a/scripts/webget.sh b/scripts/webget.sh index f396f66..55feb20 100644 --- a/scripts/webget.sh +++ b/scripts/webget.sh @@ -464,7 +464,7 @@ EOF "timeout": "3s" }, "override_tls": { - "enabled": $override_tls, + "enabled": true, "insecure": $override_tls } },