1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-12 18:41:51 +00:00

Clean unused code in wizard

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-11-05 10:18:57 +01:00
parent 69e16dc58e
commit 51410ba8aa

View file

@ -7,30 +7,19 @@
local sys = require "luci.sys"
local ut = require "luci.util"
local ifaces = sys.net:devices()
local servers_ip = {}
local server_ip = uci:get("shadowsocks-libev","sss0","server")
if server_ip == '127.0.0.1' then
local upstreams = uci:get("nginx-ha","ShadowSocks","upstreams")
for _, up in pairs(upstreams) do
local a = up:match("^([^:]+):")
table.insert(servers_ip,a)
end
else
table.insert(servers_ip,server_ip)
end
function device_notvirtual(dev)
for _, iface in ipairs(net:get_networks()) do
local ifacen = iface:name()
local ifacename = uci:get("network",ifacen,"ifname")
local ifacetype = uci:get("network",ifacen,"type") or ""
local ifaceproto = uci:get("network",ifacen,"proto") or ""
if ifacename == dev and (ifacetype == "macvlan" or ifacetype == "bridge" or ifaceproto == "6in4") then
return false
function device_notvirtual(dev)
for _, iface in ipairs(net:get_networks()) do
local ifacen = iface:name()
local ifacename = uci:get("network",ifacen,"ifname")
local ifacetype = uci:get("network",ifacen,"type") or ""
local ifaceproto = uci:get("network",ifacen,"proto") or ""
if ifacename == dev and (ifacetype == "macvlan" or ifacetype == "bridge" or ifaceproto == "6in4") then
return false
end
end
return true
end
return true
end
%>
<script type="text/javascript" src="<%=resource%>/cbi.js?v=git-18.243.49640-2f13420" data-strings="{&#34;path&#34;:{&#34;resource&#34;:&#34;\/luci-static\/resources&#34;,&#34;browser&#34;:&#34;\/cgi-bin\/luci\/admin\/filebrowser&#34;}}"></script>