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 tmpfile = os.tmpname()
|
||||||
local dpi_available_proto = luci.util.execi("cat /proc/net/xt_ndpi/proto | awk '{print $3}' | sort -u | head -n -1")
|
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 %>
|
<% 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')%>">
|
<form class="inline" method="post" action="<%=url('admin/services/omr-bypass/add')%>">
|
||||||
<div class="cbi-map">
|
<div class="cbi-map">
|
||||||
|
@ -66,11 +65,20 @@
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<%
|
<%
|
||||||
local allprt=""""
|
local allprt=""""
|
||||||
for prt in dpi_available_proto do
|
local protos = {}
|
||||||
allprt=allprt .. ","" .. prt .. """
|
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
|
end
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
|
||||||
<div data-prefix="cbid.omr-bypass.dpi" data-browser-path="" data-dynlist="[[<%=allprt%>],[<%=allprt%>],null,false]">
|
<div data-prefix="cbid.omr-bypass.dpi" data-browser-path="" data-dynlist="[[<%=allprt%>],[<%=allprt%>],null,false]">
|
||||||
<%
|
<%
|
||||||
local k = 1
|
local k = 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue