Skip to content

Commit

Permalink
Support to select the device in the configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
destan19 committed Jan 21, 2021
1 parent f6a9a79 commit 788c5c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions luci-app-oaf/luasrc/model/cbi/appfilter/appfilter.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

local ds = require "luci.dispatcher"
local utl = require "luci.util"

local m, s

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"


Expand Down
2 changes: 1 addition & 1 deletion open-app-filter/files/feature.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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;;]
Expand Down

0 comments on commit 788c5c4

Please sign in to comment.