mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Disable glorytun UDP rate auto by default
This commit is contained in:
		
							parent
							
								
									14a25efa0c
								
							
						
					
					
						commit
						b6aad61db5
					
				
					 1 changed files with 10 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -446,9 +446,17 @@ fi
 | 
			
		|||
	[ -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 [ "$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
 | 
			
		||||
			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
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue