diff --git a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking index 6bf8afdf2..33b629612 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -383,6 +383,10 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then if [ "$(uci -q get mlvpn.general.enable)" = "1" ]; then /etc/init.d/mlvpn restart fi + if [ "$(uci -q get glorytun.vpn.enable)" = "1" ]; then + /etc/init.d/glorytun restart + /etc/init.d/glorytun-udp restart + fi config_load openmptcprouter config_foreach disable_pihole server #if [ "$(uci -q get openmptcprouter.settings.master)" != "balancing" ] || [ "$(uci -q get openmptcprouter.settings.vpn)" = "mlvpn" ]; then @@ -561,15 +565,15 @@ fi if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" != "1" ] && [ "$(pgrep glorytun-udp)" != "" ] && ([ "$(glorytun-udp path | grep $OMR_TRACKER_DEVICE_IP)" = "" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $13}')" = "0" ] || [ "$(glorytun-udp path $OMR_TRACKER_DEVICE_IP | awk '{print $16}')" = "0" ]); then if [ "$download" != "0" ] && [ "$download" != "" ] && [ "$upload" != "0" ] && [ "$upload" != "" ]; then if [ "$(uci -q get glorytun.vpn.rateauto)" = "1" ]; then - glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 set up rate auto tx ${upload}000 rx ${download}000 > /dev/null 2>&1 + glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 set up rate auto tx $((upload*1000/8)) rx $((download*1000/8)) > /dev/null 2>&1 else - glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 set up rate tx ${upload}000 rx ${download}000 > /dev/null 2>&1 + glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 set up rate fixed tx $((upload*1000/8)) rx $((download*1000/8)) > /dev/null 2>&1 fi else if [ "$(uci -q get glorytun.vpn.rateauto)" = "1" ]; then - glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 set up rate auto tx 125000000 rx 125000000 > /dev/null 2>&1 + glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 set up rate auto tx 12500000 rx 12500000 > /dev/null 2>&1 else - glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 set up rate tx 125000000 rx 125000000 > /dev/null 2>&1 + glorytun-udp path $OMR_TRACKER_DEVICE_IP dev tun0 set up rate fixed tx 12500000 rx 12500000 > /dev/null 2>&1 fi fi fi @@ -578,13 +582,13 @@ fi # if [ "$(uci -q get glorytun.vpn.rateauto)" = "1" ]; then # glorytun-udp path $OMR_TRACKER_DEVICE_IP to 10.255.250.1 $(uci -q get glorytun.vpn.port) dev tun0 set up rate auto tx ${upload}000 rx ${download}000 > /dev/null 2>&1 # else -# glorytun-udp path $OMR_TRACKER_DEVICE_IP to 10.255.250.1 $(uci -q get glorytun.vpn.port) dev tun0 set up rate tx ${upload}000 rx ${download}000 > /dev/null 2>&1 +# glorytun-udp path $OMR_TRACKER_DEVICE_IP to 10.255.250.1 $(uci -q get glorytun.vpn.port) dev tun0 set up rate fixed tx ${upload}000 rx ${download}000 > /dev/null 2>&1 # fi # else # if [ "$(uci -q get glorytun.vpn.rateauto)" = "1" ]; then # glorytun-udp path $OMR_TRACKER_DEVICE_IP to 10.255.250.1 $(uci -q get glorytun.vpn.port) dev tun0 set up rate auto tx 125000000 rx 125000000 > /dev/null 2>&1 # else -# glorytun-udp path $OMR_TRACKER_DEVICE_IP to 10.255.250.1 $(uci -q get glorytun.vpn.port) dev tun0 set up rate tx 125000000 rx 125000000 > /dev/null 2>&1 +# glorytun-udp path $OMR_TRACKER_DEVICE_IP to 10.255.250.1 $(uci -q get glorytun.vpn.port) dev tun0 set up rate fixed tx 125000000 rx 125000000 > /dev/null 2>&1 # fi # fi # fi @@ -643,7 +647,7 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($( uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE=interface } if [ "$(uci -q get openmptcprouter.latest_versions.lc)" = "" ] || [ $(($(date +"%s") - $(uci -q get openmptcprouter.latest_versions.lc))) -gt 3600 ]; then - local latestversions="$(wget -4 -qO- -T 3 http://www.openmptcprouter.com/version/version.json)" + local latestversions="$(curl -4 -s -m 3 https://www.openmptcprouter.com/version/version.json)" [ -n "$latestversions" ] && { uci -q set openmptcprouter.latest_versions=latest_versions uci -q set openmptcprouter.latest_versions.omr=$(echo $latestversions | jsonfilter -q -e '@.omr')