mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Support 2 IPs on server
This commit is contained in:
parent
1518776a8b
commit
4f6b1d263e
2 changed files with 68 additions and 12 deletions
|
@ -55,9 +55,19 @@
|
|||
<h3><%=servername%></h3>
|
||||
<div class="cbi-section-node" id="cbi-omr-wizard-<%=servername%>">
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title" for="server_ip"><%:Server IP%></label>
|
||||
<label class="cbi-value-title" for="server_ip.1"><%:Server IP%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input name="<%=servername%>.server_ip" id="<%=servername%>.server_ip" placeholder="<%:Server IP%>" class="cbi-input-text" value="<%=uci:get_list("openmptcprouter",servername,"ip")[1]%>" data-optional="false">
|
||||
<input name="<%=servername%>.server_ip.1" id="<%=servername%>.server_ip.1" placeholder="<%:Server IP%>" class="cbi-input-text" value="<%=uci:get_list("openmptcprouter",servername,"ip")[1]%>" data-optional="false">
|
||||
<div class="cbi-value-description">
|
||||
<%:Server IP will be set for proxy and VPN%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title" for="server_ip.2"><%:Server IP%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input name="<%=servername%>.server_ip.2" id="<%=servername%>.server_ip.2" placeholder="<%:Server IP%>" class="cbi-input-text" value="<%=uci:get_list("openmptcprouter",servername,"ip")[2]%>" data-optional="false">
|
||||
<div class="cbi-value-description">
|
||||
<%:Server IP will be set for proxy and VPN%>
|
||||
</div>
|
||||
|
@ -147,7 +157,10 @@
|
|||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Enable IPv6%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input class="cbi-input-checkbox" type="checkbox" id="enableipv6" name="enableipv6" value="0" <% if uci:get("openmptcprouter","settings","disable_ipv6") == "0" then %>checked<% end %> />
|
||||
<select class="cbi-input-select" name="enableipv6" size="1">
|
||||
<option value="1" <% if uci:get("openmptcprouter","settings","disable_ipv6") ~= "0" then %>selected="selected"<% end %>><%:Disabled%></option>
|
||||
<option value="0" <% if uci:get("openmptcprouter","settings","disable_ipv6") == "0" then %>selected="selected"<% end %>><%:Enabled%></option>
|
||||
</select>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:You should disable IPv6 here if server doesn't provide IPv6.%>
|
||||
|
@ -874,6 +887,13 @@
|
|||
if not (ifacea == "lo" or ifacea == "6in4-omr6in4" or ifacea == "mlvpn0" or ifacea:match("^ifb.*") or ifacea:match("^sit.*") or ifacea:match("^gre.*") or ifacea:match("^ip6.*") or ifacea:match("^teql.*") or ifacea:match("^erspan.*")) and device_notvirtual(ifacea) then
|
||||
%>
|
||||
<option value="<%=ifacea%>"><%=ifacea%></option>
|
||||
<%
|
||||
end
|
||||
end
|
||||
for _, ifacea in ipairs(net:get_networks()) do
|
||||
if not (ifacea:name() == "loopback" or ifacea:name() == "omr6in4" or ifacea:name() == "omrvpn" or ifacea:name():match("^omrip.*")) then
|
||||
%>
|
||||
<option value="<%='@' .. ifacea:name()%>"><%='@' .. ifacea:name() .. ' (alias)'%></option>
|
||||
<%
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue