update 2023-06-13 23:36:05

This commit is contained in:
github-actions[bot]
2023-06-13 23:36:05 +08:00
parent b178ed3b60
commit 737d460c0c
2 changed files with 17 additions and 2 deletions

View File

@@ -36,9 +36,22 @@ get_rate_data()
echo -n $num # assume num bps echo -n $num # assume num bps
} }
dispatch_userinfo_event_fifo()
{
pgrep -f "sh -c echo .*>/tmp/userinfo_event_fifo" >/dev/null && {
#event fifo is busy
return
}
sh -c "echo $1>/tmp/userinfo_event_fifo" &
return 0
}
qos_simple_watch() qos_simple_watch()
{ {
dispatch_userinfo_event_fifo ""
cat /dev/userinfo_event_ctl 2>/dev/null | while read line; do cat /dev/userinfo_event_ctl 2>/dev/null | while read line; do
dispatch_userinfo_event_fifo "$line"
ip=${line//,*} ip=${line//,*}
idx=0 idx=0
while uci get natflow.@qos_simple[$idx] &>/dev/null; do while uci get natflow.@qos_simple[$idx] &>/dev/null; do
@@ -81,11 +94,13 @@ start() {
done done
done done
test -e /tmp/userinfo_event_fifo || mkfifo /tmp/userinfo_event_fifo
qos_simple_watch & qos_simple_watch &
} }
stop() { stop() {
kill -TERM $(pgrep -f "cat /dev/userinfo_event_ctl") &>/dev/null kill -TERM $(pgrep -f "cat /dev/userinfo_event_ctl") &>/dev/null
kill -TERM $(pgrep -f "sh -c echo .*>/tmp/userinfo_event_fifo") &>/dev/null
cat /dev/userinfo_ctl | while read line; do cat /dev/userinfo_ctl | while read line; do
ip=${line//,*} ip=${line//,*}
echo set-token-ctrl $ip 0 0 >/dev/userinfo_ctl echo set-token-ctrl $ip 0 0 >/dev/userinfo_ctl

View File

@@ -21,13 +21,13 @@ define Download/geoip
HASH:=a3c407051f1e2bbeef98c82372cec8de3ee6d44f645eeb07699bfcaec4ea3f1b HASH:=a3c407051f1e2bbeef98c82372cec8de3ee6d44f645eeb07699bfcaec4ea3f1b
endef endef
GEOSITE_VER:=20230612114846 GEOSITE_VER:=20230613031206
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER) GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
define Download/geosite define Download/geosite
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/ URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
URL_FILE:=dlc.dat URL_FILE:=dlc.dat
FILE:=$(GEOSITE_FILE) FILE:=$(GEOSITE_FILE)
HASH:=e629fb02cca4e1a9d104c991b329b6404f06d5c00fdc26e8df3c57a9acfb156c HASH:=1cd19fcedf30ff22df215c40e7797a36366e63e1e5cb9572c9b16789af1dde64
endef endef
define Package/v2ray-geodata/template define Package/v2ray-geodata/template