1
0
Fork 0
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:
Ycarus (Yannick Chabanois) 2021-04-28 17:39:43 +02:00
parent 2e533166cc
commit 1455eec318
3 changed files with 21 additions and 3 deletions

View file

@ -3,11 +3,19 @@
# Released under GPL 3. See LICENSE for the full terms.
{
START=70
START=99
STOP=10
USE_PROCD=1
}
wireguard_restart() {
local interface=$1
if [ "$(uci -q get network.${interface}.proto)" = "wireguard" ] && [ -n "$(uci -q get network.${interface}.fwmark)" ]; then
ifdown ${interface}
ifup ${interface}
fi
}
_getremoteip() {
[ "$(uci -q get openmptcprouter.$1.master)" = "1" ] && {
remoteip=$(uci -q get openmptcprouter.$1.ip | awk '{print $1}')
@ -271,6 +279,16 @@ start_service()
commit shadowsocks-libev
EOF
fi
if [ "$BOOT" = "1" ]; then
config_load network
config_foreach wireguard_restart interface
fi
}
boot() {
BOOT=1
start
}
service_triggers() {