v1.2.4-test

~在线生成配置功能中增加了部分游戏规则
~替换了部分在线sub服务器地址
~默认加密DNS中部分替换为dot协议
~修改了判定Tun虚拟网卡支持的命令
~增加了对Script规则的自动识别机制
This commit is contained in:
juewuy
2021-04-19 12:10:09 +08:00
parent 15105dd07e
commit ca4873fbe8
3 changed files with 19 additions and 19 deletions

View File

@@ -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

View File

@@ -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')" ] && \

View File

@@ -102,10 +102,10 @@ getyaml(){
#前后端订阅服务器地址索引,可在此处添加!
Server=`sed -n ""$server_link"p"<<EOF
subcon.dlj.tf
subconverter.herokuapp.com
subconverter-web.now.sh
api.dler.io
api.wcc.best
api2.tsutsu.cc
api.v1.mk
EOF`
Config=`sed -n ""$rule_link"p"<<EOF
https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_NoReject.ini
@@ -122,6 +122,9 @@ https://gist.githubusercontent.com/tindy2013/1fa08640a9088ac8652dbd40c5d2715b/ra
https://subconverter.oss-ap-southeast-1.aliyuncs.com/Rules/RemoteConfig/special/basic.ini
https://subconverter.oss-ap-southeast-1.aliyuncs.com/Rules/RemoteConfig/special/netease.ini
https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/config/ACL4SSR_Online_Full_Google.ini
https://github.com/juewuy/ShellClash/raw/master/rules/ACL4SSR_Online_Games.ini
https://github.com/juewuy/ShellClash/raw/master/rules/ACL4SSR_Online_Mini_Games.ini
https://github.com/juewuy/ShellClash/raw/master/rules/ACL4SSR_Online_Full_Games.ini
EOF`
#如果传来的是Url链接则合成Https链接否则直接使用Https链接
if [ -z "$Https" ];then
@@ -249,6 +252,8 @@ modify_yaml(){
[ "$b" != "0" ] && sed "${a},${b}d" $yaml > $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 <<EOF