SetTLSHandshake set the custom tls handshake function, only valid for HTTP1 and HTTP2, not HTTP3, it specifies an optional dial function for tls handshake, it works even if a proxy is set, can be used to customize the tls fingerprint.
(fn func(ctx context.Context, addr string, plainConn net.Conn) (conn net.Conn, tlsState *tls.ConnectionState, err error))
| 1299 | // it specifies an optional dial function for tls handshake, it works even if a proxy is set, can be |
| 1300 | // used to customize the tls fingerprint. |
| 1301 | func (c *Client) SetTLSHandshake(fn func(ctx context.Context, addr string, plainConn net.Conn) (conn net.Conn, tlsState *tls.ConnectionState, err error)) *Client { |
| 1302 | c.Transport.SetTLSHandshake(fn) |
| 1303 | return c |
| 1304 | } |
| 1305 | |
| 1306 | // SetTLSHandshakeTimeout set the TLS handshake timeout. |
| 1307 | func (c *Client) SetTLSHandshakeTimeout(timeout time.Duration) *Client { |