mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Small changes on text in status page
This commit is contained in:
parent
0e871b0ac6
commit
129bb12930
4 changed files with 34 additions and 8 deletions
|
@ -536,6 +536,12 @@ function settings_add()
|
||||||
|
|
||||||
-- Set tcp_fastopen
|
-- Set tcp_fastopen
|
||||||
local tcp_fastopen = luci.http.formvalue("tcp_fastopen")
|
local tcp_fastopen = luci.http.formvalue("tcp_fastopen")
|
||||||
|
local fastopen = luci.http.formvalue("disablefastopen") or "0"
|
||||||
|
if fastopen == "0" then
|
||||||
|
tcp_fastopen = "0"
|
||||||
|
elseif tcp_fastopen == "0" and fastopen == "1" then
|
||||||
|
tcp_fastopen = "3"
|
||||||
|
end
|
||||||
luci.sys.exec("sysctl -w net.ipv4.tcp_fastopen=%s" % tcp_fastopen)
|
luci.sys.exec("sysctl -w net.ipv4.tcp_fastopen=%s" % tcp_fastopen)
|
||||||
luci.sys.exec("sed -i 's:^net.ipv4.tcp_fastopen=[0-3]*:net.ipv4.tcp_fastopen=%s:' /etc/sysctl.d/zzz_openmptcprouter.conf" % tcp_fastopen)
|
luci.sys.exec("sed -i 's:^net.ipv4.tcp_fastopen=[0-3]*:net.ipv4.tcp_fastopen=%s:' /etc/sysctl.d/zzz_openmptcprouter.conf" % tcp_fastopen)
|
||||||
|
|
||||||
|
@ -548,6 +554,16 @@ function settings_add()
|
||||||
ucic:set("openmptcprouter","settings","external_check",externalcheck)
|
ucic:set("openmptcprouter","settings","external_check",externalcheck)
|
||||||
ucic:commit("openmptcprouter")
|
ucic:commit("openmptcprouter")
|
||||||
|
|
||||||
|
-- Enable/disable fast open
|
||||||
|
local fastopen = luci.http.formvalue("disablefastopen") or "0"
|
||||||
|
ucic:foreach("shadowsocks-libev", "ss_redir", function (section)
|
||||||
|
ucic:set("shadowsocks-libev",section[".name"],"fast_open",fastopen)
|
||||||
|
end)
|
||||||
|
ucic:foreach("shadowsocks-libev", "ss_local", function (section)
|
||||||
|
ucic:set("shadowsocks-libev",section[".name"],"fast_open",fastopen)
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
||||||
-- Enable/disable obfs
|
-- Enable/disable obfs
|
||||||
local obfs = luci.http.formvalue("obfs") or "0"
|
local obfs = luci.http.formvalue("obfs") or "0"
|
||||||
local obfs_plugin = luci.http.formvalue("obfs_plugin") or "v2ray"
|
local obfs_plugin = luci.http.formvalue("obfs_plugin") or "v2ray"
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
<div class="cbi-map">
|
<div class="cbi-map">
|
||||||
<h2 name="content"><%:Update VPS%></h2>
|
<h2 name="content"><%:Update VPS%></h2>
|
||||||
<fieldset class="cbi-section" id="update">
|
<fieldset class="cbi-section" id="update">
|
||||||
<div class="cbi-section-descr"><%:Update remotly OpenMPTCProuter server to latest version when needed.%> <b><%:Beta%></b></div>
|
<div class="cbi-section-descr"><%:Update remotly the server to latest version when needed.%> <b><%:Beta%></b></div>
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<label class="cbi-value-title"><%:Update OpenMPTCProuter server%></label>
|
<label class="cbi-value-title"><%:Update server%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input type="hidden" name="token" value="<%=token%>" />
|
<input type="hidden" name="token" value="<%=token%>" />
|
||||||
<input type="hidden" name="server" value="<%=servername%>" />
|
<input type="hidden" name="server" value="<%=servername%>" />
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
<div class="cbi-section-node">
|
<div class="cbi-section-node">
|
||||||
<div class="cbi-section-descr"></div>
|
<div class="cbi-section-descr"></div>
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<label class="cbi-value-title"><%:Redirects all ports from server to OpenMPTCProuter%></label>
|
<label class="cbi-value-title"><%:Redirects all ports from server to this router%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input type="hidden" name="server.<%=servername%>" value="<%=servername%>" />
|
<input type="hidden" name="server.<%=servername%>" value="<%=servername%>" />
|
||||||
<input type="checkbox" name="redirect_ports.<%=servername%>" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter",servername,"redirect_ports") == "1" then %>checked<% end %>>
|
<input type="checkbox" name="redirect_ports.<%=servername%>" class="cbi-input-checkbox" value="1" <% if luci.model.uci.cursor():get("openmptcprouter",servername,"redirect_ports") == "1" then %>checked<% end %>>
|
||||||
|
@ -147,6 +147,16 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="cbi-value">
|
||||||
|
<label class="cbi-value-title"><%:Disable TCP Fast Open%></label>
|
||||||
|
<div class="cbi-value-field">
|
||||||
|
<input type="checkbox" name="disablefastopen" class="cbi-input-checkbox" value="0" <% if luci.model.uci.cursor():get("openmptcprouter","settings","disable_fastopen") == "1" then %>checked<% end %>>
|
||||||
|
<br />
|
||||||
|
<div class="cbi-value-description">
|
||||||
|
<%:Disable TCP Fast Open.%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<label class="cbi-value-title"><%:Master interface selection%></label>
|
<label class="cbi-value-title"><%:Master interface selection%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
var title = String.format("You (%s)", mArray.openmptcprouter.remote_addr);
|
var title = String.format("You (%s)", mArray.openmptcprouter.remote_addr);
|
||||||
var statusMessageClass = "warning";
|
var statusMessageClass = "warning";
|
||||||
var statusIcon = "<%=resource%>/openmptcprouter/images/statusWarning.png";
|
var statusIcon = "<%=resource%>/openmptcprouter/images/statusWarning.png";
|
||||||
var statusMessage = "Your IP was not leased by openmptcprouter";
|
var statusMessage = "Your IP was not leased by this router";
|
||||||
}
|
}
|
||||||
var content = "";
|
var content = "";
|
||||||
|
|
||||||
|
|
|
@ -74,12 +74,12 @@ end
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<div class="cbi-value">
|
<div class="cbi-value">
|
||||||
<label class="cbi-value-title"><%:OpenMPTCProuter VPS key%></label>
|
<label class="cbi-value-title"><%:Server key%></label>
|
||||||
<div class="cbi-value-field">
|
<div class="cbi-value-field">
|
||||||
<input type="text" name="<%=servername%>.openmptcprouter_vps_key" placeholder="OpenMPTCProuter VPS key" class="cbi-input-text" value="<%=uci:get("openmptcprouter",servername,"password")%>" data-type="base64" data-optional="false">
|
<input type="text" name="<%=servername%>.openmptcprouter_vps_key" placeholder="Server key" class="cbi-input-text" value="<%=uci:get("openmptcprouter",servername,"password")%>" data-type="base64" data-optional="false">
|
||||||
<br />
|
<br />
|
||||||
<div class="cbi-value-description">
|
<div class="cbi-value-description">
|
||||||
<%:Key to configure and retrieve others keys from OpenMPTCProuter VPS. Empty to disable.%>
|
<%:Key to configure and retrieve others keys from Server. Empty to disable.%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -184,7 +184,7 @@ end
|
||||||
<input type="text" class="cbi-input-text" data-update="change" value="<%=uci:get("openvpn","omr","secret")%>" />
|
<input type="text" class="cbi-input-text" data-update="change" value="<%=uci:get("openvpn","omr","secret")%>" />
|
||||||
<br />
|
<br />
|
||||||
<div class="cbi-value-description">
|
<div class="cbi-value-description">
|
||||||
<%:You need to upload OpenVPN key file generated by OpenMPTCProuter VPS script to use OpenVPN TCP%>
|
<%:You need to upload OpenVPN key file generated by server install script to use OpenVPN TCP%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue