mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Fix bug
This commit is contained in:
		
							parent
							
								
									bbdff033ce
								
							
						
					
					
						commit
						d1cd671bec
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -103,8 +103,8 @@ func (l *links) call(u *url.URL, sintf string) error {
 | 
			
		|||
		// the host-port combo from the query option and then seeing if it parses to an
 | 
			
		||||
		// IP address successfully or not.
 | 
			
		||||
		if sni := u.Query().Get("sni"); sni != "" {
 | 
			
		||||
			if host, _, err := net.SplitHostPort(sni); err == nil && net.ParseIP(host) == nil {
 | 
			
		||||
				tcpOpts.tlsSNI = host
 | 
			
		||||
			if net.ParseIP(sni) == nil {
 | 
			
		||||
				tcpOpts.tlsSNI = sni
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		// If the SNI is not configured still because the above failed then we'll try
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue