mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Add OpenVPN Bonding support
This commit is contained in:
parent
0f87c62f36
commit
8ef4df91e7
4 changed files with 108 additions and 7 deletions
|
@ -631,8 +631,8 @@ function wizard_add()
|
|||
ucic:set("glorytun","vpn","remoteip","10.255.255.1")
|
||||
ucic:set("network","omr6in4","ipaddr","10.255.255.2")
|
||||
ucic:set("network","omr6in4","peeraddr","10.255.255.1")
|
||||
ucic:set("network","omrvpn","proto","none")
|
||||
end
|
||||
ucic:set("network","omrvpn","proto","none")
|
||||
else
|
||||
ucic:set("glorytun","vpn","key","")
|
||||
--ucic:set("glorytun","vpn","enable",0)
|
||||
|
@ -656,8 +656,8 @@ function wizard_add()
|
|||
ucic:set("glorytun-udp","vpn","remoteip","10.255.254.1")
|
||||
ucic:set("network","omr6in4","ipaddr","10.255.254.2")
|
||||
ucic:set("network","omr6in4","peeraddr","10.255.254.1")
|
||||
ucic:set("network","omrvpn","proto","none")
|
||||
end
|
||||
ucic:set("network","omrvpn","proto","none")
|
||||
else
|
||||
ucic:set("glorytun-udp","vpn","key","")
|
||||
end
|
||||
|
@ -677,9 +677,11 @@ function wizard_add()
|
|||
ucic:set("dsvpn","vpn","key",dsvpn_key)
|
||||
ucic:set("dsvpn","vpn","localip","10.255.251.2")
|
||||
ucic:set("dsvpn","vpn","remoteip","10.255.251.1")
|
||||
ucic:set("network","omr6in4","ipaddr","10.255.251.2")
|
||||
ucic:set("network","omr6in4","peeraddr","10.255.251.1")
|
||||
ucic:set("network","omrvpn","proto","none")
|
||||
if default_vpn == "dsvpn" then
|
||||
ucic:set("network","omr6in4","ipaddr","10.255.251.2")
|
||||
ucic:set("network","omr6in4","peeraddr","10.255.251.1")
|
||||
ucic:set("network","omrvpn","proto","none")
|
||||
end
|
||||
else
|
||||
ucic:set("dsvpn","vpn","key","")
|
||||
--ucic:set("dsvpn","vpn","enable",0)
|
||||
|
@ -770,6 +772,7 @@ function wizard_add()
|
|||
luci.sys.call("/etc/init.d/mlvpn restart >/dev/null 2>/dev/null")
|
||||
--luci.sys.call("/etc/init.d/ubond restart >/dev/null 2>/dev/null")
|
||||
luci.sys.call("/etc/init.d/openvpn restart >/dev/null 2>/dev/null")
|
||||
luci.sys.call("/etc/init.d/openvpnbonding restart >/dev/null 2>/dev/null")
|
||||
luci.sys.call("/etc/init.d/dsvpn restart >/dev/null 2>/dev/null")
|
||||
luci.sys.call("/etc/init.d/omr-tracker start >/dev/null 2>/dev/null")
|
||||
luci.sys.call("/etc/init.d/omr-6in4 restart >/dev/null 2>/dev/null")
|
||||
|
|
|
@ -306,6 +306,8 @@
|
|||
<% if nixio.fs.access("/usr/sbin/ubond") then %><option value="ubond" <% if uci:get("ubond","general","enable") == "1" then %>selected="selected"<% end %>>UBOND</option><% end %>
|
||||
<% elseif vpn == "openvpn" then %>
|
||||
<% if nixio.fs.access("/etc/init.d/openvpn") then %><option value="openvpn" <% if uci:get("openvpn","omr","enabled") == "1" then %>selected="selected"<% end %>>OpenVPN TCP</option><% end %>
|
||||
<% elseif vpn == "openvpn_bonding" then %>
|
||||
<% if nixio.fs.access("/etc/init.d/openvpnbonding") then %><option value="openvpn_bonding" <% if uci:get("openmptcprouter","settings","vpn") == "openvpn_bonding" then %>selected="selected"<% end %>>OpenVPN Bonding</option><% end %>
|
||||
<%
|
||||
end
|
||||
end
|
||||
|
@ -319,7 +321,8 @@
|
|||
<% if nixio.fs.access("/usr/sbin/dsvpn") then %><option value="dsvpn" <% if uci:get("dsvpn","vpn","enable") == "1" then %>selected="selected"<% end %>>A Dead Simple VPN</option><% end %>
|
||||
<% if nixio.fs.access("/usr/sbin/mlvpn") then %><option value="mlvpn" <% if uci:get("mlvpn","general","enable") == "1" then %>selected="selected"<% end %>>MLVPN</option><% end %>
|
||||
<% if nixio.fs.access("/usr/sbin/ubond") then %><option value="ubond" <% if uci:get("ubond","general","enable") == "1" then %>selected="selected"<% end %>>UBOND</option><% end %>
|
||||
<% if nixio.fs.access("/usr/sbin/openvpn") then %><option value="openvpn" <% if uci:get("openvpn","omr","enabled") == "1" then %>selected="selected"<% end %>>OpenVPN</option><% end %>
|
||||
<% if nixio.fs.access("/etc/init.d/openvpn") then %><option value="openvpn" <% if uci:get("openvpn","omr","enabled") == "1" then %>selected="selected"<% end %>>OpenVPN</option><% end %>
|
||||
<% if nixio.fs.access("/etc/init.d/openvpnbonding") then %><option value="openvpn_bonding" <% if uci:get("openmptcprouter","settings","vpn") == "openvpn_bonding" then %>selected="selected"<% end %>>OpenVPN Bonding</option><% end %>
|
||||
<option value="none" <% if uci:get("openmptcprouter","settings","vpn") == "none" then %>selected="selected"<% end %>>None</option>
|
||||
<%
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue