add http2 tunnel

This commit is contained in:
ginuerzh
2021-12-15 15:19:19 +08:00
parent c651743ea2
commit 5bd3c25c65
12 changed files with 392 additions and 118 deletions

View File

@ -80,20 +80,6 @@ func (d *http2Dialer) Dial(ctx context.Context, address string, opts ...dialer.D
ExpectContinueTimeout: 1 * time.Second,
},
}
/*
client = &http.Client{
Transport: &http2.Transport{
TLSClientConfig: d.md.tlsConfig,
DialTLS: func(network, addr string, cfg *tls.Config) (net.Conn, error) {
conn, err := d.dial(ctx, network, addr, options)
if err != nil {
return nil, err
}
return tls_util.WrapTLSClient(conn, cfg, time.Duration(0))
},
},
}
*/
d.clients[address] = client
}