mirror of
				https://github.com/nadoo/glider.git
				synced 2025-11-04 07:42:38 +08:00 
			
		
		
		
	general: change NextDialer func
This commit is contained in:
		
							parent
							
								
									edb318d690
								
							
						
					
					
						commit
						02b9538134
					
				
							
								
								
									
										5
									
								
								http.go
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								http.go
									
									
									
									
									
								
							@ -25,8 +25,7 @@ type HTTP struct {
 | 
			
		||||
	password string
 | 
			
		||||
	xff      bool // X-Forwarded-For
 | 
			
		||||
	xsi      bool // X-Server-IP
 | 
			
		||||
 | 
			
		||||
	selfip string
 | 
			
		||||
	selfip   string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NewHTTP returns a http proxy.
 | 
			
		||||
@ -213,7 +212,7 @@ func (s *HTTP) servHTTPS(method, requestURI, proto string, c net.Conn) {
 | 
			
		||||
func (s *HTTP) Addr() string { return s.addr }
 | 
			
		||||
 | 
			
		||||
// NextDialer returns the next dialer
 | 
			
		||||
func (s *HTTP) NextDialer(dstAddr string) Dialer { return s.dialer }
 | 
			
		||||
func (s *HTTP) NextDialer(dstAddr string) Dialer { return s.dialer.NextDialer(dstAddr) }
 | 
			
		||||
 | 
			
		||||
// Dial connects to the address addr on the network net via the proxy.
 | 
			
		||||
func (s *HTTP) Dial(network, addr string) (net.Conn, error) {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								mixed.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								mixed.go
									
									
									
									
									
								
							@ -20,8 +20,8 @@ var httpMethods = [...][]byte{
 | 
			
		||||
// MixedProxy struct
 | 
			
		||||
type MixedProxy struct {
 | 
			
		||||
	dialer Dialer
 | 
			
		||||
 | 
			
		||||
	addr   string
 | 
			
		||||
 | 
			
		||||
	http   *HTTP
 | 
			
		||||
	socks5 *SOCKS5
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -219,7 +219,7 @@ func (s *SOCKS5) ListenAndServeUDP() {
 | 
			
		||||
func (s *SOCKS5) Addr() string { return s.addr }
 | 
			
		||||
 | 
			
		||||
// NextDialer returns the next dialer
 | 
			
		||||
func (s *SOCKS5) NextDialer(dstAddr string) Dialer { return s.dialer }
 | 
			
		||||
func (s *SOCKS5) NextDialer(dstAddr string) Dialer { return s.dialer.NextDialer(dstAddr) }
 | 
			
		||||
 | 
			
		||||
// Dial connects to the address addr on the network net via the SOCKS5 proxy.
 | 
			
		||||
func (s *SOCKS5) Dial(network, addr string) (net.Conn, error) {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								ss.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								ss.go
									
									
									
									
									
								
							@ -204,7 +204,7 @@ func ListCipher() string {
 | 
			
		||||
func (s *SS) Addr() string { return s.addr }
 | 
			
		||||
 | 
			
		||||
// NextDialer returns the next dialer
 | 
			
		||||
func (s *SS) NextDialer(dstAddr string) Dialer { return s.dialer }
 | 
			
		||||
func (s *SS) NextDialer(dstAddr string) Dialer { return s.dialer.NextDialer(dstAddr) }
 | 
			
		||||
 | 
			
		||||
// Dial connects to the address addr on the network net via the proxy.
 | 
			
		||||
func (s *SS) Dial(network, addr string) (net.Conn, error) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user