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

Disable glorytun UDP rate auto by default

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-02-28 09:03:00 +01:00
parent 14a25efa0c
commit b6aad61db5

View file

@ -446,9 +446,17 @@ fi
[ -z "$upload" ] && upload="$(uci -q get sqm.$OMR_TRACKER_INTERFACE.upload)" [ -z "$upload" ] && upload="$(uci -q get sqm.$OMR_TRACKER_INTERFACE.upload)"
if [ "$(pgrep glorytun-udp)" != "" ] && ([ "$(glorytun-udp path | grep $OMR_TRACKER_DEVICE_IP)" = "" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $15'})" = "0" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $18'})" = "0" ]); then if [ "$(pgrep glorytun-udp)" != "" ] && ([ "$(glorytun-udp path | grep $OMR_TRACKER_DEVICE_IP)" = "" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $15'})" = "0" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $18'})" = "0" ]); then
if [ "$download" != "0" ] && [ "$download" != "" ] && [ "$upload" != "0" ] && [ "$upload" != "" ]; then if [ "$download" != "0" ] && [ "$download" != "" ] && [ "$upload" != "0" ] && [ "$upload" != "" ]; then
glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 up rate auto tx ${upload}000 rx ${download}000 > /dev/null 2>&1 if [ "$(uci -q get glorytun.vpn.rateauto)" = "1" ]; then
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 ${upload}000 rx ${download}000 > /dev/null 2>&1
fi
else else
glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 up rate auto tx 125000000 rx 125000000 > /dev/null 2>&1 if [ "$(uci -q get glorytun.vpn.rateauto)" = "1" ]; then
glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 up rate auto tx 125000000 rx 125000000 > /dev/null 2>&1
else
glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 up rate tx 125000000 rx 125000000 > /dev/null 2>&1
fi
fi fi
fi fi
} }