mirror of
https://github.com/kenzok8/small-package
synced 2025-01-07 07:06:58 +08:00
update 2024-04-21 12:20:15
This commit is contained in:
parent
d3a3e2a3e0
commit
6029e8b4ba
@ -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
|
||||
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"config": "passwall_server",
|
||||
"init": "passwall_server"
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"config": "passwall",
|
||||
"init": "passwall"
|
||||
}
|
@ -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}')
|
||||
|
Loading…
Reference in New Issue
Block a user