mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add option to choose country
This commit is contained in:
parent
301eb4c9fc
commit
be059a42ae
3 changed files with 42 additions and 2 deletions
|
@ -505,6 +505,11 @@ function wizard_add()
|
|||
ucic:set("openmptcprouter","settings","mptcpovervpn",mptcpovervpn_vpn)
|
||||
ucic:save("openmptcprouter")
|
||||
|
||||
-- Get Country
|
||||
local country = luci.http.formvalue("country") or "world"
|
||||
ucic:set("openmptcprouter","settings","country",country)
|
||||
ucic:save("openmptcprouter")
|
||||
|
||||
-- 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
|
||||
|
|
|
@ -147,9 +147,9 @@
|
|||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="cbi-section" id="server_common">
|
||||
<legend><%:Common server settings%></legend>
|
||||
<legend><%:Advanced settings%></legend>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Advanced settings%></label>
|
||||
<label class="cbi-value-title"><%:Show advanced settings%></label>
|
||||
<div class="cbi-value-field">
|
||||
<input type="checkbox" class="cbi-input-checkbox" id="showadv" value="1" onclick="jsshowadv()" />
|
||||
</div>
|
||||
|
@ -382,6 +382,23 @@
|
|||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="cbi-section" id="country">
|
||||
<legend><%:Country settings%></legend>
|
||||
<div class="cbi-section-descr"><%:Set configuration for countries with some specificities.%></div>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Country%></label>
|
||||
<div class="cbi-value-field">
|
||||
<select class="cbi-input-select" name="country" size="1">
|
||||
<option value="world" <% if uci:get("openmptcprouter","settings","country") == "world" or uci:get("openmptcprouter","settings","country") == nil then %>selected="selected"<% end %>>World</option>
|
||||
<option value="china" <% if uci:get("openmptcprouter","settings","country") == "china" then %>selected="selected"<% end %>>China</option>
|
||||
</select>
|
||||
<br />
|
||||
<div class="cbi-value-description">
|
||||
<%:For China, set an accessible DNS and disable DNSSEC.%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</span>
|
||||
<hr />
|
||||
<fieldset class="cbi-section" id="laninterfaces">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue