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

Merge pull request #346 from Ysurac/develop

sync
This commit is contained in:
suyuan 2023-08-26 18:13:57 +08:00 committed by GitHub
commit 896c29c4be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 392 additions and 59 deletions

View file

@ -1250,9 +1250,9 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$multipath_config" = "on" ] || [ "$mul
serverip="$(resolveip -4 -t 5 $serverip | head -n 1 | tr -d '\n')"
if [ "$download" != "0" ] && [ "$download" != "" ] && [ "$upload" != "0" ] && [ "$upload" != "" ]; then
if [ "$(uci -q get glorytun-udp.vpn.rateauto)" = "1" ]; then
glorytun-udp path addr $OMR_TRACKER_DEVICE_IP to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set up rate auto tx $((upload*1000/8)) rx $((download*1000/8)) pref 1 > /dev/null 2>&1
glorytun-udp path addr $OMR_TRACKER_DEVICE_IP to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set up rate auto tx $((upload*1000)) rx $((download*1000)) pref 1 > /dev/null 2>&1
else
glorytun-udp path addr $OMR_TRACKER_DEVICE_IP to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set up rate fixed tx $((upload*1000/8)) rx $((download*1000/8)) pref 1 > /dev/null 2>&1
glorytun-udp path addr $OMR_TRACKER_DEVICE_IP to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set up rate fixed tx $((upload*1000)) rx $((download*1000)) pref 1 > /dev/null 2>&1
fi
else
if [ "$(uci -q get glorytun-udp.vpn.rateauto)" = "1" ]; then
@ -1266,9 +1266,9 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && ([ "$multipath_config" = "on" ] || [ "$mul
serverip="$(resolveip -6 -t 5 $serverip | head -n 1 | tr -d '\n')"
if [ "$download" != "0" ] && [ "$download" != "" ] && [ "$upload" != "0" ] && [ "$upload" != "" ]; then
if [ "$(uci -q get glorytun-udp.vpn.rateauto)" = "1" ]; then
glorytun-udp path addr $OMR_TRACKER_DEVICE_IP6 to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set up rate auto tx $((upload*1000/8)) rx $((download*1000/8)) pref 1 > /dev/null 2>&1
glorytun-udp path addr $OMR_TRACKER_DEVICE_IP6 to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set up rate auto tx $((upload*1000)) rx $((download*1000)) pref 1 > /dev/null 2>&1
else
glorytun-udp path addr $OMR_TRACKER_DEVICE_IP6 to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set up rate fixed tx $((upload*1000/8)) rx $((download*1000/8)) pref 1 > /dev/null 2>&1
glorytun-udp path addr $OMR_TRACKER_DEVICE_IP6 to addr $serverip port ${gtudp_port} dev ${gtudp_dev} set up rate fixed tx $((upload*1000)) rx $((download*1000)) pref 1 > /dev/null 2>&1
fi
else
if [ "$(uci -q get glorytun-udp.vpn.rateauto)" = "1" ]; then