mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-13 02:51:50 +00:00
Clean unused code in wizard
This commit is contained in:
parent
69e16dc58e
commit
51410ba8aa
1 changed files with 10 additions and 21 deletions
|
@ -7,30 +7,19 @@
|
||||||
local sys = require "luci.sys"
|
local sys = require "luci.sys"
|
||||||
local ut = require "luci.util"
|
local ut = require "luci.util"
|
||||||
local ifaces = sys.net:devices()
|
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)
|
function device_notvirtual(dev)
|
||||||
for _, iface in ipairs(net:get_networks()) do
|
for _, iface in ipairs(net:get_networks()) do
|
||||||
local ifacen = iface:name()
|
local ifacen = iface:name()
|
||||||
local ifacename = uci:get("network",ifacen,"ifname")
|
local ifacename = uci:get("network",ifacen,"ifname")
|
||||||
local ifacetype = uci:get("network",ifacen,"type") or ""
|
local ifacetype = uci:get("network",ifacen,"type") or ""
|
||||||
local ifaceproto = uci:get("network",ifacen,"proto") or ""
|
local ifaceproto = uci:get("network",ifacen,"proto") or ""
|
||||||
if ifacename == dev and (ifacetype == "macvlan" or ifacetype == "bridge" or ifaceproto == "6in4") then
|
if ifacename == dev and (ifacetype == "macvlan" or ifacetype == "bridge" or ifaceproto == "6in4") then
|
||||||
return false
|
return false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
%>
|
%>
|
||||||
<script type="text/javascript" src="<%=resource%>/cbi.js?v=git-18.243.49640-2f13420" data-strings="{"path":{"resource":"\/luci-static\/resources","browser":"\/cgi-bin\/luci\/admin\/filebrowser"}}"></script>
|
<script type="text/javascript" src="<%=resource%>/cbi.js?v=git-18.243.49640-2f13420" data-strings="{"path":{"resource":"\/luci-static\/resources","browser":"\/cgi-bin\/luci\/admin\/filebrowser"}}"></script>
|
||||||
|
|
Loading…
Reference in a new issue