1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Changes for MPTCPoverVPN

This commit is contained in:
Ycarus (Yannick Chabanois) 2019-11-17 20:48:13 +01:00
parent 3f2d37f810
commit 1400f7b0aa
4 changed files with 184 additions and 8 deletions

View file

@ -23,7 +23,8 @@ mptcp_over_vpn() {
config_load_openmptcprouter
config_foreach _getremoteip server
localip=$(ubus call network.interface.$interface status | jsonfilter -e '@["ipv4-address"][0].address' | tr -d "\n")
multipath=$(uci -q get network.${interface}.multipath)
[ -z "$(uci -q get openmptcprouter.ovpn${interface}.multipath)" ] && multipath=$(uci -q get network.${interface}.multipath)
[ -n "$(uci -q get openmptcprouter.ovpn${interface}.multipath)" ] && multipath=$(uci -q get openmptcprouter.ovpn${interface}.multipath)
[ -z "$multipath" ] && multipath="on"
uci -q batch <<-EOF >/dev/null
set network.ovpn${interface}=interface
@ -32,6 +33,7 @@ mptcp_over_vpn() {
set network.ovpn${interface}.peerdns='0'
set network.ovpn${interface}.proto='none'
set network.ovpn${interface}.multipath='on'
set network.${interface}.multipath='off'
commit network
set openvpn.${interface}=openvpn
set openvpn.${interface}.dev="tun${id}"