update 2024-04-21 12:20:15

This commit is contained in:
kenzok8 2024-04-21 12:20:15 +08:00
parent d3a3e2a3e0
commit 6029e8b4ba
4 changed files with 16 additions and 0 deletions

View File

@ -3,20 +3,24 @@
uci -q batch <<-EOF >/dev/null
set dhcp.@dnsmasq[0].localuse=1
commit dhcp
[ -e "/etc/config/ucitrack" ] && {
delete ucitrack.@passwall[-1]
add ucitrack passwall
set ucitrack.@passwall[-1].init=passwall
commit ucitrack
}
delete firewall.passwall
set firewall.passwall=include
set firewall.passwall.type=script
set firewall.passwall.path=/var/etc/passwall.include
set firewall.passwall.reload=1
commit firewall
[ -e "/etc/config/ucitrack" ] && {
delete ucitrack.@passwall_server[-1]
add ucitrack passwall_server
set ucitrack.@passwall_server[-1].init=passwall_server
commit ucitrack
}
delete firewall.passwall_server
set firewall.passwall_server=include
set firewall.passwall_server.type=script

View File

@ -0,0 +1,4 @@
{
"config": "passwall_server",
"init": "passwall_server"
}

View File

@ -0,0 +1,4 @@
{
"config": "passwall",
"init": "passwall"
}

View File

@ -54,6 +54,7 @@ qos_simple_watch()
dispatch_userinfo_event_fifo "$line"
ip=${line//,*}
idx=0
if test -n "${ip//*:*}"; then
while uci get natflow.@qos_simple[$idx] &>/dev/null; do
disabled=$(uci get natflow.@qos_simple[$idx].disabled 2>/dev/null || echo 0)
if [ "$disabled" = "0" ]; then
@ -69,6 +70,7 @@ qos_simple_watch()
fi
idx=$((idx+1))
done
fi
test -z "${ip//*:*}" && {
mac=$(echo $line | cut -d, -f2)
iface=$(ip -6 neigh show $ip | grep -o "dev .*" | awk '{print $2}')
@ -81,6 +83,7 @@ start() {
cat /dev/userinfo_ctl | while read line; do
ip=${line//,*}
idx=0
if test -n "${ip//*:*}"; then
while uci get natflow.@qos_simple[$idx] &>/dev/null; do
disabled=$(uci get natflow.@qos_simple[$idx].disabled 2>/dev/null || echo 0)
if [ "$disabled" = "0" ]; then
@ -97,6 +100,7 @@ start() {
fi
idx=$((idx+1))
done
fi
test -z "${ip//*:*}" && {
mac=$(echo $line | cut -d, -f2)
iface=$(ip -6 neigh show $ip | grep -o "dev .*" | awk '{print $2}')