mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Try to fix glorytun udp backup
This commit is contained in:
		
							parent
							
								
									c0b5bb4652
								
							
						
					
					
						commit
						db0ba4af80
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -580,22 +580,22 @@ if [ "$multipath_config" = "on" ] || [ "$multipath_config" = "backup" ]; then
 | 
			
		|||
	if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" != "1" ] && [ "$(pgrep glorytun-udp)" != "" ] && [ "$(glorytun-udp path | grep $OMR_TRACKER_DEVICE_IP)" = "" ]; then
 | 
			
		||||
		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 dev tun0 set up rate auto tx $((upload*1000/8)) rx $((download*1000/8)) > /dev/null 2>&1
 | 
			
		||||
				glorytun-udp path addr $OMR_TRACKER_DEVICE_IP dev tun0 set up rate pref 1 auto tx $((upload*1000/8)) rx $((download*1000/8)) > /dev/null 2>&1
 | 
			
		||||
			else
 | 
			
		||||
				glorytun-udp path addr $OMR_TRACKER_DEVICE_IP dev tun0 set up rate fixed tx $((upload*1000/8)) rx $((download*1000/8)) > /dev/null 2>&1
 | 
			
		||||
				glorytun-udp path addr $OMR_TRACKER_DEVICE_IP dev tun0 set up rate pref 1 fixed tx $((upload*1000/8)) rx $((download*1000/8)) > /dev/null 2>&1
 | 
			
		||||
			fi
 | 
			
		||||
		else
 | 
			
		||||
			if [ "$(uci -q get glorytun-udp.vpn.rateauto)" = "1" ]; then
 | 
			
		||||
				glorytun-udp path addr $OMR_TRACKER_DEVICE_IP dev tun0 set up rate auto tx 12500000 rx 12500000 > /dev/null 2>&1
 | 
			
		||||
				glorytun-udp path addr $OMR_TRACKER_DEVICE_IP dev tun0 set up pref 1 rate auto tx 12500000 rx 12500000 > /dev/null 2>&1
 | 
			
		||||
			else
 | 
			
		||||
				glorytun-udp path addr $OMR_TRACKER_DEVICE_IP dev tun0 set up rate fixed tx 12500000 rx 12500000 > /dev/null 2>&1
 | 
			
		||||
				glorytun-udp path addr $OMR_TRACKER_DEVICE_IP dev tun0 set up pref 1 rate fixed tx 12500000 rx 12500000 > /dev/null 2>&1
 | 
			
		||||
			fi
 | 
			
		||||
		fi
 | 
			
		||||
	fi
 | 
			
		||||
#	if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.vpn)" != "1" ] && [ "$(pgrep glorytun-udp)" != "" ] && [ "$(glorytun-udp set | grep 'kxtimeout 7d')" = "" ]; then
 | 
			
		||||
#		glorytun-udp set dev tun0 kxtimeout 7d > /dev/null 2>&1
 | 
			
		||||
#	fi
 | 
			
		||||
	[ "$multipath_config" = "backup" ] && [ "$(pgrep glorytun-udp)" != "" ] && glorytun-udp path addr $OMR_TRACKER_DEVICE_IP dev tun0 set pref 500 > /dev/null 2>&1
 | 
			
		||||
	[ "$multipath_config" = "backup" ] && [ "$(pgrep glorytun-udp)" != "" ] && glorytun-udp path addr $OMR_TRACKER_DEVICE_IP dev tun0 set pref 200 > /dev/null 2>&1
 | 
			
		||||
fi
 | 
			
		||||
[ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.multipathvpn)" != "1" ] && {
 | 
			
		||||
	[ "$multipath_status" = "$multipath_config" ] || {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue