<%+header%> <% local uci = require("luci.model.uci").cursor() local hosts = uci:get_list("dhcp", uci:get_first("dhcp","dnsmasq"), "ipset") local ips = uci:get_list("omr-bypass", "ips", "ip") local dpi = uci:get_list("omr-bypass", "dpi", "proto") 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 %>
<%=pcdata(stderr)%>
<% end %>

<%:Bypass%>

<%:Set domains name, ips or networks you want to bypass.%>
<% local j = 1 for _ , host in pairs(hosts) do j = j+1 for hst in string.gmatch(host,"([^/]*)/") do if hst ~= "" then %>
help <%:You need to use OpenMPTCProuter as DNS server when you want to bypass a domain%>
<% end end end for _ , ip in pairs(ips) do j = j+1 %>
<% end if j == 1 then %>
help <%:You need to use OpenMPTCProuter as DNS server when you want to bypass a domain%>
<% end %>
<%:Set protocols you want to bypass.%>
<% local allprt="""" for prt in dpi_available_proto do allprt=allprt .. ","" .. prt .. """ end %>
<% local k = 1 for _ , proto in pairs(dpi) do k = k+1 %>
<% end if k == 1 then %>
<% end %>
<%+footer%>