Add h2Alpn option for TLS ClientHello

This commit is contained in:
wenyifan
2022-10-19 10:06:58 +08:00
parent ce15e23ce2
commit 85171b62b3
5 changed files with 110 additions and 76 deletions

View File

@ -161,7 +161,7 @@ func (tr *http2Transporter) Dial(addr string, options ...DialOption) (net.Conn,
if err != nil {
return nil, err
}
return wrapTLSClient(conn, cfg, timeout)
return wrapTLSClient(conn, cfg, timeout, opts.H2Alpn)
},
}
client = &http.Client{
@ -242,7 +242,7 @@ func (tr *h2Transporter) Dial(addr string, options ...DialOption) (net.Conn, err
if tr.tlsConfig == nil {
return conn, nil
}
return wrapTLSClient(conn, cfg, timeout)
return wrapTLSClient(conn, cfg, timeout, opts.H2Alpn)
},
}
client = &http.Client{