Browse Source

Fix: SNI condition was both incorrect (checked
wrong variable) and unnecessary.

Rod Hynes 9 years ago
parent
commit
533b75c437
1 changed files with 1 additions and 3 deletions
  1. 1 3
      psiphon/tlsDialer.go

+ 1 - 3
psiphon/tlsDialer.go

@@ -204,9 +204,7 @@ func CustomTLSDial(network, addr string, config *CustomTLSConfig) (net.Conn, err
 		// Set the ServerName and rely on the usual logic in
 		// tls.Conn.Handshake() to do its verification.
 		// Note: Go TLS will automatically omit this ServerName when it's an IP address
-		if net.ParseIP(hostname) == nil {
-			tlsConfig.ServerName = config.SNIServerName
-		}
+		tlsConfig.ServerName = config.SNIServerName
 	} else {
 		// No SNI.
 		// Disable verification in tls.Conn.Handshake().  We'll verify manually