mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
Add basic SNI support
By adding the server name as part of the TLS client configuration, gor will now support connecting to hosts that require SNI (such as Amazon API Gateway).
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@ func (c *HTTPClient) Connect() (err error) {
|
||||
}
|
||||
|
||||
if c.scheme == "https" {
|
||||
tlsConn := tls.Client(c.conn, &tls.Config{InsecureSkipVerify: true})
|
||||
tlsConn := tls.Client(c.conn, &tls.Config{InsecureSkipVerify: true, ServerName: c.host})
|
||||
|
||||
if err = tlsConn.Handshake(); err != nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user