Skip to content

Commit a23c825

Browse files
committed
Reject IP literal server name with TLS spoof
1 parent 3bf4216 commit a23c825

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

common/tls/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func parseTLSSpoofOptions(serverName string, options option.OutboundTLSOptions)
3030
if !tlsspoof.PlatformSupported {
3131
return "", 0, E.New("`spoof` is not supported on this platform")
3232
}
33-
if options.DisableSNI || serverName == "" {
33+
if options.DisableSNI || serverName == "" || M.ParseAddr(serverName).IsValid() {
3434
return "", 0, E.New("`spoof` requires TLS ClientHello with SNI")
3535
}
3636
method, err := tlsspoof.ParseMethod(options.SpoofMethod)

0 commit comments

Comments
 (0)