1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2021-04-19 21:37:40 +02:00
parent 2b77b200f4
commit ad907829de
3 changed files with 198 additions and 156 deletions

View file

@ -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