<%+header%> <% local uci = require("luci.model.uci").cursor() local net = require "luci.model.network".init() local ifaces = net:get_interfaces() 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 %> <% if stderr and #stderr > 0 then %>
<%=pcdata(stderr)%>
<% end %>

<%:Wizard%>

<%:Server settings%>
<%:Put the values given by OpenMPTCProuter VPS script.%>
<% local k = 0 for _,server in ipairs(servers_ip) do k = k+1 %>
<% end %>
help <%:Server IP will be set for ShadowSocks, Glorytun, OpenVPN and MLVPN%>

" data-type="base64">
help <%:ShadowSocks is used for TCP%>
<% if nixio.fs.access("/usr/sbin/glorytun") or nixio.fs.access("/usr/sbin/glorytun-udp") then %>
">
help <%:Glorytun TCP is used by default for UDP and ICMP%>
<% end %> <% if nixio.fs.access("/usr/sbin/mlvpn") then %>
">
help <%:MLVPN can replace Glorytun with connections with same latency%>
<% end %> <% if nixio.fs.access("/usr/sbin/openvpn") then %>
" />
help <%:You need to upload OpenVPN key file generated by OpenMPTCProuter VPS script to use OpenVPN TCP%>
<% end %>

help <%:Set the default VPN used for UDP and ICMP when ShadowSocks is enabled, for all traffic if ShadowSocks is disabled.%>
<%:Interfaces settings%>
<%:You must disable DHCP on your modems and set IP in different networks.%>
<% for _, iface in ipairs(ifaces) do --if not (iface == "lo" or iface:match("^tun.*")) then local ifname = iface:name() if (ifname:match("^wan.*")) then %>

<%=ifname%>

" data-type="ip4addr">
help <%:Set an IP in the same network as the modem%>
" data-type="ip4addr">
" data-type="ip4addr">
help <%:Set here IP of the modem%>
<% end end %>
<%+footer%>