~增加Meta专属sniffer嗅探功能(8-4)
~增加内核完整性检测机制
~优化公网访问本机流量导致回环的问题
~修复部分显示bug
This commit is contained in:
juewuy 2022-04-28 22:03:31 +08:00
parent 98388d4374
commit bda8c32adc
4 changed files with 12 additions and 7 deletions

Binary file not shown.

View File

@ -3,4 +3,4 @@ clashpre_v=2021.09.15
clash_v=v1.7.1
meta_v=alpha
GeoIP_v=20220426
versionsh=1.5.8
versionsh=1.5.8fix

View File

@ -749,7 +749,7 @@ setserver(){
echo -e " 2 \033[36m测试版\033[0m&Github源(本机clash服务加速)"
echo -e " 3 \033[36m测试版\033[0m&Jsdelivr-CDN源"
echo -e " 4 \033[36m测试版\033[0m&Github源(githubusercontents加速)"
echo -e " 4 \033[36m测试版\033[0m&Github源(fastgit.org加速)"
echo -e " 5 \033[36m测试版\033[0m&Github源(fastgit.org加速)"
[ -z "$(curl -V 2>/dev/null)" ] && [ -n "$(wget -V 2>&1 | grep BusyBox)" ] && echo -e " 7 \033[33mHttp专用源\033[0m"
echo -e " 8 自定义源地址(用于本地源或自建源)"
echo -e " 9 \033[31m版本回退\033[0m"

View File

@ -136,6 +136,10 @@ autoSSH(){
#备份还原SSH秘钥
[ -f $clashdir/dropbear_rsa_host_key ] && ln -sf $clashdir/dropbear_rsa_host_key /etc/dropbear/dropbear_rsa_host_key
}
host_lan(){
host_lan=$(ip a 2>&1 | grep -w 'inet' | grep 'global' | grep -oE '\ 1(92|0|72)\.' | grep -oE '1(92|0|72)' | head -n 1)
[ -n "$host_lan" ] && host_lan="-s ${host_lan}.0.0.0/8"
}
#配置文件相关
getyaml(){
[ -z "$rule_link" ] && rule_link=1
@ -442,10 +446,9 @@ start_redir(){
iptables -t nat -A clash -p tcp $ports -j REDIRECT --to-ports $redir_port
fi
#获取局域网host地址
host_lan=$(ip a 2>&1 | grep -w 'inet' | grep 'global' | grep -oE '\ 1(92|0|72)\.' | grep -oE '1(92|0|72)' | head -n 1)
[ -n "$host_lan" ] && host_lan=${host_lan}.0.0.0/8
host_lan
#将PREROUTING链指向clash链
iptables -t nat -A PREROUTING -p tcp -s $host_lan -j clash
iptables -t nat -A PREROUTING -p tcp $host_lan -j clash
#公网访问功能
if [ "$public_support" = "已开启" ];then
iptables -I INPUT -p tcp --dport $mix_port -j ACCEPT
@ -606,13 +609,15 @@ start_output(){
iptables -t nat -A OUTPUT -p udp -j clash_dns_out
}
stop_iptables(){
host_lan
#重置iptables规则
ip rule del fwmark 1 table 100 2> /dev/null
ip route del local default dev lo table 100 2> /dev/null
iptables -t nat -D PREROUTING -p tcp -j clash 2> /dev/null
iptables -t nat -D PREROUTING -p tcp $host_lan -j clash 2> /dev/null
iptables -D INPUT -p tcp --dport $mix_port -j ACCEPT 2> /dev/null
iptables -D INPUT -p tcp --dport $db_port -j ACCEPT 2> /dev/null
iptables -t nat -D PREROUTING -p udp -j clash_dns 2> /dev/null
iptables -t nat -D PREROUTING -p udp --dport 53 -j clash_dns 2> /dev/null
iptables -t nat -D PREROUTING -p tcp --dport 53 -j clash_dns 2> /dev/null
iptables -t nat -D PREROUTING -p tcp -d 8.8.8.8 -j clash 2> /dev/null
iptables -t nat -D PREROUTING -p tcp -d 8.8.4.4 -j clash 2> /dev/null
iptables -t nat -D PREROUTING -s 172.16.0.0/12 -j clash 2> /dev/null