mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-07-27 08:31:44 +08:00
update 2026-07-01 01:48:58
This commit is contained in:
parent
7cfc5f3692
commit
7e2e346865
@ -129,10 +129,10 @@ if (match(proxy_mode, /redirect/)) {
|
||||
self_mark = uci.get(uciconfig, 'infra', 'self_mark') || '100';
|
||||
redirect_port = uci.get(uciconfig, 'infra', 'redirect_port') || '5331';
|
||||
}
|
||||
if (match(proxy_mode), /tproxy/)
|
||||
if (match(proxy_mode, /tproxy/))
|
||||
if (main_udp_node !== 'nil' || routing_mode === 'custom')
|
||||
tproxy_port = uci.get(uciconfig, 'infra', 'tproxy_port') || '5332';
|
||||
if (match(proxy_mode), /tun/) {
|
||||
if (match(proxy_mode, /tun/)) {
|
||||
tun_name = uci.get(uciconfig, uciinfra, 'tun_name') || 'singtun0';
|
||||
tun_addr4 = uci.get(uciconfig, uciinfra, 'tun_addr4') || '172.19.0.1/30';
|
||||
tun_addr6 = uci.get(uciconfig, uciinfra, 'tun_addr6') || 'fdfe:dcba:9876::1/126';
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=26.6.2
|
||||
PKG_VERSION:=26.7.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_PO_VERSION:=$(PKG_VERSION)
|
||||
|
||||
|
||||
@ -829,8 +829,19 @@ update_wan_sets() {
|
||||
}
|
||||
}
|
||||
|
||||
set_tproxy_sysctl() {
|
||||
# Disable IPv4 rp_filter for TPROXY compatibility.
|
||||
sysctl -w net.ipv4.conf.all.rp_filter=0 >/dev/null 2>&1
|
||||
sysctl -w net.ipv4.conf.default.rp_filter=0 >/dev/null 2>&1
|
||||
local f
|
||||
for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
|
||||
echo 0 > "$f" 2>/dev/null
|
||||
done
|
||||
}
|
||||
|
||||
add_firewall_rule() {
|
||||
echolog "开始加载 iptables 防火墙规则..."
|
||||
set_tproxy_sysctl
|
||||
ipset -! create $IPSET_LOCAL nethash maxelem 1048576
|
||||
ipset -! create $IPSET_WAN nethash maxelem 1048576
|
||||
ipset -! create $IPSET_LAN nethash maxelem 1048576
|
||||
|
||||
@ -891,11 +891,22 @@ update_wan_sets() {
|
||||
}
|
||||
}
|
||||
|
||||
set_tproxy_sysctl() {
|
||||
# Disable IPv4 rp_filter for TPROXY compatibility.
|
||||
sysctl -w net.ipv4.conf.all.rp_filter=0 >/dev/null 2>&1
|
||||
sysctl -w net.ipv4.conf.default.rp_filter=0 >/dev/null 2>&1
|
||||
local f
|
||||
for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
|
||||
echo 0 > "$f" 2>/dev/null
|
||||
done
|
||||
}
|
||||
|
||||
add_firewall_rule() {
|
||||
echolog "开始加载 nftables 防火墙规则..."
|
||||
gen_nft_tables
|
||||
add_script_mwan3
|
||||
mwan3_start
|
||||
set_tproxy_sysctl
|
||||
gen_nftset $NFTSET_WAN ipv4_addr 0 "-1"
|
||||
gen_nftset $NFTSET_VPS ipv4_addr 0 "-1"
|
||||
gen_nftset $NFTSET_GFW ipv4_addr "2d" 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user