mirror of
				https://github.com/nadoo/glider.git
				synced 2025-11-04 07:42:38 +08:00 
			
		
		
		
	tproxy: use continue instead of return
This commit is contained in:
		
							parent
							
								
									c293e58ac5
								
							
						
					
					
						commit
						72b24db91d
					
				@ -167,7 +167,7 @@ Examples:
 | 
			
		||||
    -listen on :1080 as socks5 server, forward requests via server1 and server2 in roundrbin mode.
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Advance Usage
 | 
			
		||||
## Advanced Usage
 | 
			
		||||
- [ConfigFile](config)
 | 
			
		||||
  - [glider.conf.example](config/glider.conf.example)
 | 
			
		||||
  - [office.rule.example](config/rules.d/office.rule.example)
 | 
			
		||||
 | 
			
		||||
@ -77,16 +77,16 @@ func (s *TProxy) ListenAndServeUDP() {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for {
 | 
			
		||||
 | 
			
		||||
		buf := make([]byte, 1024)
 | 
			
		||||
		_, srcAddr, dstAddr, err := ReadFromUDP(lc, buf)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			if netErr, ok := err.(net.Error); ok && netErr.Temporary() {
 | 
			
		||||
				logf("proxy-tproxy Temporary error while reading data: %s", netErr)
 | 
			
		||||
				logf("proxy-tproxy temporary reading data error: %s", netErr)
 | 
			
		||||
				continue
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			logf("proxy-tproxy Unrecoverable error while reading data: %s", err)
 | 
			
		||||
			return
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		logf("proxy-tproxy Accepting UDP connection from %s with destination of %s", srcAddr.String(), dstAddr.String())
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user