diff --git a/luci-app-omr-bypass/luasrc/model/cbi/omr-bypass.lua b/luci-app-omr-bypass/luasrc/model/cbi/omr-bypass.lua index c3ee50785..4def7d4c7 100644 --- a/luci-app-omr-bypass/luasrc/model/cbi/omr-bypass.lua +++ b/luci-app-omr-bypass/luasrc/model/cbi/omr-bypass.lua @@ -44,11 +44,6 @@ mac.datatype = "list(macaddr)" mac.rmempty = true mac.optional = false -function mac.cfgvalue(self, option) - local val = Value.cfgvalue(self, section) - return ipc.checkmac(val) or val -end - sys.net.host_hints(function(m, v4, v6, name) if m then mac:value(m, "%s (%s)" %{m, name or v4 or v6}) @@ -68,8 +63,8 @@ ip.datatype = "ipaddr" ip.rmempty = true ip.optional = false -ifm = s:option(Value, "interface", translate("Interface")) -ifm.rmempty = true +ifl = s:option(Value, "interface", translate("Interface")) +ifl.rmempty = true s = m:section(TypedSection, "dpis", translate("Protocols")) s.addremove = true @@ -98,10 +93,12 @@ ifd.default = "all" ifi.default = "all" ifp.default = "all" ifm.default = "all" +ifl.default = "all" ifd:value("all",translate("Default")) ifi:value("all",translate("Default")) ifp:value("all",translate("Default")) ifm:value("all",translate("Default")) +ifl:value("all",translate("Default")) for _, iface in ipairs(ifaces) do if iface:is_up() then ifd:value(iface:name(),"%s" % iface:name()) diff --git a/luci-app-omr-bypass/luasrc/view/omr-bypass/bypass.htm b/luci-app-omr-bypass/luasrc/view/omr-bypass/bypass.htm deleted file mode 100644 index 605b4fac7..000000000 --- a/luci-app-omr-bypass/luasrc/view/omr-bypass/bypass.htm +++ /dev/null @@ -1,103 +0,0 @@ -<%+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") - local sys = require "luci.sys" - local ifaces = sys.net:devices() - local bypassif = uci:get("omr-bypass","defaults","ifname") or "" -%> -<% if stderr and #stderr > 0 then %>
<%=pcdata(stderr)%>
<% end %> -
-
-

<%:Bypass%>

-
-

<%:Domains, ips or networks%>

-
-
-
-
<%:Domain, IP or network%>
-
<%:Output interface%>
-
-
-
-
-
- -
-
-
- -
-
-
-
- -
-
-
-

<%:Protocols%>

-
-
-
-
<%:Protocols%>
-
<%:Output interface%>
-
-
-
-
-<% - local allprt="""" - 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 -%> -
-
- -
-
-
- -
-
-
-
- -
-
-
-
- - -
- - -<%+footer%>