mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-14 19:41:51 +00:00
Change wizard interface, add VPS admin support,...
This commit is contained in:
parent
7f8f15b6fa
commit
0c54e920d8
11 changed files with 402 additions and 238 deletions
|
@ -197,6 +197,9 @@ right connector from last child*/
|
|||
height: 30px;
|
||||
z-index: -10;
|
||||
}
|
||||
.remote-from-lease a {
|
||||
height: 90px;
|
||||
}
|
||||
.tree li#networkRootNode {
|
||||
padding: 25px 0 0 0;
|
||||
}
|
||||
|
@ -242,6 +245,7 @@ Thanks :)*/
|
|||
width: 400px;
|
||||
max-width: 400px;
|
||||
box-sizing: border-box;
|
||||
height: 170px;
|
||||
}
|
||||
.network-node .equipment-icon {
|
||||
position: relative;
|
||||
|
@ -301,4 +305,19 @@ Thanks :)*/
|
|||
}
|
||||
#networkRootNode table td {
|
||||
border-top: 0px;
|
||||
}
|
||||
.vertdash {
|
||||
width:5px;
|
||||
border-right:2px dotted black;
|
||||
height:70px;
|
||||
padding-right: 195px;
|
||||
}
|
||||
#omr {
|
||||
height: 190px;
|
||||
}
|
||||
#omr-vps {
|
||||
height: 160px;
|
||||
}
|
||||
.space {
|
||||
height: 55px;
|
||||
}
|
BIN
luci-app-openmptcprouter/htdocs/luci-static/resources/server.png
Normal file
BIN
luci-app-openmptcprouter/htdocs/luci-static/resources/server.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -17,8 +17,6 @@ function index()
|
|||
entry({"admin", "system", "openmptcprouter", "interfaces_status"}, call("interfaces_status")).leaf = true
|
||||
entry({"admin", "system", "openmptcprouter", "settings"}, template("openmptcprouter/settings"), _("Advanced Settings"), 3).leaf = true
|
||||
entry({"admin", "system", "openmptcprouter", "settings_add"}, post("settings_add")).leaf = true
|
||||
entry({"admin", "system", "openmptcprouter", "mptcp_check"}, template("openmptcprouter/mptcp_check"), _("MPTCP Support Check"), 3).leaf = true
|
||||
entry({"admin", "system", "openmptcprouter", "mptcp_check_trace"}, post("mptcp_check_trace")).leaf = true
|
||||
end
|
||||
|
||||
function interface_from_device(dev)
|
||||
|
@ -127,16 +125,20 @@ function wizard_add()
|
|||
ucic:save("qos")
|
||||
ucic:commit("qos")
|
||||
luci.sys.call("uci -q del_list vnstat.@vnstat[-1].interface=" .. intf)
|
||||
gostatus = false
|
||||
end
|
||||
gostatus = false
|
||||
end
|
||||
|
||||
-- Set interfaces settings
|
||||
local interfaces = luci.http.formvaluetable("intf")
|
||||
for intf, _ in pairs(interfaces) do
|
||||
local proto = luci.http.formvalue("cbid.network.%s.proto" % intf) or "static"
|
||||
local ipaddr = luci.http.formvalue("cbid.network.%s.ipaddr" % intf) or ""
|
||||
local netmask = luci.http.formvalue("cbid.network.%s.netmask" % intf) or ""
|
||||
local gateway = luci.http.formvalue("cbid.network.%s.gateway" % intf) or ""
|
||||
if proto ~= "other" then
|
||||
ucic:set("network",intf,"proto",proto)
|
||||
end
|
||||
ucic:set("network",intf,"ipaddr",ipaddr)
|
||||
ucic:set("network",intf,"netmask",netmask)
|
||||
ucic:set("network",intf,"gateway",gateway)
|
||||
|
@ -193,9 +195,6 @@ function wizard_add()
|
|||
ucic:save("network")
|
||||
ucic:commit("network")
|
||||
end
|
||||
ucic:set("openmptcprouter","settings","vpn",default_vpn)
|
||||
ucic:save("openmptcprouter")
|
||||
ucic:commit("openmptcprouter")
|
||||
|
||||
-- Get all servers ips
|
||||
local server_ip = luci.http.formvalue("server_ip") or ""
|
||||
|
@ -246,6 +245,8 @@ function wizard_add()
|
|||
ucic:set("shadowsocks-libev","sss0","server",server_ip)
|
||||
ucic:save("shadowsocks-libev")
|
||||
ucic:commit("shadowsocks-libev")
|
||||
ucic:set("openmptcprouter","vps","ip",server_ip)
|
||||
ucic:save("openmptcprouter")
|
||||
end
|
||||
ucic:set("glorytun","vpn","host",server_ip)
|
||||
ucic:save("glorytun")
|
||||
|
@ -265,16 +266,17 @@ function wizard_add()
|
|||
|
||||
-- Set ShadowSocks settings
|
||||
local shadowsocks_key = luci.http.formvalue("shadowsocks_key")
|
||||
local shadowsocks_disable = luci.http.formvalue("disableshadowsocks") or "0"
|
||||
if shadowsocks_key ~= "" then
|
||||
ucic:set("shadowsocks-libev","sss0","key",shadowsocks_key)
|
||||
ucic:set("shadowsocks-libev","sss0","method","chacha20")
|
||||
ucic:set("shadowsocks-libev","sss0","server_port","65101")
|
||||
ucic:set("shadowsocks-libev","sss0","disabled",0)
|
||||
ucic:set("shadowsocks-libev","sss0","disabled",shadowsocks_disable)
|
||||
ucic:save("shadowsocks-libev")
|
||||
ucic:commit("shadowsocks-libev")
|
||||
else
|
||||
ucic:set("shadowsocks-libev","sss0","key","")
|
||||
ucic:set("shadowsocks-libev","sss0","disabled",1)
|
||||
ucic:set("shadowsocks-libev","sss0","disabled",shadowsocks_disable)
|
||||
ucic:save("shadowsocks-libev")
|
||||
ucic:commit("shadowsocks-libev")
|
||||
luci.sys.call("/etc/init.d/shadowsocks rules_down >/dev/null 2>/dev/null")
|
||||
|
@ -331,7 +333,7 @@ function wizard_add()
|
|||
ucic:save("mlvpn")
|
||||
ucic:commit("mlvpn")
|
||||
else
|
||||
ucic:set("mlvpn","general","enable",0)
|
||||
--ucic:set("mlvpn","general","enable",0)
|
||||
ucic:set("mlvpn","general","password","")
|
||||
ucic:save("mlvpn")
|
||||
ucic:commit("mlvpn")
|
||||
|
@ -368,8 +370,23 @@ function wizard_add()
|
|||
ucic:commit("openvpn")
|
||||
end
|
||||
|
||||
-- OpenMPTCProuter VPS
|
||||
local openmptcprouter_vps_key = luci.http.formvalue("openmptcprouter_vps_key") or ""
|
||||
ucic:set("openmptcprouter","vps","username","openmptcprouter")
|
||||
ucic:set("openmptcprouter","vps","password",openmptcprouter_vps_key)
|
||||
ucic:set("openmptcprouter","vps","get_config","1")
|
||||
local shadowsocks_disable = luci.http.formvalue("disableshadowsocks") or "0"
|
||||
ucic:set("openmptcprouter","settings","shadowsocks_disable",shadowsocks_disable)
|
||||
ucic:set("openmptcprouter","settings","vpn",default_vpn)
|
||||
ucic:save("openmptcprouter")
|
||||
ucic:commit("openmptcprouter")
|
||||
|
||||
-- Restart all
|
||||
luci.sys.call("(env -i /bin/ubus call network reload) >/dev/null 2>/dev/null")
|
||||
if openmptcprouter_vps_key ~= "" then
|
||||
luci.sys.call("/etc/init.d/openmptcprouter-vps restart >/dev/null 2>/dev/null")
|
||||
os.execute("sleep 2")
|
||||
end
|
||||
luci.sys.call("/etc/init.d/shadowsocks restart >/dev/null 2>/dev/null")
|
||||
luci.sys.call("/etc/init.d/glorytun restart >/dev/null 2>/dev/null")
|
||||
luci.sys.call("/etc/init.d/glorytun-udp restart >/dev/null 2>/dev/null")
|
||||
|
@ -384,6 +401,10 @@ function wizard_add()
|
|||
end
|
||||
|
||||
function settings_add()
|
||||
-- Redirects all ports from VPS to OpenMPTCProuter
|
||||
local redirect_ports = luci.http.formvalue("redirect_ports") or "0"
|
||||
ucic:set("openmptcprouter","vps","redirect_ports",redirect_ports)
|
||||
|
||||
-- Set tcp_keepalive_time
|
||||
local tcp_keepalive_time = luci.http.formvalue("tcp_keepalive_time")
|
||||
luci.sys.exec("sysctl -w net.ipv4.tcp_keepalive_time=%s" % tcp_keepalive_time)
|
||||
|
@ -514,6 +535,7 @@ function interfaces_status()
|
|||
mArray.openmptcprouter = {}
|
||||
--mArray.openmptcprouter["version"] = ut.trim(sys.exec("cat /etc/os-release | grep VERSION= | sed -e 's:VERSION=::'"))
|
||||
mArray.openmptcprouter["version"] = uci:get("openmptcprouter", "settings", "version") or ut.trim(sys.exec("cat /etc/os-release | grep VERSION= | sed -e 's:VERSION=::' -e 's/^.//' -e 's/.$//'"))
|
||||
mArray.openmptcprouter["vps_omr_version"] = uci:get("openmptcprouter", "vps", "omr_version") or ""
|
||||
|
||||
mArray.openmptcprouter["latest_version_omr"] = uci:get("openmptcprouter", "latest_versions", "omr") or ""
|
||||
mArray.openmptcprouter["latest_version_vps"] = uci:get("openmptcprouter", "latest_versions", "vps") or ""
|
||||
|
@ -540,7 +562,7 @@ function interfaces_status()
|
|||
local tracker_ip = ""
|
||||
if mArray.openmptcprouter["dns"] == true then
|
||||
-- shadowsocksaddr
|
||||
mArray.openmptcprouter["ss_addr"] = uci:get("openmptcprouter","vps","ipv4") or ""
|
||||
mArray.openmptcprouter["ss_addr"] = uci:get("openmptcprouter","vps","public_detected_ipv4") or ""
|
||||
if mArray.openmptcprouter["ss_addr"] == "" then
|
||||
tracker_ip = uci:get("shadowsocks-libev","tracker","local_address") or ""
|
||||
if tracker_ip ~= "" then
|
||||
|
@ -552,7 +574,7 @@ function interfaces_status()
|
|||
-- wanaddr
|
||||
mArray.openmptcprouter["wan_addr"] = sys.exec("wget -4 -qO- -T 1 http://ip.openmptcprouter.com")
|
||||
if mArray.openmptcprouter["ipv6"] == "enabled" then
|
||||
mArray.openmptcprouter["wan_addr6"] = uci:get("openmptcprouter","vps","ipv6") or ""
|
||||
mArray.openmptcprouter["wan_addr6"] = uci:get("openmptcprouter","vps","public_detected_ipv6") or ""
|
||||
if mArray.openmptcprouter["wan_addr6"] == "" then
|
||||
mArray.openmptcprouter["wan_addr6"] = sys.exec("wget -6 -qO- -T 1 http://ipv6.openmptcprouter.com")
|
||||
end
|
||||
|
@ -569,6 +591,11 @@ function interfaces_status()
|
|||
end
|
||||
end
|
||||
|
||||
-- Get VPS info
|
||||
mArray.openmptcprouter["vps_kernel"] = uci:get("openmptcprouter","vps","kernel") or ""
|
||||
mArray.openmptcprouter["vps_machine"] = uci:get("openmptcprouter","vps","machine") or ""
|
||||
mArray.openmptcprouter["vps_omr_version"] = uci:get("openmptcprouter","vps","omr_version") or ""
|
||||
|
||||
-- Check openmptcprouter service are running
|
||||
mArray.openmptcprouter["tun_service"] = false
|
||||
mArray.openmptcprouter["tun_state"] = ""
|
||||
|
@ -659,6 +686,8 @@ function interfaces_status()
|
|||
mArray.openmptcprouter["loadavg"] = sys.exec("cat /proc/loadavg 2>/dev/null"):match("[%d%.]+ [%d%.]+ [%d%.]+")
|
||||
mArray.openmptcprouter["uptime"] = sys.exec("cat /proc/uptime 2>/dev/null"):match("[%d%.]+")
|
||||
|
||||
|
||||
mArray.openmptcprouter["vps_status"] = "DOWN"
|
||||
-- overview status
|
||||
mArray.wans = {}
|
||||
mArray.tunnels = {}
|
||||
|
@ -753,6 +782,7 @@ function interfaces_status()
|
|||
connectivity = "WARNING"
|
||||
end
|
||||
else
|
||||
mArray.openmptcprouter["vps_status"] = "UP"
|
||||
server_ping = "UP"
|
||||
latency = ut.trim(sys.exec("echo '" .. server_ping_test .. "' | cut -d '/' -s -f5 | cut -d '.' -f1"))
|
||||
end
|
||||
|
@ -927,29 +957,6 @@ function _ipv6_discover(interface)
|
|||
return ra6_result
|
||||
end
|
||||
|
||||
function mptcp_check_trace(iface)
|
||||
luci.http.prepare_content("text/plain")
|
||||
local tracebox
|
||||
local uci = require "luci.model.uci".cursor()
|
||||
local interface = get_device(iface)
|
||||
local server = uci:get("shadowsocks-libev", "sss0", "server") or ""
|
||||
if server == "" then return end
|
||||
if interface == "" then
|
||||
tracebox = io.popen("tracebox -s /usr/share/tracebox/omr-mptcp-trace.lua " .. server)
|
||||
else
|
||||
tracebox = io.popen("tracebox -s /usr/share/tracebox/omr-mptcp-trace.lua -i " .. interface .. " " .. server)
|
||||
end
|
||||
if tracebox then
|
||||
while true do
|
||||
local ln = tracebox:read("*l")
|
||||
if not ln then break end
|
||||
luci.http.write(ln)
|
||||
luci.http.write("\n")
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
function set_ipv6_state(disable_ipv6)
|
||||
-- Disable/Enable IPv6 support
|
||||
luci.sys.exec("sysctl -w net.ipv6.conf.all.disable_ipv6=%s" % disable_ipv6)
|
||||
|
@ -980,16 +987,16 @@ function set_ipv6_state(disable_ipv6)
|
|||
else
|
||||
-- ucic:set("dhcp","lan","dhcpv6","server")
|
||||
-- ucic:set("dhcp","lan","ra","server")
|
||||
-- ucic:set("dhcp","lan","ra_default","0")
|
||||
-- ucic:set("dhcp","lan","ra_default","1")
|
||||
ucic:set("shadowsocks-libev","hi","local_address","::")
|
||||
end
|
||||
ucic:save("dhcp")
|
||||
ucic:commit("dhcp")
|
||||
if disable_ipv6 == "1" then
|
||||
luci.sys.exec("/etc/init.d/odhcpd stop >/dev/null 2>&1")
|
||||
luci.sys.exec("/etc/init.d/odhcpd disable >/dev/null 2>&1")
|
||||
--if disable_ipv6 == "1" then
|
||||
-- luci.sys.exec("/etc/init.d/odhcpd stop >/dev/null 2>&1")
|
||||
-- luci.sys.exec("/etc/init.d/odhcpd disable >/dev/null 2>&1")
|
||||
--else
|
||||
-- luci.sys.exec("/etc/init.d/odhcpd start >/dev/null 2>&1")
|
||||
-- luci.sys.exec("/etc/init.d/odhcpd enable >/dev/null 2>&1")
|
||||
end
|
||||
--end
|
||||
end
|
|
@ -1,73 +0,0 @@
|
|||
<%+header%>
|
||||
|
||||
<%
|
||||
local uci = require("luci.model.uci").cursor()
|
||||
local sys = require "luci.sys"
|
||||
local ifaces = sys.net:devices()
|
||||
local net = require "luci.model.network".init()
|
||||
%>
|
||||
|
||||
<script type="text/javascript" src="<%=resource%>/cbi.js?v=git-18.193.28471-ee087a1"></script>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
var stxhr = new XHR();
|
||||
|
||||
function update_mptcp(interface)
|
||||
{
|
||||
var trace = document.getElementById('tracebox');
|
||||
|
||||
if (trace)
|
||||
{
|
||||
trace.innerHTML =
|
||||
'<img src="<%=resource%>/icons/loading.gif" alt="<%:Loading%>" style="vertical-align:middle" /> ' + '<%:Waiting for command to complete...%>'
|
||||
;
|
||||
|
||||
stxhr.post('<%=url('admin/system/openmptcprouter')%>/mptcp_check_trace/' + interface, { token: '<%=token%>' },
|
||||
function(x)
|
||||
{
|
||||
if (x.responseText)
|
||||
{
|
||||
trace.innerHTML = String.format('<pre>%s</pre>', x.responseText );
|
||||
} else {
|
||||
trace.innerHTML = '<pre><%:Error%></pre>';
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
//]]></script>
|
||||
|
||||
<% if stderr and #stderr > 0 then %><pre class="error"><%=pcdata(stderr)%></pre><% end %>
|
||||
<form class="inline" method="post" action="<%=url('admin/system/openmptcprouter/mptcp_check_trace')%>">
|
||||
<div class="cbi-map">
|
||||
<h2 name="content"><%:MPTCP Support Check%></h2>
|
||||
<div class="cbi-map-descr"><%:Check if MPTCP between interface and server is working.%></div>
|
||||
<fieldset class="cbi-section" id="networks">
|
||||
<legend><%:Settings%></legend>
|
||||
<div class="cbi-section-descr"></div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Interface%></label>
|
||||
<div class="cbi-value-field">
|
||||
<select class="cbi-input-select" name="interface" size="1">
|
||||
<%
|
||||
for _, iface in ipairs(net:get_networks()) do
|
||||
local ifname = iface:name()
|
||||
local multipath = uci:get("network",ifname,"multipath")
|
||||
if multipath ~= "off" then
|
||||
%>
|
||||
<option value="<%=ifname%>"><%=ifname%></option>
|
||||
<%
|
||||
end
|
||||
end
|
||||
%>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<input type="button" value="<%:Test%>" class="cbi-button cbi-button-apply" onclick="update_mptcp(this.form.interface.value)" />
|
||||
</fieldset>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="cbi-section">
|
||||
<span id="tracebox"></span>
|
||||
</div>
|
||||
<%+footer%>
|
|
@ -5,6 +5,26 @@
|
|||
<div class="cbi-map">
|
||||
<h2 name="content"><%:Advanced Settings%></h2>
|
||||
<fieldset class="cbi-section" id="networks">
|
||||
<legend><%:VPS settings%></legend>
|
||||
<div class="cbi-section-descr"></div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Redirects all ports from VPS to OpenMPTCProuter%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" name="redirect_ports" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter","vps","redirect_ports") == "1" then %>checked<% end %>>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Enable ShadowSocks OBFS%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" name="obfs" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("shadowsocks-libev","tracker","obfs") == "1" then %>checked<% end %>>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:OBFS will be enabled on both side%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="cbi-section" id="networks">
|
||||
<legend><%:Networks settings%></legend>
|
||||
<div class="cbi-section-descr"></div>
|
||||
<div class="cbi-value">
|
||||
|
@ -35,16 +55,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Enable ShadowSocks OBFS%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" name="obfs" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("shadowsocks-libev","tracker","obfs") == "1" then %>checked<% end %>>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:OBFS must be enabled on VPS%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% if nixio.fs.access("/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq") then %>
|
||||
<fieldset class="cbi-section" id="system">
|
||||
|
|
|
@ -22,7 +22,13 @@
|
|||
-- Copyright 2018 Ycarus (Yannick Chabanois) ycarus@zugaina.org
|
||||
--
|
||||
-- Small changes to make this work with OpenMPTCProuter
|
||||
-- New features: DNS detection, IPv6 route received,...
|
||||
-- New features:
|
||||
-- * DNS detection
|
||||
-- * IPv6 route received
|
||||
-- * latest version available
|
||||
-- * MPTCP server status
|
||||
-- * Server status, errors,icon,...
|
||||
-- * Many tests
|
||||
-%>
|
||||
<%+header%>
|
||||
<link rel="stylesheet" type="text/css" href="<%=resource%>/openmptcprouter/css/wanstatus.css?v=git-18.120.38690-2678b12"/>
|
||||
|
@ -37,35 +43,45 @@
|
|||
{
|
||||
mArray.openmptcprouter.wan_addr=replaceLastNChars(mArray.openmptcprouter.wan_addr,"x",6);
|
||||
mArray.openmptcprouter.wan_addr6=replaceLastNChars(mArray.openmptcprouter.wan_addr6,"x",10);
|
||||
mArray.openmptcprouter.service_addr=replaceLastNChars(mArray.openmptcprouter.service_addr,"x",6);
|
||||
}
|
||||
var status = document.getElementById('openmptcprouter_status');
|
||||
var stepbar = false;
|
||||
var temp = '<figure class="tree">';
|
||||
temp += '<ul>';
|
||||
if (mArray.openmptcprouter)
|
||||
{
|
||||
temp += '<li class="remote-from-lease">';
|
||||
temp += '<a href="#">';
|
||||
|
||||
var equipmentIcon = '<img src="<%=resource%>/computer.png" />';
|
||||
if (mArray.openmptcprouter.remote_from_lease)
|
||||
{
|
||||
if (stepbar)
|
||||
stepbar.securedNetwork.status = "done";
|
||||
temp += '<li class="remote-from-lease">';
|
||||
temp += '<a href="#">';
|
||||
|
||||
var equipmentIcon = '<img src="<%=resource%>/computer.png" />';
|
||||
var title = String.format('<br /><strong>%s (%s)</strong>', mArray.openmptcprouter.remote_hostname ? mArray.openmptcprouter.remote_hostname : 'You', mArray.openmptcprouter.remote_addr)
|
||||
var statusMessageClass = "";
|
||||
var statusIcon = "<%=resource%>/openmptcprouter/images/statusOK.png";
|
||||
var statusMessage = "";
|
||||
var content = "";
|
||||
|
||||
temp += getNetworkNodeTemplate(equipmentIcon, statusIcon, title, statusMessageClass,statusMessage,content);
|
||||
temp += '</a>'
|
||||
} else {
|
||||
var title = String.format("You (%s)", mArray.openmptcprouter.remote_addr);
|
||||
var statusMessageClass = "warning";
|
||||
var statusIcon = "<%=resource%>/openmptcprouter/images/statusWarning.png";
|
||||
var statusMessage = "Your IP was not leased by openmptcprouter";
|
||||
}
|
||||
var content = "";
|
||||
|
||||
temp += '<li id="networkRootNode"><table><tr><td><a href="#">';
|
||||
temp += getNetworkNodeTemplate(equipmentIcon, statusIcon, title, statusMessageClass,statusMessage,content);
|
||||
temp += '</a>';
|
||||
|
||||
temp += '<li id="networkRootNode"><table><tr><td><table>';
|
||||
if (mArray.wans)
|
||||
{
|
||||
for( var j = 0; j < mArray.wans.length; j++ )
|
||||
{
|
||||
temp += '<tr class="space"><td></td></tr>';
|
||||
}
|
||||
}
|
||||
temp += '<tr><td></td></tr><tr><td><a href="#" id="omr">';
|
||||
var equipmentIcon = '<img src="<%=resource%>/overthebox.png" style:"top: 0px;" />';
|
||||
var title = String.format("openmptcprouter (%s)", mArray.openmptcprouter.wan_addr || mArray.openmptcprouter.ss_addr || mArray.openmptcprouter.local_addr);
|
||||
var title = String.format("OpenMPTCProuter (%s)", mArray.openmptcprouter.local_addr);
|
||||
var statusMessageClass = "";
|
||||
var statusIcon = "<%=resource%>/openmptcprouter/images/statusOK.png";
|
||||
var statusMessage = "";
|
||||
|
@ -75,7 +91,7 @@
|
|||
{
|
||||
//content += "Version " + mArray.openmptcprouter.version.replace(/\"/g,'');
|
||||
content += "Version " + mArray.openmptcprouter.version;
|
||||
if (mArray.openmptcprouter.latest_version_omr != mArray.openmptcprouter.version)
|
||||
if (mArray.openmptcprouter.latest_version_omr != mArray.openmptcprouter.version && mArray.openmptcprouter.latest_version_omr != "")
|
||||
{
|
||||
content += "<br><i>(Latest available version " + mArray.openmptcprouter.latest_version_omr + ")</i>";
|
||||
}
|
||||
|
@ -101,45 +117,27 @@
|
|||
{
|
||||
for ( dhcpd in mArray.openmptcprouter.dhcpd )
|
||||
{
|
||||
if (stepbar)
|
||||
stepbar.dhcp.status = "done"
|
||||
var dhcp = mArray.openmptcprouter.dhcpd[dhcpd];
|
||||
content += String.format('<span style="text-transform:capitalize;">%s</span> address: %s<br />', dhcp.interface, dhcp.router)
|
||||
content += String.format('<span style="text-transform:capitalize;">%s</span> range: %s - %s<br />', dhcp.interface, dhcp.range_start, dhcp.range_end)
|
||||
content += String.format('<span style="text-transform:capitalize;">%s</span> address: %s<br />', dhcp.interface, dhcp.router);
|
||||
content += String.format('<span style="text-transform:capitalize;">%s</span> range: %s - %s<br />', dhcp.interface, dhcp.range_start, dhcp.range_end);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
temp += String.format('lan (%s)', mArray.openmptcprouter.local_addr);
|
||||
}
|
||||
|
||||
if (mArray.openmptcprouter.socks_service_enabled == true) {
|
||||
if (mArray.openmptcprouter.socks_service_enabled == true)
|
||||
{
|
||||
if (mArray.openmptcprouter.socks_service == false)
|
||||
{
|
||||
statusMessage += 'ShadowSocks is not running<br/>';
|
||||
}
|
||||
if (mArray.openmptcprouter.server_mptcp == "disabled")
|
||||
{
|
||||
statusMessage += 'MPTCP may not be enabled on the server<br/>';
|
||||
}
|
||||
}
|
||||
if (mArray.openmptcprouter.tun_service == false)
|
||||
{
|
||||
statusMessage += 'GloryTUN is not running<br/>';
|
||||
}
|
||||
if (mArray.openmptcprouter.wan_addr == "" && mArray.openmptcprouter.ss_addr == "")
|
||||
{
|
||||
statusMessage += 'No VPS IP address, No WAN IP address<br/>';
|
||||
}
|
||||
if (mArray.openmptcprouter.dns == false)
|
||||
{
|
||||
statusMessage += 'DNS issue: can\'t resolve hostname<br/>';
|
||||
}
|
||||
if (mArray.openmptcprouter.wan_addr6)
|
||||
{
|
||||
content += "IPv6: " + mArray.openmptcprouter.wan_addr6;
|
||||
content += "<br />";
|
||||
}
|
||||
|
||||
if(statusMessage !== "")
|
||||
{
|
||||
|
@ -152,7 +150,7 @@
|
|||
} else if (mArray.openmptcprouter.ss_addr == "")
|
||||
{
|
||||
statusMessage += 'Can\'t get public IP address from ShadowSocks<br/>';
|
||||
}
|
||||
}
|
||||
if (mArray.openmptcprouter.tun_state == "DOWN")
|
||||
{
|
||||
statusMessage += 'VPN tunnel DOWN<br/>';
|
||||
|
@ -174,7 +172,65 @@
|
|||
}
|
||||
}
|
||||
temp += getNetworkNodeTemplate(equipmentIcon, statusIcon, title, statusMessageClass,statusMessage,content);
|
||||
temp += '</a></td>'
|
||||
temp += '</a>';
|
||||
temp += '</td></tr>';
|
||||
temp += '<tr><td><div class="vertdash" ></div></td></tr>';
|
||||
temp += '<tr><td>';
|
||||
temp += '<a href="#" id="omr-vps">';
|
||||
var statusIcon = "<%=resource%>/openmptcprouter/images/statusOK.png";
|
||||
var equipmentIcon = '<img src="<%=resource%>/server.png" />';
|
||||
if (mArray.openmptcprouter.wan_addr == mArray.openmptcprouter.service_addr)
|
||||
{
|
||||
var title = String.format("OpenMPTCProuter Server (%s)", mArray.openmptcprouter.wan_addr);
|
||||
} else if (mArray.openmptcprouter.wan_addr !== "")
|
||||
{
|
||||
var title = String.format("Direct output (%s)", mArray.openmptcprouter.wan_addr);
|
||||
} else {
|
||||
var title = "No output";
|
||||
}
|
||||
content = "";
|
||||
statusMessage = "";
|
||||
if (mArray.openmptcprouter.vps_status == "DOWN")
|
||||
{
|
||||
statusMessage += 'Can\'t ping server<br/>';
|
||||
}
|
||||
if (mArray.openmptcprouter.wan_addr == "" && mArray.openmptcprouter.ss_addr == "")
|
||||
{
|
||||
statusMessage += 'No VPS IP address, No WAN IP address<br/>';
|
||||
}
|
||||
if (mArray.openmptcprouter.socks_service_enabled == true && mArray.openmptcprouter.ss_addr == "")
|
||||
{
|
||||
statusMessage += 'Can\'t get public IP address from ShadowSocks<br/>';
|
||||
}
|
||||
if (statusMessage !== "")
|
||||
{
|
||||
statusMessageClass = "error";
|
||||
statusIcon = "<%=resource%>/openmptcprouter/images/statusError.png";
|
||||
}
|
||||
if (mArray.openmptcprouter.vps_omr_version)
|
||||
{
|
||||
content += "Version " + mArray.openmptcprouter.vps_omr_version;
|
||||
if (mArray.openmptcprouter.latest_version_vps !== mArray.openmptcprouter.vps_omr_version && mArray.openmptcprouter.latest_version_vps !== "")
|
||||
{
|
||||
content += "<br><i>(Latest available version " + mArray.openmptcprouter.latest_version_vps + ")</i>";
|
||||
}
|
||||
}
|
||||
if (mArray.openmptcprouter.server_mptcp == "disabled")
|
||||
{
|
||||
statusMessage += 'MPTCP may not be enabled on the server<br/>';
|
||||
statusMessageClass = "warning";
|
||||
statusIcon = "<%=resource%>/openmptcprouter/images/statusWarning.png";
|
||||
}
|
||||
if (mArray.openmptcprouter.wan_addr6)
|
||||
{
|
||||
content += "IPv6: " + mArray.openmptcprouter.wan_addr6;
|
||||
content += '<br />';
|
||||
}
|
||||
content += '<br />';
|
||||
|
||||
temp += getNetworkNodeTemplate(equipmentIcon, statusIcon, title, statusMessageClass,statusMessage,content);
|
||||
temp += '</a></td></tr></table>';
|
||||
temp += '</td>';
|
||||
}
|
||||
if (mArray.wans)
|
||||
{
|
||||
|
@ -241,7 +297,12 @@
|
|||
}
|
||||
|
||||
var equipmentIcon = String.format('<embed id="modem_%s" onload="setColorSVG(\'modem_%s\', \'%s\')" src="<%=resource%>/modem.svg" />', mArray.wans[i].name, mArray.wans[i].name, mArray.wans[i].color);
|
||||
var title = mArray.wans[i].label + " (" + mArray.wans[i].gateway + ")";
|
||||
if (mArray.wans[i].gateway !== "")
|
||||
{
|
||||
var title = mArray.wans[i].label + " (" + mArray.wans[i].gateway + ")";
|
||||
} else {
|
||||
var title = mArray.wans[i].label;
|
||||
}
|
||||
//var content = String.format('%s<br />wan address: <strong>%s</strong><br />whois: %s<br />latency: %s ms<br />multipath: %s', stat, wanip, whois, latency, multipath);
|
||||
var content = "";
|
||||
if(wanip !== '')
|
||||
|
@ -305,37 +366,10 @@
|
|||
|
||||
temp += '</a></li>';
|
||||
}
|
||||
|
||||
// Check
|
||||
if (mArray.openmptcprouter && mArray.openmptcprouter.remote_from_lease == false)
|
||||
{
|
||||
if (stepbar)
|
||||
{
|
||||
stepbar.securedNetwork.status = "doing";
|
||||
}
|
||||
|
||||
temp += '<li>';
|
||||
temp += '<a href="#">';
|
||||
|
||||
var equipmentIcon = '<img src="<%=resource%>/computer.png" />';
|
||||
var title = String.format("You (%s)", mArray.openmptcprouter.remote_addr);
|
||||
var statusMessageClass = "warning";
|
||||
var statusIcon = "<%=resource%>/openmptcprouter/images/statusWarning.png";
|
||||
var statusMessage = "Your IP was not leased by openmptcprouter";
|
||||
|
||||
//var content = "Please unplug and plug your ethernet cable or turn off and on your Wifi";
|
||||
var content = ""
|
||||
|
||||
temp += getNetworkNodeTemplate(equipmentIcon, statusIcon, title, statusMessageClass,statusMessage,content);
|
||||
temp += '</a></li>';
|
||||
}
|
||||
|
||||
temp += '</ul></td></tr></table>';
|
||||
|
||||
temp += '</ul></td>';
|
||||
temp += '</tr></table>';
|
||||
}
|
||||
temp += '</li>';
|
||||
if (mArray.openmptcprouter && mArray.openmptcprouter.remote_from_lease)
|
||||
temp += '</ul></li>';
|
||||
// Close tree
|
||||
temp += '</ul>';
|
||||
temp += '</figure>';
|
||||
|
@ -361,18 +395,18 @@
|
|||
|
||||
function getNetworkNodeTemplate(equipmentIcon, statusIcon, title, statusMessageClass, statusMessage, content)
|
||||
{
|
||||
return String.format( '<div class="network-node">' +
|
||||
'<div class="equipment-icon">%s</div>' +
|
||||
'<div class="status-icon"><img src="%s" /></div>' +
|
||||
'<div class="info">' +
|
||||
'<div class="title">%s</div>' +
|
||||
'<div class="status-message %s">%s</div>' +
|
||||
'<div class="content">%s</div>' +
|
||||
'<div class="clear"></div>' +
|
||||
'</div>' +
|
||||
'<div class="clear"></div>' +
|
||||
'</div>',
|
||||
equipmentIcon, statusIcon, title, statusMessageClass, statusMessage, content);
|
||||
return String.format('<div class="network-node">' +
|
||||
'<div class="equipment-icon">%s</div>' +
|
||||
'<div class="status-icon"><img src="%s" /></div>' +
|
||||
'<div class="info">' +
|
||||
'<div class="title">%s</div>' +
|
||||
'<div class="status-message %s">%s</div>' +
|
||||
'<div class="content">%s</div>' +
|
||||
'<div class="clear"></div>' +
|
||||
'</div>' +
|
||||
'<div class="clear"></div>' +
|
||||
'</div>',
|
||||
equipmentIcon, statusIcon, title, statusMessageClass, statusMessage, content);
|
||||
}
|
||||
|
||||
function stringToColour(str) {
|
||||
|
|
|
@ -33,13 +33,22 @@ 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 src="/luci-static/resources/xhr.js?v=git-18.324.48426-65adb4e"></script>
|
||||
<script>
|
||||
function jsshowadv() {
|
||||
if(document.getElementById('showadv').checked){
|
||||
document.getElementById('advancedsettings').style.display='inline';
|
||||
} else {
|
||||
document.getElementById('advancedsettings').style.display='none';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<% if stderr and #stderr > 0 then %><pre class="error"><%=pcdata(stderr)%></pre><% end %>
|
||||
<form class="inline" method="post" action="<%=url('admin/system/openmptcprouter/wizard_add')%>" enctype="multipart/form-data">
|
||||
<div class="cbi-map">
|
||||
<h2 name="content"><%:Wizard%></h2>
|
||||
<fieldset class="cbi-section" id="server">
|
||||
<legend><%:Server settings%></legend>
|
||||
<legend><%:Server settings%></legend>
|
||||
<div class="cbi-section-descr"><%:Put the values given by OpenMPTCProuter VPS script.%></div>
|
||||
<div class="cbi-value cbi-value-last" id="server_ip" data-depends="[]" data-index="0">
|
||||
<label class="cbi-value-title" for="server_ip"><%:Server IP%></label>
|
||||
|
@ -66,16 +75,58 @@ end
|
|||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Enable IPv6%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input class="cbi-input-checkbox" type="checkbox" name="enableipv6" value="1" <% if tonumber((luci.sys.exec("sysctl net.ipv6.conf.all.disable_ipv6")):match(" %d+")) == 0 then %>checked<% end %> />
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:You should disable IPv6 here if server doesn't provide IPv6.%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:OpenMPTCProuter VPS key%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="openmptcprouter_vps_key" placeholder="OpenMPTCProuter VPS key" class="cbi-input-text" value="<%=uci:get("openmptcprouter","vps","password")%>" data-type="base64">
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Key to configure and retrieve others keys from OpenMPTCProuter VPS. Empty to disable.%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Advanced settings%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" class="cbi-input-checkbox" id="showadv" value="1" onclick="jsshowadv()" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<span id="advancedsettings" style="display:none;">
|
||||
<fieldset class="cbi-section" id="shadowsocks">
|
||||
<legend><%:ShadowSocks settings%></legend>
|
||||
<div class="cbi-section-descr"><%:By default ShadowSocks is used for TCP traffic.%></div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:ShadowSocks key%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="shadowsocks_key" placeholder="ShadowSocks key" class="cbi-input-text" value="<%=uci:get("shadowsocks-libev","sss0","key")%>" data-type="base64">
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:ShadowSocks is used for TCP. Empty to disable.%>
|
||||
<%:ShadowSocks is used for TCP.%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Disable ShadowSocks%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input class="cbi-input-checkbox" type="checkbox" name="disableshadowsocks" value="1" <% if uci:get("shadowsocks-libev","sss0","disabled") == 1 then %>checked<% end %> />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="cbi-section" id="vpn">
|
||||
<legend><%:VPN settings%></legend>
|
||||
<div class="cbi-section-descr"><%:By default VPN is used for any traffic that is not TCP.%></div>
|
||||
<% if nixio.fs.access("/usr/sbin/glorytun") or nixio.fs.access("/usr/sbin/glorytun-udp") then %>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Glorytun key%></label>
|
||||
|
@ -129,17 +180,8 @@ end
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Enable IPv6%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input class="cbi-input-checkbox" type="checkbox" name="enableipv6" value="1" <% if tonumber((luci.sys.exec("sysctl net.ipv6.conf.all.disable_ipv6")):match(" %d+")) == 0 then %>checked<% end %> />
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:You should disable IPv6 here if server doesn't provide IPv6.%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</span>
|
||||
<fieldset class="cbi-section" id="interfaces">
|
||||
<legend><%:Interfaces settings%></legend>
|
||||
<div class="cbi-section-descr"><%:You must disable DHCP on your modems and set IP in different networks.%></div>
|
||||
|
@ -155,26 +197,40 @@ end
|
|||
<h3><%=ifname%></h3>
|
||||
<fieldset class="cbi-section-node" id="cbi-openmptcprouter-<%=ifname%>">
|
||||
<input type="hidden" name="intf.<%=ifname%>" value="<%=ifname%>" />
|
||||
<div class="cbi-value">
|
||||
<div class="cbi-value" id="cbi-network-<%=ifname%>-proto" data-index="1">
|
||||
<label class="cbi-value-title"><%:Protocol%></label>
|
||||
<div class="cbi-value-field">
|
||||
<select class="cbi-input-select" data-update="change" id="cbid.network.<%=ifname%>.proto" name="cbid.network.<%=ifname%>.proto" size="1">
|
||||
<option id="cbid.network.<%=ifname%>.proto-static" value="static"<% if uci:get("network",ifname,"proto") == "static" then %>selected="selected"<% end %>><%:Static address%></option>
|
||||
<option id="cbid.network.<%=ifname%>.proto-dhcp" value="dhcp"<% if uci:get("network",ifname,"proto") == "dhcp" then %>selected="selected"<% end %>><%:DHCP%></option>
|
||||
<option id="cbid.network.<%=ifname%>.proto-other" value="other"<% if uci:get("network",ifname,"proto") ~= "static" and uci:get("network",ifname,"proto") ~= "dhcp" then %>selected="selected"<% end %>><%:Other%></option>
|
||||
</select>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:You can use DHCP if you have multiple real ethernet ports. Select other if you want to use another protocol available in Network Interfaces page.%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value" id="cbi-network-<%=ifname%>-address" data-depends="[{"cbid.network.<%=ifname%>.proto":"static"}]" data-index="2">
|
||||
<label class="cbi-value-title"><%:IPv4 address%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="cbid.network.<%=ifname%>.ipaddr" class="cbi-input-text" value="<%=uci:get("network",ifname,"ipaddr")%>" data-type="ip4addr">
|
||||
<input type="text" id="cbid.network.<%=ifname%>.ipaddr" name="cbid.network.<%=ifname%>.ipaddr" class="cbi-input-text" value="<%=uci:get("network",ifname,"ipaddr")%>" data-type="ip4addr">
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Set an IP in the same network as the modem%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<div class="cbi-value" id="cbi-network-<%=ifname%>-netmask" data-depends="[{"cbid.network.<%=ifname%>.proto":"static"}]" data-index="3">
|
||||
<label class="cbi-value-title"><%:IPv4 netmask%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="cbid.network.<%=ifname%>.netmask" class="cbi-input-text" value="<%=uci:get("network",ifname,"netmask") or "255.255.255.0"%>" data-type="ip4addr">
|
||||
<input type="text" id="cbid.network.<%=ifname%>.netmask" name="cbid.network.<%=ifname%>.netmask" class="cbi-input-text" value="<%=uci:get("network",ifname,"netmask") or "255.255.255.0"%>" data-type="ip4addr">
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<div class="cbi-value" id="cbi-network-<%=ifname%>-gateway" data-depends="[{"cbid.network.<%=ifname%>.proto":"static"}]" data-index="4">
|
||||
<label class="cbi-value-title"><%:IPv4 gateway%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="cbid.network.<%=ifname%>.gateway" class="cbi-input-text" value="<%=uci:get("network",ifname,"gateway")%>" data-type="ip4addr">
|
||||
<input type="text" id="cbid.network.<%=ifname%>.gateway" name="cbid.network.<%=ifname%>.gateway" class="cbi-input-text" value="<%=uci:get("network",ifname,"gateway")%>" data-type="ip4addr">
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Set here IP of the modem%>
|
||||
|
@ -192,7 +248,7 @@ end
|
|||
upload = uci:get("qos",ifname,"upload")
|
||||
end
|
||||
%>
|
||||
<div class="cbi-value">
|
||||
<div class="cbi-value" data-index="5">
|
||||
<label class="cbi-value-title"><%:Download speed (Kb/s)%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="cbid.sqm.<%=ifname%>.download" class="cbi-input-text" value="<%=download%>" data-type="uinteger">
|
||||
|
@ -202,7 +258,7 @@ end
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<div class="cbi-value" data-index="6">
|
||||
<label class="cbi-value-title"><%:Upload speed (Kb/s)%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="text" name="cbid.sqm.<%=ifname%>.upload" class="cbi-input-text" value="<%=upload%>" data-type="uinteger">
|
||||
|
|
|
@ -18,6 +18,15 @@ msgstr "Ajouter une interface"
|
|||
msgid "Advanced Settings"
|
||||
msgstr "Configuration avancé"
|
||||
|
||||
msgid "Advanced settings"
|
||||
msgstr "Configuration avancé"
|
||||
|
||||
msgid "By default ShadowSocks is used for TCP traffic."
|
||||
msgstr "ShadowSocks est utilisé pour le trafic TCP."
|
||||
|
||||
msgid "By default VPN is used for any traffic that is not TCP."
|
||||
msgstr "Par défaut le VPN est utilisé pour le trafic n'étant pas du TCP."
|
||||
|
||||
msgid "Check if MPTCP between interface and server is working."
|
||||
msgstr "Vérifie le fonctionnement de MPTCP entre l'interface et le serveur."
|
||||
|
||||
|
@ -25,6 +34,9 @@ msgid "Connection with lowest RTT is used as master interface"
|
|||
msgstr ""
|
||||
"La connexion avec le plus faible RTT est utilisé en temps qu'interface maître"
|
||||
|
||||
msgid "DHCP"
|
||||
msgstr ""
|
||||
|
||||
msgid "Default VPN"
|
||||
msgstr "VPN par défaut"
|
||||
|
||||
|
@ -34,6 +46,9 @@ msgstr "Supprimer"
|
|||
msgid "Disable IPv6"
|
||||
msgstr "Désactiver IPv6"
|
||||
|
||||
msgid "Disable ShadowSocks"
|
||||
msgstr "Désactiver ShadowSocks"
|
||||
|
||||
msgid "Download speed (Kb/s)"
|
||||
msgstr "Vitesse de téléchargement (Kb/s)"
|
||||
|
||||
|
@ -76,6 +91,13 @@ msgstr "Nom de l'interface"
|
|||
msgid "Interfaces settings"
|
||||
msgstr "Paramètres des interfaces"
|
||||
|
||||
msgid ""
|
||||
"Key to configure and retrieve others keys from OpenMPTCProuter VPS. Empty to "
|
||||
"disable."
|
||||
msgstr ""
|
||||
"Clef pour configurer et récupérer les autres clefs depuis OpenMPTCProuter "
|
||||
"VPS. Vide pour désactiver."
|
||||
|
||||
msgid "Loading"
|
||||
msgstr "Chargement"
|
||||
|
||||
|
@ -100,18 +122,30 @@ msgstr "Aperçu réseau"
|
|||
msgid "Networks settings"
|
||||
msgstr "Paramètres réseaux"
|
||||
|
||||
msgid "OBFS must be enabled on VPS"
|
||||
msgstr "OBFS doit être activé sur le VPS"
|
||||
msgid "OBFS will be enabled on both side"
|
||||
msgstr "OBFS sera activé des deux côtés"
|
||||
|
||||
msgid "OpenMPTCProuter"
|
||||
msgstr ""
|
||||
|
||||
msgid "OpenMPTCProuter VPS key"
|
||||
msgstr "Clef d'OpenMPTCProuter VPS"
|
||||
|
||||
msgid "OpenVPN key"
|
||||
msgstr "Clef OpenVPN"
|
||||
|
||||
msgid "Other"
|
||||
msgstr "Autre"
|
||||
|
||||
msgid "Protocol"
|
||||
msgstr "Protocole"
|
||||
|
||||
msgid "Put the values given by OpenMPTCProuter VPS script."
|
||||
msgstr "Mettez les valeurs données par le script OpenMPTCProuter VPS."
|
||||
|
||||
msgid "Redirects all ports from VPS to OpenMPTCProuter"
|
||||
msgstr "Rédiriger tous les ports du VPS vers OpenMPTCProuter"
|
||||
|
||||
msgid "Save & Apply"
|
||||
msgstr "Sauvegarder et Appliquer"
|
||||
|
||||
|
@ -160,12 +194,18 @@ msgstr "Paramètres"
|
|||
msgid "Settings Wizard"
|
||||
msgstr "Assistant de configuration"
|
||||
|
||||
msgid "ShadowSocks is used for TCP. Empty to disable."
|
||||
msgstr "ShadowSocks est utilisé pour le TCP. Videz pour désactiver."
|
||||
msgid "ShadowSocks is used for TCP."
|
||||
msgstr "ShadowSocks est utilisé pour le TCP."
|
||||
|
||||
msgid "ShadowSocks key"
|
||||
msgstr "Clef de ShadowSocks"
|
||||
|
||||
msgid "ShadowSocks settings"
|
||||
msgstr "Paramètres de ShadowSocks"
|
||||
|
||||
msgid "Static address"
|
||||
msgstr "Adresse statique"
|
||||
|
||||
msgid "Status"
|
||||
msgstr "État"
|
||||
|
||||
|
@ -178,12 +218,26 @@ msgstr "Teste"
|
|||
msgid "Upload speed (Kb/s)"
|
||||
msgstr "Vitesse d'envoi (Kb/s)"
|
||||
|
||||
msgid "VPN settings"
|
||||
msgstr "Paramètres du VPN"
|
||||
|
||||
msgid "VPS settings"
|
||||
msgstr "Paramètres du VPS"
|
||||
|
||||
msgid "Waiting for command to complete..."
|
||||
msgstr "En attente de la réponse de la commande..."
|
||||
|
||||
msgid "Wizard"
|
||||
msgstr "Assistant"
|
||||
|
||||
msgid ""
|
||||
"You can use DHCP if you have multiple real ethernet ports. Select other if "
|
||||
"you want to use another protocol available in Network Interfaces page."
|
||||
msgstr ""
|
||||
"Vous pouvez utiliser DHCP si vous avez plusieurs ports réseau physique. "
|
||||
"Choisissez autre si vous utilisez un autre protocole dans la page Réseau "
|
||||
"Interfaces."
|
||||
|
||||
msgid "You must disable DHCP on your modems and set IP in different networks."
|
||||
msgstr ""
|
||||
"Vous devez désactiver DHCP sur vos modems et configurer leurs IP dans des "
|
||||
|
@ -199,6 +253,12 @@ msgstr ""
|
|||
msgid "You should disable IPv6 here if server doesn't provide IPv6."
|
||||
msgstr "Vous devriez désactiver IPv6 ici si le serveur ne supporte pas IPv6."
|
||||
|
||||
#~ msgid "OBFS must be enabled on VPS"
|
||||
#~ msgstr "OBFS doit être activé sur le VPS"
|
||||
|
||||
#~ msgid "ShadowSocks is used for TCP. Empty to disable."
|
||||
#~ msgstr "ShadowSocks est utilisé pour le TCP. Videz pour désactiver."
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Set value between 80-95% of max download speed link. Empty to disable."
|
||||
#~ msgstr ""
|
||||
|
|
|
@ -7,12 +7,24 @@ msgstr ""
|
|||
msgid "Advanced Settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Advanced settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "By default ShadowSocks is used for TCP traffic."
|
||||
msgstr ""
|
||||
|
||||
msgid "By default VPN is used for any traffic that is not TCP."
|
||||
msgstr ""
|
||||
|
||||
msgid "Check if MPTCP between interface and server is working."
|
||||
msgstr ""
|
||||
|
||||
msgid "Connection with lowest RTT is used as master interface"
|
||||
msgstr ""
|
||||
|
||||
msgid "DHCP"
|
||||
msgstr ""
|
||||
|
||||
msgid "Default VPN"
|
||||
msgstr ""
|
||||
|
||||
|
@ -22,6 +34,9 @@ msgstr ""
|
|||
msgid "Disable IPv6"
|
||||
msgstr ""
|
||||
|
||||
msgid "Disable ShadowSocks"
|
||||
msgstr ""
|
||||
|
||||
msgid "Download speed (Kb/s)"
|
||||
msgstr ""
|
||||
|
||||
|
@ -64,6 +79,11 @@ msgstr ""
|
|||
msgid "Interfaces settings"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Key to configure and retrieve others keys from OpenMPTCProuter VPS. Empty to "
|
||||
"disable."
|
||||
msgstr ""
|
||||
|
||||
msgid "Loading"
|
||||
msgstr ""
|
||||
|
||||
|
@ -88,18 +108,30 @@ msgstr ""
|
|||
msgid "Networks settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "OBFS must be enabled on VPS"
|
||||
msgid "OBFS will be enabled on both side"
|
||||
msgstr ""
|
||||
|
||||
msgid "OpenMPTCProuter"
|
||||
msgstr ""
|
||||
|
||||
msgid "OpenMPTCProuter VPS key"
|
||||
msgstr ""
|
||||
|
||||
msgid "OpenVPN key"
|
||||
msgstr ""
|
||||
|
||||
msgid "Other"
|
||||
msgstr ""
|
||||
|
||||
msgid "Protocol"
|
||||
msgstr ""
|
||||
|
||||
msgid "Put the values given by OpenMPTCProuter VPS script."
|
||||
msgstr ""
|
||||
|
||||
msgid "Redirects all ports from VPS to OpenMPTCProuter"
|
||||
msgstr ""
|
||||
|
||||
msgid "Save & Apply"
|
||||
msgstr ""
|
||||
|
||||
|
@ -141,12 +173,18 @@ msgstr ""
|
|||
msgid "Settings Wizard"
|
||||
msgstr ""
|
||||
|
||||
msgid "ShadowSocks is used for TCP. Empty to disable."
|
||||
msgid "ShadowSocks is used for TCP."
|
||||
msgstr ""
|
||||
|
||||
msgid "ShadowSocks key"
|
||||
msgstr ""
|
||||
|
||||
msgid "ShadowSocks settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Static address"
|
||||
msgstr ""
|
||||
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
|
@ -159,12 +197,23 @@ msgstr ""
|
|||
msgid "Upload speed (Kb/s)"
|
||||
msgstr ""
|
||||
|
||||
msgid "VPN settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "VPS settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "Waiting for command to complete..."
|
||||
msgstr ""
|
||||
|
||||
msgid "Wizard"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"You can use DHCP if you have multiple real ethernet ports. Select other if "
|
||||
"you want to use another protocol available in Network Interfaces page."
|
||||
msgstr ""
|
||||
|
||||
msgid "You must disable DHCP on your modems and set IP in different networks."
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2018 Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
|
||||
# Released under GPL 3. See LICENSE for the full terms.
|
||||
|
||||
START=5
|
||||
|
||||
|
@ -38,17 +40,17 @@ set_ipv6_state() {
|
|||
uci -q set shadowsocks-libev.hi.local_address="::"
|
||||
fi
|
||||
uci -q commit dhcp
|
||||
if [ "$disable_ipv6" == "1" ]; then
|
||||
/etc/init.d/odhcpd stop >/dev/null 2>&1
|
||||
/etc/init.d/odhcpd disable >/dev/null 2>&1
|
||||
fi
|
||||
#if [ "$disable_ipv6" == "1" ]; then
|
||||
# /etc/init.d/odhcpd stop >/dev/null 2>&1
|
||||
# /etc/init.d/odhcpd disable >/dev/null 2>&1
|
||||
#fi
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local scaling_min_freq scaling_max_freq
|
||||
|
||||
config_load openmptcprouter
|
||||
config_foreach omr_intf_del interface
|
||||
#config_load openmptcprouter
|
||||
#config_foreach omr_intf_del interface
|
||||
config_load network
|
||||
config_foreach omr_intf_set interface
|
||||
|
||||
|
|
|
@ -27,9 +27,9 @@ if [ "$(uci -q ucitrack.@network[-1].affects | grep openmptcprouter)" = "" ]; th
|
|||
commit ucitrack
|
||||
EOF
|
||||
fi
|
||||
if [ "$(uci -q get openmptcprouter.vps)" = "" ]; then
|
||||
if [ "$(uci -q get openmptcprouter.vps)" != "server" ]; then
|
||||
uci -q batch <<-EOF
|
||||
set openmptcprouter.vps=vps
|
||||
set openmptcprouter.vps=server
|
||||
commit openmptcprouter
|
||||
EOF
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue