mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix unmanaged omrvpn
This commit is contained in:
parent
cb810c5285
commit
4165a7da00
1 changed files with 3 additions and 2 deletions
|
@ -216,12 +216,15 @@ function wizard_add()
|
||||||
if default_vpn:match("^glorytun.*") then
|
if default_vpn:match("^glorytun.*") then
|
||||||
vpn_port = 65001
|
vpn_port = 65001
|
||||||
vpn_intf = "tun0"
|
vpn_intf = "tun0"
|
||||||
|
ucic:set("network","omrvpn","proto","none")
|
||||||
elseif default_vpn == "mlvpn" then
|
elseif default_vpn == "mlvpn" then
|
||||||
vpn_port = 65201
|
vpn_port = 65201
|
||||||
vpn_intf = "mlvpn0"
|
vpn_intf = "mlvpn0"
|
||||||
|
ucic:set("network","omrvpn","proto","dhcp")
|
||||||
elseif default_vpn == "openvpn" then
|
elseif default_vpn == "openvpn" then
|
||||||
vpn_port = 65301
|
vpn_port = 65301
|
||||||
vpn_intf = "tun0"
|
vpn_intf = "tun0"
|
||||||
|
ucic:set("network","omrvpn","proto","dhcp")
|
||||||
end
|
end
|
||||||
if vpn_intf ~= "" then
|
if vpn_intf ~= "" then
|
||||||
ucic:set("network","omrvpn","ifname",vpn_intf)
|
ucic:set("network","omrvpn","ifname",vpn_intf)
|
||||||
|
@ -345,10 +348,8 @@ function wizard_add()
|
||||||
-- Set Glorytun settings
|
-- Set Glorytun settings
|
||||||
if default_vpn:match("^glorytun.*") then
|
if default_vpn:match("^glorytun.*") then
|
||||||
ucic:set("glorytun","vpn","enable",1)
|
ucic:set("glorytun","vpn","enable",1)
|
||||||
ucic:set("network","omrvpn","proto","none")
|
|
||||||
else
|
else
|
||||||
ucic:set("glorytun","vpn","enable",0)
|
ucic:set("glorytun","vpn","enable",0)
|
||||||
ucic:set("network","omrvpn","proto","dhcp")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local glorytun_key = luci.http.formvalue("glorytun_key")
|
local glorytun_key = luci.http.formvalue("glorytun_key")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue