~重写iptables/ip6tables,优化各种模式下网段获取,防止回环,防止内网数据暴露
~优化nftables,防止内网数据暴露
~适配小米万兆路由,增加安装时目录选项
~本地安装内核优化,支持clash.meta文件名
~修复部分linux设备无法设置systemd启动的bug
This commit is contained in:
juewuy
2023-04-02 19:46:08 +08:00
parent cac9d8534c
commit c8f7e352c6
7 changed files with 183 additions and 169 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright (C) Juewuy
version=1.7.3b
version=1.7.4
setdir(){
dir_avail(){
@@ -152,9 +152,9 @@ if [ -f /etc/rc.common ];then
cp -f $clashdir/clashservice /etc/init.d/clash
chmod 755 /etc/init.d/clash
else
[ "$(pidof systemd)" = 1 ] && [ -w /etc/systemd/system ] && sysdir=/etc/systemd/system
[ "$(pidof systemd)" = 1 ] && [ -w /usr/lib/systemd/system ] && sysdir=/usr/lib/systemd/system
if [ -n "$sysdir" ];then
[ -w /etc/systemd/system ] && sysdir=/etc/systemd/system
[ -w /usr/lib/systemd/system ] && sysdir=/usr/lib/systemd/system
if [ -n "$sysdir" -a -z "$WSL_DISTRO_NAME" ];then #wsl环境不使用systemd
#设为systemd方式启动
mv -f $clashdir/clash.service $sysdir/clash.service 2>/dev/null
sed -i "s%/etc/clash%$clashdir%g" $sysdir/clash.service