1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 19:41:51 +00:00

Add rate auto for glorytun UDP

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-01-30 10:08:50 +01:00
parent 2c5ac1fcbe
commit 1c1666e200

View file

@ -434,12 +434,12 @@ fi
upload="$(uci -q get network.$OMR_TRACKER_INTERFACE.uploadspeed)"
[ -z "$upload" ] && upload="$(uci -q get sqm.$OMR_TRACKER_INTERFACE.upload)"
if [ "$download" != "0" ] && [ "$download" != "" ] && [ "$upload" != "0" ] && [ "$upload" != "" ]; then
glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 up rate tx ${upload}000 rx ${download}000 > /dev/null 2>&1
glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 up rate auto tx ${upload}000 rx ${download}000 > /dev/null 2>&1
else
glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 up rate tx 125000000 rx 125000000 > /dev/null 2>&1
glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 up rate auto tx 125000000 rx 125000000 > /dev/null 2>&1
fi
}
[ "$multipath_config" = "backup" ] && glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 backup rate rx 125000000 tx 125000000 > /dev/null 2>&1
[ "$multipath_config" = "backup" ] && glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 backup rate auto rx 125000000 tx 125000000 > /dev/null 2>&1
[ "$multipath_status" = "$multipath_config" ] || {
if [ "$(sysctl -n net.mptcp.mptcp_enabled | tr -d '\n')" = "1" ]; then
_log "Multipath $OMR_TRACKER_DEVICE switched to $multipath_config"