mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add a checkbox to use DNS64/NAT64
This commit is contained in:
parent
2b77b200f4
commit
ad907829de
3 changed files with 198 additions and 156 deletions
|
@ -508,6 +508,18 @@ function wizard_add()
|
|||
ucic:set("openmptcprouter","settings","country",country)
|
||||
ucic:save("openmptcprouter")
|
||||
|
||||
-- Get DNS64
|
||||
local dns64 = luci.http.formvalue("dns64") or "0"
|
||||
ucic:set("openmptcprouter","settings","dns64",dns64)
|
||||
ucic:save("openmptcprouter")
|
||||
if dns64 == "1" then
|
||||
ucic:set("unbound","ub_main","dns64","1")
|
||||
ucic:set("unbound","ub_main","validator","0")
|
||||
else
|
||||
ucic:set("unbound","ub_main","dns64","0")
|
||||
|
||||
end
|
||||
|
||||
-- Get Proxy set by default
|
||||
local default_proxy = luci.http.formvalue("default_proxy") or "shadowsocks"
|
||||
if default_proxy == "shadowsocks" and serversnb > 0 and serversnb > disablednb then
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
<div class="cbi-value" data-index="4">
|
||||
<label class="cbi-value-title"><%:Set server as master%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input class="cbi-input-radio" type="radio" name="master" value="<%=servername%>" <% if uci:get("openmptcprouter",servername,"master") == "1" then %>checked<% end %>/>
|
||||
<input class="cbi-input-radio" type="radio" name="master" value="<%=servername%>" <% if uci:get("openmptcprouter",servername,"master") == "1" then %>checked <% end %>/>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:Only one server can be master, else all servers are set as backup.%>
|
||||
|
@ -132,7 +132,7 @@
|
|||
<div class="cbi-value" data-index="5">
|
||||
<label class="cbi-value-title"><%:Disable server%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input class="cbi-input-radio" type="checkbox" name="<%=servername%>.openmptcprouter_vps_disabled" value="1" <% if uci:get("openmptcprouter",servername,"disabled") == "1" then %>checked<% end %>/>
|
||||
<input class="cbi-input-radio" type="checkbox" name="<%=servername%>.openmptcprouter_vps_disabled" value="1" <% if uci:get("openmptcprouter",servername,"disabled") == "1" then %>checked <% end %>/>
|
||||
</div>
|
||||
</div>
|
||||
<%
|
||||
|
@ -194,6 +194,16 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Enable DNS64%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input class="cbi-input-checkbox" type="checkbox" name="dns64" value="1" <% if uci:get("openmptcprouter","settings","dns64") == "1" then %>checked <% end %>/>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:If host support NAT64, you can enable DNS64 support.%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="cbi-section" id="proxy">
|
||||
<legend><%:Proxy settings%></legend>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue