mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix list of available protocols
This commit is contained in:
parent
d90d5ea374
commit
d8f97eaaf7
1 changed files with 13 additions and 5 deletions
|
@ -10,7 +10,6 @@
|
|||
local tmpfile = os.tmpname()
|
||||
local dpi_available_proto = luci.util.execi("cat /proc/net/xt_ndpi/proto | awk '{print $3}' | sort -u | head -n -1")
|
||||
%>
|
||||
|
||||
<% if stderr and #stderr > 0 then %><pre class="error"><%=pcdata(stderr)%></pre><% end %>
|
||||
<form class="inline" method="post" action="<%=url('admin/services/omr-bypass/add')%>">
|
||||
<div class="cbi-map">
|
||||
|
@ -64,12 +63,21 @@
|
|||
<div class="cbi-value cbi-value-last" id="cbi-omr-tracker-dpi" data-depends="[]" data-index="<%=table.getn(dpi)%>">
|
||||
<label class="cbi-value-title" for="cbid.omr-tracker.dpi"><%:Protocol%></label>
|
||||
<div class="cbi-value-field">
|
||||
<%
|
||||
<%
|
||||
local allprt=""""
|
||||
for prt in dpi_available_proto do
|
||||
allprt=allprt .. ","" .. prt .. """
|
||||
local protos = {}
|
||||
for l in io.lines("/proc/net/xt_ndpi/proto") do
|
||||
local a,b,c,d = l:match('(%w+) (%w+)')
|
||||
if b ~= "2" and not string.match(b,"custom") then
|
||||
table.insert(protos,b)
|
||||
end
|
||||
end
|
||||
%>
|
||||
table.sort(protos)
|
||||
for _,b in ipairs(protos) do
|
||||
allprt=allprt .. ","" .. b .. """
|
||||
end
|
||||
%>
|
||||
|
||||
|
||||
<div data-prefix="cbid.omr-bypass.dpi" data-browser-path="" data-dynlist="[[<%=allprt%>],[<%=allprt%>],null,false]">
|
||||
<%
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue