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 <