mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Fix MPTCP over VPN with Wireguard
This commit is contained in:
parent
44dc902961
commit
2e533166cc
3 changed files with 81 additions and 21 deletions
|
@ -1211,7 +1211,7 @@ function interfaces_status()
|
|||
-- Detect WAN gateway status
|
||||
local gw_ping = "UP"
|
||||
local gw_ping6 = "UP"
|
||||
if ifname ~= nil and not (ifname:match("^tun.*") or interface:match("^ovpn.*")) then
|
||||
if ifname ~= nil and not (ifname:match("^tun.*") or interface:match("^ovpn.*") or interface:match("^wg.*")) then
|
||||
if proto ~= "dhcpv6" then
|
||||
gateway = ut.trim(sys.exec("ip -4 r list dev " .. ifname .. " | grep via | grep -v default | grep -v metric | awk '{print $1}' | tr -d '\n'"))
|
||||
end
|
||||
|
@ -1421,7 +1421,7 @@ function interfaces_status()
|
|||
local publicIP6 = ""
|
||||
|
||||
if connectivity ~= "ERROR" then
|
||||
if ifname ~= nil and ifname:match("^tun.*") and interface:match("^ovpn.*") then
|
||||
if ifname ~= nil and (ifname:match("^tun.*") and interface:match("^ovpn.*")) then
|
||||
publicIP = uci:get("openmptcprouter",interface:sub(5),"publicip") or ""
|
||||
if ifname ~= nil and ipaddr ~= "" and publicIP == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
|
||||
publicIP = ut.trim(sys.exec("omr-ip-intf " .. get_device(interface:sub(5))))
|
||||
|
@ -1430,6 +1430,15 @@ function interfaces_status()
|
|||
if ifname ~= nil and ip6addr ~= "" and publicIP6 == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
|
||||
publicIP6 = ut.trim(sys.exec("omr-ip6-intf " .. get_device(interface:sub(5))))
|
||||
end
|
||||
elseif ifname ~= nil and interface:match("^wg.*") then
|
||||
publicIP = uci:get("openmptcprouter",interface:sub(3),"publicip") or ""
|
||||
if ifname ~= nil and ipaddr ~= "" and publicIP == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
|
||||
publicIP = ut.trim(sys.exec("omr-ip-intf " .. get_device(interface:sub(3))))
|
||||
end
|
||||
publicIP6 = uci:get("openmptcprouter",interface:sub(3),"publicip6") or ""
|
||||
if ifname ~= nil and ip6addr ~= "" and publicIP6 == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
|
||||
publicIP6 = ut.trim(sys.exec("omr-ip6-intf " .. get_device(interface:sub(3))))
|
||||
end
|
||||
else
|
||||
publicIP = uci:get("openmptcprouter",interface,"publicip") or ""
|
||||
if ifname ~= nil and ipaddr ~= "" and publicIP == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue