mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix remove server and add redirect all ports from server to OMR for each server
This commit is contained in:
parent
9e4aaea7a2
commit
27421993e6
3 changed files with 44 additions and 14 deletions
|
@ -2,9 +2,16 @@
|
|||
|
||||
<% if stderr and #stderr > 0 then %><pre class="error"><%=pcdata(stderr)%></pre><% end %>
|
||||
<%
|
||||
local omr_version=luci.model.uci.cursor():get("openmptcprouter","vps","omr_version")
|
||||
local latest_omr_version=luci.model.uci.cursor():get("openmptcprouter","latest_versions","vps")
|
||||
if omr_version ~= "" and latest_omr_version ~= "" and omr_version ~= latest_omr_version then
|
||||
omr_test = false
|
||||
uci:foreach("openmptcprouter","server", function(s)
|
||||
servername = s[".name"]
|
||||
local omr_version=luci.model.uci.cursor():get("openmptcprouter",servername,"omr_version")
|
||||
if omr_version ~= "" and latest_omr_version ~= "" and omr_version ~= latest_omr_version then
|
||||
omr_test = true
|
||||
end
|
||||
end)
|
||||
if omr_test == true then
|
||||
%>
|
||||
<form class="inline" method="post" action="<%=url('admin/system/openmptcprouter/update_vps')%>">
|
||||
<div class="cbi-map">
|
||||
|
@ -15,6 +22,7 @@
|
|||
<label class="cbi-value-title"><%:Update OpenMPTCProuter server%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="hidden" name="token" value="<%=token%>" />
|
||||
<input type="hidden" name="server" value="<%=servername%>" />
|
||||
<input type="hidden" name="flash" value="1" />
|
||||
<input type="submit" name="update_vps" class="cbi-button cbi-button-apply" value="<%:Update%>">
|
||||
</div>
|
||||
|
@ -31,13 +39,23 @@
|
|||
<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 %>>
|
||||
<%
|
||||
uci:foreach("openmptcprouter","server", function(s)
|
||||
servername = s[".name"]
|
||||
%>
|
||||
<h3><%=servername%></h3>
|
||||
<div class="cbi-section-node">
|
||||
<div class="cbi-section-descr"></div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Redirects all ports from server to OpenMPTCProuter%></label>
|
||||
<div class="cbi-value-field">
|
||||
<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 %>>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%
|
||||
end)
|
||||
%>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Enable ShadowSocks OBFS%></label>
|
||||
<div class="cbi-value-field">
|
||||
|
|
|
@ -302,7 +302,7 @@ end
|
|||
<input type="text" name="cbid.sqm.<%=ifname%>.download" class="cbi-input-text" value="<%=download%>" data-type="uinteger">
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Set value between 80-95% of max download speed link. 0 to disable.%>
|
||||
<%:Set value between 80-95% of max download speed link. 0 to disable SQM/QoS.%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -312,7 +312,7 @@ end
|
|||
<input type="text" name="cbid.sqm.<%=ifname%>.upload" class="cbi-input-text" value="<%=upload%>" data-type="uinteger">
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Set value between 80-95% of max upload speed link. 0 to disable.%>
|
||||
<%:Set value between 80-95% of max upload speed link. 0 to disable SQM/QoS.%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue