From ca4873fbe8a5fd7dd31ea9e472010c29426fe8b5 Mon Sep 17 00:00:00 2001 From: juewuy Date: Mon, 19 Apr 2021 12:10:09 +0800 Subject: [PATCH] =?UTF-8?q?v1.2.4-test=20~=E5=9C=A8=E7=BA=BF=E7=94=9F?= =?UTF-8?q?=E6=88=90=E9=85=8D=E7=BD=AE=E5=8A=9F=E8=83=BD=E4=B8=AD=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E9=83=A8=E5=88=86=E6=B8=B8=E6=88=8F=E8=A7=84?= =?UTF-8?q?=E5=88=99=20~=E6=9B=BF=E6=8D=A2=E4=BA=86=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=9C=A8=E7=BA=BFsub=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=9C=B0?= =?UTF-8?q?=E5=9D=80=20~=E9=BB=98=E8=AE=A4=E5=8A=A0=E5=AF=86DNS=E4=B8=AD?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=9B=BF=E6=8D=A2=E4=B8=BAdot=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=20~=E4=BF=AE=E6=94=B9=E4=BA=86=E5=88=A4=E5=AE=9ATun?= =?UTF-8?q?=E8=99=9A=E6=8B=9F=E7=BD=91=E5=8D=A1=E6=94=AF=E6=8C=81=E7=9A=84?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=20~=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=AF=B9Scrip?= =?UTF-8?q?t=E8=A7=84=E5=88=99=E7=9A=84=E8=87=AA=E5=8A=A8=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/clash.sh | 14 +++----------- scripts/getdate.sh | 15 +++++++++------ scripts/start.sh | 9 +++++++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/scripts/clash.sh b/scripts/clash.sh index db94f1c..d6906bd 100644 --- a/scripts/clash.sh +++ b/scripts/clash.sh @@ -314,7 +314,7 @@ setdns(){ setcrt else dns_nameserver='https://223.5.5.5/dns-query, https://doh.pub/dns-query, tls://dns.rubyfish.cn:853' - dns_fallback='https://1.0.0.1/dns-query, https://8.8.4.4/dns-query, https://doh.opendns.com/dns-query' + dns_fallback='tls://1.0.0.1:853, tls://8.8.4.4:853, https://doh.opendns.com/dns-query' setconfig dns_nameserver \'"$dns_nameserver"\' setconfig dns_fallback \'"$dns_fallback"\' echo -e "\033[32m设置成功!!!\033[0m" @@ -563,7 +563,7 @@ clashcfg(){ dns_mod=redir_host set_redir_config elif [ "$num" = 3 ]; then - modinfo tun >/dev/null 2>&1 + ip tuntap >/dev/null 2>&1 if [ "$?" != 0 ];then echo ----------------------------------------------- echo -e "\033[31m当前设备内核可能不支持开启Tun/混合模式!\033[0m" @@ -575,17 +575,13 @@ clashcfg(){ else set_redir_mod fi - elif [ "$clashcore" = "clash" ] || [ "$clashcore" = "clashr" ];then - echo ----------------------------------------------- - echo -e "\033[31m当前核心不支持开启Tun模式!请先切换clash核心!!!\033[0m" - sleep 1 else redir_mod=Tun模式 dns_mod=fake-ip set_redir_config fi elif [ "$num" = 2 ]; then - modinfo tun >/dev/null 2>&1 + ip tuntap >/dev/null 2>&1 if [ "$?" != 0 ];then echo -e "\033[31m当前设备内核可能不支持开启Tun/混合模式!\033[0m" read -p "是否强制开启?可能无法正常使用!(1/0) > " res @@ -595,10 +591,6 @@ clashcfg(){ else set_redir_mod fi - elif [ "$clashcore" = "clash" ] || [ "$clashcore" = "clashr" ];then - echo ----------------------------------------------- - echo -e "\033[31m当前核心不支持开启Tun模式!请先切换clash核心!!!\033[0m" - sleep 1 else redir_mod=混合模式 set_redir_config diff --git a/scripts/getdate.sh b/scripts/getdate.sh index b382230..e8fdfa5 100644 --- a/scripts/getdate.sh +++ b/scripts/getdate.sh @@ -45,6 +45,9 @@ linkconfig(){ echo 12 基础规则-仅Geoip CN+Final echo 13 网易云解锁-仅规则分组 echo 14 ACL4SSR重度全分组+谷歌优化 + echo 15 ACL4SSR通用版+LM-Firefly游戏规则 + echo 16 ACL4SSR精简版+LM-Firefly游戏规则 + echo 17 ACL4SSR重度+LM-Firefly游戏规则 echo ----------------------------------------------- echo 0 返回上级菜单 read -p "请输入对应数字 > " num @@ -52,7 +55,7 @@ linkconfig(){ errornum elif [ "$num" = 0 ];then echo - elif [ "$num" -le 14 ];then + elif [ "$num" -le 17 ];then #将对应标记值写入mark rule_link=$num setconfig rule_link $rule_link @@ -65,10 +68,10 @@ linkserver(){ echo -e "\033[36m以下为互联网采集的第三方服务器,具体安全性请自行斟酌!\033[0m" echo 当前使用后端为:$server_link echo 1 subcon.dlj.tf - echo 2 subconverter.herokuapp.com - echo 3 subconverter-web.now.sh - echo 4 api.dler.io - echo 5 api.wcc.best + echo 2 api.dler.io + echo 3 api.wcc.best + echo 4 api2.tsutsu.cc + echo 5 api.v1.mk echo ----------------------------------------------- echo 0 返回上级菜单 read -p "请输入对应数字 > " num @@ -869,7 +872,7 @@ userguide(){ echo -e "\033[33m是否需要代理UDP流量(主要用于游戏)? \033[0m" echo ----------------------------------------------- echo -e " 1 \033[33m不代理UDP流量\033[0m(可能会导致一部分游戏/应用无法连接)" - modinfo tun >/dev/null 2>&1 && [ "$?" = 0 ] && \ + ip tuntap >/dev/null 2>&1 && [ "$?" = 0 ] && \ echo -e " 2 \033[32m使用Tun虚拟网卡\033[0m代理UDP流量(更低的延迟但更多的CPU消耗)" || \ echo -e " - \033[0m使用Tun模式(你的设备不支持此模式,如为虚拟机运行请调整虚拟网卡设置)\033[0m" [ -n "$(iptables -j TPROXY 2>&1 | grep 'on-port')" ] && \ diff --git a/scripts/start.sh b/scripts/start.sh index d9cff3b..d374fac 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -102,10 +102,10 @@ getyaml(){ #前后端订阅服务器地址索引,可在此处添加! Server=`sed -n ""$server_link"p"< $tmpdir/proxy.yaml #跳过本地tls证书验证 [ "$skip_cert" = "已开启" ] && sed -i '10,99s/skip-cert-verify: false/skip-cert-verify: true/' $tmpdir/proxy.yaml + #检测是否使用script规则 + [ -n "$(cat $yaml | grep -E '^script:')" ] && mode='mode: Script' #添加配置 ################################### cat > $tmpdir/set.yaml <