19 lines
		
	
	
	
		
			397 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			397 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/bin/sh /etc/rc.common
 | 
						|
 | 
						|
START=99
 | 
						|
 | 
						|
start() {
 | 
						|
        # install socat to ram
 | 
						|
        if [ ! -f /tmp/usr/bin/socat ]; then
 | 
						|
                /bin/sleep 60
 | 
						|
                opkg update
 | 
						|
                opkg install socat -d ram
 | 
						|
        fi
 | 
						|
 | 
						|
        # start stream proxy
 | 
						|
        /tmp/usr/bin/socat TCP-LISTEN:8000,reuseaddr,fork,su=nobody,pf=ip6 TCP:192.168.3.4:8000 &
 | 
						|
}
 | 
						|
 | 
						|
stop() {
 | 
						|
        killall socat
 | 
						|
}
 |