From 9432081ec4a42978155c135709a74bfe1278612f Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 1 Feb 2021 16:21:58 +0100 Subject: [PATCH] Fix wizard --- .../luasrc/controller/openmptcprouter.lua | 5 ++++- .../luasrc/view/openmptcprouter/wizard.htm | 14 ++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua index 4f06cff5b..d64b41986 100644 --- a/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua +++ b/luci-app-openmptcprouter/luasrc/controller/openmptcprouter.lua @@ -246,7 +246,7 @@ function wizard_add() ucic:set("network",intf,"type",typeintf) end if vlan ~= "" then - ifname=ifname .. '.' .. vlan + ifname = ifname .. '.' .. vlan end if typeintf == "macvlan" and masterintf ~= "" then ucic:set("network",intf,"type","macvlan") @@ -905,6 +905,9 @@ function settings_add() -- Enable/disable debug local debug = luci.http.formvalue("debug") or "0" ucic:set("openmptcprouter","settings","debug",debug) + ucic:foreach("shadowsocks-libev", "ss_redir", function (section) + ucic:set("shadowsocks-libev",section[".name"],"verbose",debug) + end) -- Enable/disable vnstat backup local savevnstat = luci.http.formvalue("savevnstat") or "0" diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index ad0762c8d..24c67a126 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -549,26 +549,24 @@ <% iffind=0 uciifname=uci:get("network",ifname,"ifname") - ifname=splitstring(uciifname,'.')[1] or "" + realifname=splitstring(uciifname,'.')[1] or "" vlan=splitstring(uciifname,'.')[2] or "" for _, ifacea in ipairs(ifaces) do if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea == "mlvpn0" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*") or ifacea:match("^tun.*")) and device_notvirtual(ifacea) then %> - + <% end end - if iffind == 0 and uci:get("network",ifname,"ifname") ~= nil then + if iffind == 0 and uciifname ~= nil then %> - + <% end %> - - -
- + +
<%:Choose physical interface.%>