Support to select the device in the configuration
This commit is contained in:
parent
f6a9a790bc
commit
788c5c4732
@ -1,5 +1,6 @@
|
||||
|
||||
local ds = require "luci.dispatcher"
|
||||
local utl = require "luci.util"
|
||||
|
||||
local m, s
|
||||
|
||||
@ -36,7 +37,7 @@ if class_fd then
|
||||
--apps.delimiter=";"
|
||||
-- select
|
||||
apps.widget="checkbox"
|
||||
apps.size=12
|
||||
apps.size=10
|
||||
|
||||
local fd = io.open(path)
|
||||
if fd then
|
||||
@ -108,7 +109,7 @@ users.widget="checkbox"
|
||||
users.size=1
|
||||
|
||||
local fd = io.open("/proc/net/arp", "r")
|
||||
if not fd then return end
|
||||
if not fd then return m end
|
||||
while true do
|
||||
local line = fd:read("*l")
|
||||
if not line then
|
||||
@ -129,6 +130,12 @@ while true do
|
||||
end
|
||||
end
|
||||
|
||||
local config_users=m.uci:get_all("appfilter.user.users")
|
||||
local r=utl.split(config_users, "%s+", nil, true)
|
||||
local max = table.getn(r)
|
||||
for i=1,max,1 do
|
||||
users:value(r[i], r[i]);
|
||||
end
|
||||
m:section(SimpleSection).template = "admin_network/user_status"
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
2017 炉石传说:[tcp;;3724;;;00:73:01:00:02:00]
|
||||
|
||||
#class video
|
||||
3001 抖音短视频:[tcp;;80;-dy-;;,tcp;;;-dy.;;,tcp;;80;douyin;;]
|
||||
3001 抖音短视频:[tcp;;;-dy-;;,tcp;;;-dy.;;,tcp;;;douyin;;]
|
||||
3002 火山小视频:[tcp;;;.huoshan.com;;,tcp;;;hs.pstatp.com;;,tcp;;;hs.ixigua.com;;]
|
||||
3003 腾讯视频:[tcp;;443;v.qq.com;;,tcp;;443;tc.qq.com;;,tcp;;443;video.qq.com;;,tcp;;443;btrace.qq.com;;]
|
||||
3004 爱奇艺:[tcp;;443;iqiyi.com;;,tcp;;443;iqiyi.com;;]
|
||||
|
Loading…
Reference in New Issue
Block a user