Compare commits

...

2 Commits

Author SHA1 Message Date
juewuy
d873678ac6 v1.9.1beta10打包
Some checks failed
core_auto_update / check_version (push) Has been cancelled
bin_update / update (push) Has been cancelled
core_auto_update / auto_update_singboxp_with_wg (push) Has been cancelled
core_auto_update / cleanup (push) Has been cancelled
2024-06-08 09:47:09 +08:00
juewuy
44efdb99ea ~providers功能适配1.9.0+版本singboxp内核
~修复启动时提示ip命令相关报错
2024-06-08 09:46:40 +08:00
7 changed files with 17 additions and 17 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -4,5 +4,5 @@ clash_v=v1.7.1
meta_v=v1.18.5 meta_v=v1.18.5
singboxp_v=1.9.0-5dd2e2da singboxp_v=1.9.0-5dd2e2da
singbox_v=1.9.0 singbox_v=1.9.0
versionsh=1.9.1beta9 versionsh=1.9.1beta10
GeoIP_v=20240601 GeoIP_v=20240601

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# Copyright (C) Juewuy # Copyright (C) Juewuy
version=1.9.1beta9 version=1.9.1beta10
setdir(){ setdir(){
dir_avail(){ dir_avail(){

View File

@ -865,10 +865,10 @@ cn_ip_route() { #CN-IP绕过
ckgeo cn_ip.txt china_ip_list.txt ckgeo cn_ip.txt china_ip_list.txt
[ -f "$BINDIR"/cn_ip.txt ] && [ "$firewall_mod" = iptables ] && { [ -f "$BINDIR"/cn_ip.txt ] && [ "$firewall_mod" = iptables ] && {
# see https://raw.githubusercontent.com/Hackl0us/GeoIP2-CN/release/CN-ip-cidr.txt # see https://raw.githubusercontent.com/Hackl0us/GeoIP2-CN/release/CN-ip-cidr.txt
echo "create cn_ip hash:net family inet hashsize 10240 maxelem 10240" >"$TMPDIR"/cn_ip.ipset echo "create cn_ip hash:net family inet hashsize 10240 maxelem 10240" > "$TMPDIR"/cn_ip.ipset
awk '!/^$/&&!/^#/{printf("add cn_ip %s'" "'\n",$0)}' "$BINDIR"/cn_ip.txt >>"$TMPDIR"/cn_ip.ipset awk '!/^$/&&!/^#/{printf("add cn_ip %s'" "'\n",$0)}' "$BINDIR"/cn_ip.txt >> "$TMPDIR"/cn_ip.ipset
ipset destroy cn_ip >/dev/null 2>&1 ipset destroy cn_ip >/dev/null 2>&1
ipset -! restore <"$TMPDIR"/cn_ip.ipset ipset -! restore < "$TMPDIR"/cn_ip.ipset
rm -rf "$TMPDIR"/cn_ip.ipset rm -rf "$TMPDIR"/cn_ip.ipset
} }
} }
@ -877,10 +877,10 @@ cn_ipv6_route() { #CN-IPV6绕过
[ -f "$BINDIR"/cn_ipv6.txt ] && [ "$firewall_mod" = iptables ] && { [ -f "$BINDIR"/cn_ipv6.txt ] && [ "$firewall_mod" = iptables ] && {
#ipv6 #ipv6
#see https://ispip.clang.cn/all_cn_ipv6.txt #see https://ispip.clang.cn/all_cn_ipv6.txt
echo "create cn_ip6 hash:net family inet6 hashsize 5120 maxelem 5120" >"$TMPDIR"/cn_ipv6.ipset echo "create cn_ip6 hash:net family inet6 hashsize 5120 maxelem 5120" > "$TMPDIR"/cn_ipv6.ipset
awk '!/^$/&&!/^#/{printf("add cn_ip6 %s'" "'\n",$0)}' "$BINDIR"/cn_ipv6.txt >>"$TMPDIR"/cn_ipv6.ipset awk '!/^$/&&!/^#/{printf("add cn_ip6 %s'" "'\n",$0)}' "$BINDIR"/cn_ipv6.txt >> "$TMPDIR"/cn_ipv6.ipset
ipset destroy cn_ip6 >/dev/null 2>&1 ipset destroy cn_ip6 >/dev/null 2>&1
ipset -! restore <"$TMPDIR"/cn_ipv6.ipset ipset -! restore < "$TMPDIR"/cn_ipv6.ipset
rm -rf "$TMPDIR"/cn_ipv6.ipset rm -rf "$TMPDIR"/cn_ipv6.ipset
} }
} }
@ -1253,7 +1253,7 @@ start_firewall() { #路由规则总入口
#设置策略路由 #设置策略路由
[ "$firewall_area" != 4 ] && { [ "$firewall_area" != 4 ] && {
local table=100 local table=100
[ "$redir_mod" = "Tproxy模式" ] && ip route add local default dev lo table $table [ "$redir_mod" = "Tproxy模式" ] && ip route add local default dev lo table $table 2>/dev/null
[ "$redir_mod" = "Tun模式" -o "$redir_mod" = "混合模式" ] && { [ "$redir_mod" = "Tun模式" -o "$redir_mod" = "混合模式" ] && {
i=1 i=1
while [ -z "$(ip route list | grep utun)" -a "$i" -le 29 ]; do while [ -z "$(ip route list | grep utun)" -a "$i" -le 29 ]; do
@ -1266,14 +1266,14 @@ start_firewall() { #路由规则总入口
ip route add default dev utun table $table && tun_statu=true ip route add default dev utun table $table && tun_statu=true
fi fi
} }
[ "$firewall_area" = 5 ] && ip route add default via $bypass_host table $table [ "$firewall_area" = 5 ] && ip route add default via $bypass_host table $table 2>/dev/null
[ "$redir_mod" != "Redir模式" ] && ip rule add fwmark $fwmark table $table [ "$redir_mod" != "Redir模式" ] && ip rule add fwmark $fwmark table $table 2>/dev/null
} }
#添加ipv6路由 #添加ipv6路由
[ "$ipv6_redir" = "已开启" -a "$firewall_area" -le 3 ] && { [ "$ipv6_redir" = "已开启" -a "$firewall_area" -le 3 ] && {
[ "$redir_mod" = "Tproxy模式" ] && ip -6 route add local default dev lo table $((table + 1)) [ "$redir_mod" = "Tproxy模式" ] && ip -6 route add local default dev lo table $((table + 1)) 2>/dev/null
[ -n "$(ip route list | grep utun)" ] && ip -6 route add default dev utun table $((table + 1)) [ -n "$(ip route list | grep utun)" ] && ip -6 route add default dev utun table $((table + 1)) 2>/dev/null
[ "$redir_mod" != "Redir模式" ] && ip -6 rule add fwmark $fwmark table $((table + 1)) [ "$redir_mod" != "Redir模式" ] && ip -6 rule add fwmark $fwmark table $((table + 1)) 2>/dev/null
} }
#判断代理用途 #判断代理用途
[ "$firewall_area" = 2 -o "$firewall_area" = 3 ] && [ -n "$(grep '0:7890' /etc/passwd)" ] && local_proxy=true [ "$firewall_area" = 2 -o "$firewall_area" = 3 ] && [ -n "$(grep '0:7890' /etc/passwd)" ] && local_proxy=true

View File

@ -347,7 +347,7 @@ gen_clash_providers(){ #生成clash的providers配置文件
fi fi
cat >> $TMPDIR/providers/providers.yaml <<EOF cat >> $TMPDIR/providers/providers.yaml <<EOF
${1}: ${1}:
type: http type: $type
url: "$download_url" url: "$download_url"
path: "$path" path: "$path"
interval: 43200 interval: 43200
@ -432,7 +432,7 @@ gen_singbox_providers(){ #生成singbox的providers配置文件
cat >> ${TMPDIR}/providers/providers.json <<EOF cat >> ${TMPDIR}/providers/providers.json <<EOF
{ {
"tag": "${1}", "tag": "${1}",
"type": "file", "type": "local",
"healthcheck_url": "https://www.gstatic.com/generate_204", "healthcheck_url": "https://www.gstatic.com/generate_204",
"healthcheck_interval": "10m", "healthcheck_interval": "10m",
"path": "${2}" "path": "${2}"
@ -442,7 +442,7 @@ EOF
cat >> ${TMPDIR}/providers/providers.json <<EOF cat >> ${TMPDIR}/providers/providers.json <<EOF
{ {
"tag": "${1}", "tag": "${1}",
"type": "http", "type": "remote",
"healthcheck_url": "https://www.gstatic.com/generate_204", "healthcheck_url": "https://www.gstatic.com/generate_204",
"healthcheck_interval": "10m", "healthcheck_interval": "10m",
"download_url": "${2}", "download_url": "${2}",