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
2e533166cc
commit
1455eec318
3 changed files with 21 additions and 3 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue