Skip to content

Commit

Permalink
v1.3.9-test
Browse files Browse the repository at this point in the history
~本机代理相关逻辑优化及bug修复
~本机代理功能增加对保守模式的支持
~绕过内核功能增加ipset模块检测
~增加对低版本wget命令的支持
~增加了使用内核保存节点列表的逻辑
  • Loading branch information
juewuy committed Jun 16, 2021
1 parent 97cb547 commit d7dd915
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
Binary file modified bin/clashfm.tar.gz
Binary file not shown.
11 changes: 8 additions & 3 deletions install_n.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@ webget(){
[ -z "$4" ] && redirect='-L' || redirect=''
result=$(curl -w %{http_code} --connect-timeout 5 $progress $redirect -ko $1 $2)
else
[ "$3" = "echooff" ] && progress='-q' || progress='-q --show-progress'
if wget --version > /dev/null 2>&1;then
[ "$3" = "echooff" ] && progress='-q' || progress='-q --show-progress'
[ "$4" = "rediroff" ] && redirect='--max-redirect=0' || redirect=''
certificate='--no-check-certificate'
timeout='--timeout=3'
fi
[ "$3" = "echoon" ] && progress=''
[ -z "$4" ] && redirect='' || redirect='--max-redirect=0'
wget -Y on $progress $redirect --no-check-certificate --timeout=5 -O $1 $2
[ "$3" = "echooff" ] && progress='-q'
wget $progress $redirect $certificate $timeout -O $1 $2
[ $? -eq 0 ] && result="200"
fi
}
Expand Down
7 changes: 4 additions & 3 deletions scripts/clash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -489,18 +489,19 @@ localproxy(){
localproxy
else
local_proxy=已开启
$clashdir/start.sh set_proxy $mix_port $db_port
setconfig local_proxy $local_proxy
echo -e "\033[32m已经成功使用$local_type方式配置本机代理~\033[0m"
[ "$local_type" = "环境变量" ] && echo -e "\033[36m如未生效,请重新启动终端或重新连接SSH!\033[0m" && sleep 1
[ "$local_type" = "环境变量" ] && $clashdir/start.sh set_proxy $mix_port $db_port &&echo -e "\033[36m如未生效,请重新启动终端或重新连接SSH!\033[0m" && sleep 1
[ "$local_type" = "iptables增强模式" ] && $clashdir/start.sh start
fi
else
local_proxy=未开启
setconfig local_proxy $local_proxy
$clashdir/start.sh stop
echo -e "\033[33m已经停用本机代理规则并停止clash服务!!\033[0m"
[ "$local_type" = "环境变量" ] && echo -e "\033[36m如未生效,请重新启动终端或重新连接SSH!\033[0m" && sleep 1
fi
setconfig local_proxy $local_proxy

elif [ "$num" = 2 ]; then
local_type="环境变量"
setconfig local_type $local_type
Expand Down
1 change: 1 addition & 0 deletions scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ afstart(){
[ "$redir_mod" != "纯净模式" ] && [ "$dns_no" != "已禁用" ] && start_dns
[ "$redir_mod" != "纯净模式" ] && [ "$redir_mod" != "Tun模式" ] && start_redir
[ "$redir_mod" = "Redir模式" ] && [ "$tproxy_mod" = "已开启" ] && start_udp
[ "$local_proxy" = "已开启" ] && [ "$local_type" = "iptables增强模式" ] && start_output
#标记启动时间
mark_time
#设置本机代理
Expand Down

0 comments on commit d7dd915

Please sign in to comment.