mirror of
				https://github.com/nadoo/glider.git
				synced 2025-11-04 07:42:38 +08:00 
			
		
		
		
	kcp, tls and unix are transport protocols,only used with one proxy protocol,
if there are more than 2 protocols in the listen, it will cause trouble.
This commit is contained in:
		
							parent
							
								
									bb105589b6
								
							
						
					
					
						commit
						6f6261edc4
					
				@ -133,7 +133,7 @@ func NewKCPServer(s string, dialer proxy.Dialer) (proxy.Server, error) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	// prepare transport listener
 | 
						// prepare transport listener
 | 
				
			||||||
	// TODO: check here
 | 
						// TODO: check here
 | 
				
			||||||
	if len(transport) < 2 {
 | 
						if len(transport) != 2 {
 | 
				
			||||||
		return nil, errors.New("[kcp] malformd listener:" + s)
 | 
							return nil, errors.New("[kcp] malformd listener:" + s)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -92,7 +92,7 @@ func NewTLSServer(s string, dialer proxy.Dialer) (proxy.Server, error) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	// prepare transport listener
 | 
						// prepare transport listener
 | 
				
			||||||
	// TODO: check here
 | 
						// TODO: check here
 | 
				
			||||||
	if len(transport) < 2 {
 | 
						if len(transport) != 2 {
 | 
				
			||||||
		return nil, errors.New("[tls] malformd listener:" + s)
 | 
							return nil, errors.New("[tls] malformd listener:" + s)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -51,7 +51,7 @@ func NewUnixServer(s string, dialer proxy.Dialer) (proxy.Server, error) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	// prepare transport listener
 | 
						// prepare transport listener
 | 
				
			||||||
	// TODO: check here
 | 
						// TODO: check here
 | 
				
			||||||
	if len(transport) < 2 {
 | 
						if len(transport) != 2 {
 | 
				
			||||||
		return nil, errors.New("[unix] malformd listener:" + s)
 | 
							return nil, errors.New("[unix] malformd listener:" + s)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user