mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Little changes in wizard
This commit is contained in:
parent
0f524f175b
commit
dfbba31e1d
2 changed files with 10 additions and 2 deletions
|
@ -23,11 +23,15 @@ function wizard_add()
|
||||||
local gostatus = true
|
local gostatus = true
|
||||||
if add_interface ~= "" then
|
if add_interface ~= "" then
|
||||||
local i = 1
|
local i = 1
|
||||||
|
local multipath_master = false
|
||||||
ucic:foreach("network", "interface", function(s)
|
ucic:foreach("network", "interface", function(s)
|
||||||
local sectionname = s[".name"]
|
local sectionname = s[".name"]
|
||||||
if sectionname:match("^wan(%d+)$") then
|
if sectionname:match("^wan(%d+)$") then
|
||||||
i = i + 1
|
i = i + 1
|
||||||
end
|
end
|
||||||
|
if uci:get("network",sectionname,"multipath") == "master" then
|
||||||
|
multipath_master = true
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
local defif = ucic:get("network","wan1","ifname") or "eth0"
|
local defif = ucic:get("network","wan1","ifname") or "eth0"
|
||||||
ucic:set("network","wan" .. i,"interface")
|
ucic:set("network","wan" .. i,"interface")
|
||||||
|
@ -35,7 +39,11 @@ function wizard_add()
|
||||||
ucic:set("network","wan" .. i,"proto","static")
|
ucic:set("network","wan" .. i,"proto","static")
|
||||||
ucic:set("network","wan" .. i,"type","macvlan")
|
ucic:set("network","wan" .. i,"type","macvlan")
|
||||||
ucic:set("network","wan" .. i,"ip4table","wan")
|
ucic:set("network","wan" .. i,"ip4table","wan")
|
||||||
|
if multipath_master then
|
||||||
ucic:set("network","wan" .. i,"multipath","on")
|
ucic:set("network","wan" .. i,"multipath","on")
|
||||||
|
else
|
||||||
|
ucic:set("network","wan" .. i,"multipath","master")
|
||||||
|
end
|
||||||
ucic:set("network","wan" .. i,"defaultroute","0")
|
ucic:set("network","wan" .. i,"defaultroute","0")
|
||||||
ucic:save("network")
|
ucic:save("network")
|
||||||
ucic:commit("network")
|
ucic:commit("network")
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<br />
|
<br />
|
||||||
<div class="cbi-value-description">
|
<div class="cbi-value-description">
|
||||||
<span class="cbi-value-helpicon"><img src="/luci-static/resources/cbi/help.gif" alt="help" /></span>
|
<span class="cbi-value-helpicon"><img src="/luci-static/resources/cbi/help.gif" alt="help" /></span>
|
||||||
<%:Server IP will be set for ShadowSocks, Glorytun and MLVPN%>
|
<%:Server IP will be set for ShadowSocks, Glorytun, OpenVPN and MLVPN%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue