mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			438 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			438 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
| #!/bin/sh
 | |
| # vim: set noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 :
 | |
| 
 | |
| INTERFACE="$1"
 | |
| HOST="proof.ovh.net"
 | |
| 
 | |
| trap : HUP INT TERM
 | |
| if [ -z "$INTERFACE" ]; then
 | |
| 	curl -6 http://$HOST/files/10Gio.dat >/dev/null || echo
 | |
| else
 | |
| 	hostip=$(dig +short AAAA $HOST | tr -d "\n")
 | |
| 	ipset add ss_rules6_dst_bypass_all $hostip
 | |
| 	curl -6 --interface $INTERFACE http://$HOST/files/10Gio.dat >/dev/null || echo
 | |
| 	ipset del ss_rules6_dst_bypass_all $hostip
 | |
| fi
 |