~新增Tproxy模式
  ·tcp
  ·MAC过滤
  ·常用端口过滤
  ·CNIP绕过
  ·屏蔽QUIC
  ·ipv6支持(未测试)
~新增Nftables支持
  ·tcp&udp
  ·MAC过滤
  ·常用端口过滤
  ·CNIP绕过
  ·屏蔽QUIC
  ·ipv6支持(未测试)
  ·本机代理
  ·docker代理(未测试)
~移除部分不可用安装源
~修复版本回退功能不可用的问题
~修复部分Linux设备grep命令报错的问题
~尝试修复部分华硕设备无法正常开机启动的问题
~尝试修复部分设备提示ip6tables报错的问题
This commit is contained in:
juewuy
2022-11-13 18:33:32 +08:00
parent 13fbc6923f
commit df153c9be0
2 changed files with 13 additions and 14 deletions

View File

@@ -763,8 +763,7 @@ setserver(){
echo -e " 2 \033[32m正式版\033[0m&fastgit.org源"
echo -e " 3 \033[36m公测版\033[0m&Github源(本机clash服务加速)"
echo -e " 4 \033[36m公测版\033[0m&ShellClash源"
echo -e " 5 \033[36m公测版\033[0m&githubusercontents加速"
echo -e " 6 \033[36m公测版\033[0m&fastgit.org源"
echo -e " 5 \033[36m公测版\033[0m&fastgit.org源"
echo -e " 7 \033[33m内测版\033[0m(请加TG讨论组:\033[4;36mhttps://t.me/ShellClash\033[0m)"
echo -e " 8 自定义源地址(用于本地源或自建源)"
echo -e " 9 \033[31m版本回退\033[0m"
@@ -787,10 +786,6 @@ setserver(){
release_url=''
saveserver
elif [ "$num" = 5 ]; then
update_url='https://raw.githubusercontents.com/juewuy/ShellClash/master'
release_url=''
saveserver
elif [ "$num" = 6 ]; then
update_url='https://raw.fastgit.org/juewuy/ShellClash/master'
release_url=''
saveserver
@@ -810,7 +805,8 @@ setserver(){
fi
elif [ "$num" = 9 ]; then
echo -----------------------------------------------
$clashdir/start.sh webget /tmp/clashrelease https://raw.githubusercontents.com/juewuy/ShellClash/master/bin/release_version echooff rediroff 2>/tmp/clashrelease
echo -e "\033[33m如无法连接请务必先启用clash服务\033[0m"
$clashdir/start.sh webget /tmp/clashrelease https://raw.githubusercontent.com/juewuy/ShellClash/master/bin/release_version echooff rediroff 2>/tmp/clashrelease
echo -e "\033[31m请选择想要回退至的release版本\033[0m"
cat /tmp/clashrelease | awk '{print " "NR" "$1}'
echo -e " 0 返回上级菜单"
@@ -819,13 +815,14 @@ setserver(){
setserver
elif [ $num -le $(cat /tmp/clashrelease | awk 'END{print NR}') 2>/dev/null ]; then
release_version=$(cat /tmp/clashrelease | awk '{print $1}' | sed -n "$num"p)
update_url="https://raw.githubusercontents.com/juewuy/ShellClash/$release_version"
update_url="https://raw.githubusercontent.com/juewuy/ShellClash/$release_version"
saveserver
release_url=''
else
echo -----------------------------------------------
echo -e "\033[31m输入有误请重新输入\033[0m"
fi
rm -rf /tmp/clashrelease
else
errornum
fi

View File

@@ -506,8 +506,7 @@ start_dns_redir(){
#屏蔽OpenWrt内置53端口转发
iptables -t nat -D PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53 2> /dev/null
iptables -t nat -D PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53 2> /dev/null
ip6tables -t nat -D PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53 2> /dev/null
ip6tables -t nat -D PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53 2> /dev/null
#设置dns转发
iptables -t nat -N clash_dns
if [ "$macfilter_type" = "白名单" -a -n "$(cat $clashdir/mac)" ];then
@@ -524,8 +523,10 @@ start_dns_redir(){
fi
iptables -t nat -I PREROUTING -p udp --dport 53 -j clash_dns
#ipv6DNS
ip6_nat=$(ip6tables -t nat -L 2>&1 | grep -o 'Chain')
if [ -n "$ip6_nat" ];then
if [ -n "$(lsmod | grep 'ip6table_nat')" ];then
#屏蔽OpenWrt内置53端口转发
ip6tables -t nat -D PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53 2> /dev/null
ip6tables -t nat -D PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53 2> /dev/null
ip6tables -t nat -N clashv6_dns > /dev/null 2>&1
if [ "$macfilter_type" = "白名单" -a -n "$(cat $clashdir/mac)" ];then
#mac白名单
@@ -1129,8 +1130,9 @@ init)
done
profile=/etc/profile
sed -i '' $profile #将软链接转化为一般文件
elif [ -d "/jffs/clash" ];then
clashdir=/jffs/clash
elif [ -d "/jffs" ];then
sleep 30
clashdir=$(cd $(dirname $0);pwd)
if [ -w /etc/profile ];then
profile=/etc/profile
else