mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix open all ports
This commit is contained in:
parent
95fb1bc0c0
commit
12a93ac458
2 changed files with 9 additions and 6 deletions
|
@ -267,8 +267,8 @@ function wizard_add()
|
|||
local ss_ip
|
||||
|
||||
for server, _ in pairs(servers) do
|
||||
local server_ip = luci.http.formvalue("%s.server_ip" % server) or ""
|
||||
local backup = luci.http.formvalue("%s.backup" % server) or "0"
|
||||
local server_ip = luci.http.formvalue("%s.server_ip" % server) or ""
|
||||
-- We have an IP, so set it everywhere
|
||||
if server_ip ~= "" then
|
||||
-- Check if we have more than one IP, in this case use Nginx HA
|
||||
|
@ -453,8 +453,10 @@ end
|
|||
|
||||
function settings_add()
|
||||
-- Redirects all ports from VPS to OpenMPTCProuter
|
||||
local servers = luci.http.formvaluetable("server")
|
||||
local redirect_ports = luci.http.formvaluetable("redirect_ports")
|
||||
for server, value in pairs(redirect_ports) do
|
||||
for server, _ in pairs(servers) do
|
||||
local value = luci.http.formvalue("redirect_ports.%s" % server) or "0"
|
||||
ucic:set("openmptcprouter",server,"redirect_ports",value)
|
||||
end
|
||||
|
||||
|
|
|
@ -47,8 +47,9 @@
|
|||
<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">
|
||||
<label class="cbi-value-title"><%:Redirects all ports from server to OpenMPTCProuter%></label>
|
||||
<div class="cbi-value-field">
|
||||
<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 %>>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -62,10 +63,10 @@
|
|||
<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%>
|
||||
<%:OBFS will be enabled on both side%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="cbi-section" id="networks">
|
||||
<legend><%:Networks settings%></legend>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue