MCPcopy Create free account
hub / github.com/Invisv-Privacy/masque / ConnectToProxy

Method ConnectToProxy

http2/client.go:101–114  ·  view source on GitHub ↗

ConnectToProxy connects the Client to the proxy.

()

Source from the content-addressed store, hash-verified

99
100// ConnectToProxy connects the Client to the proxy.
101func (c *Client) ConnectToProxy() error {
102 h2T, err := c.dialProxyViaH2()
103 if err != nil {
104 return err
105 }
106 c.h2Transport = h2T
107
108 tr, err := c.dialProxyViaTLS()
109 if err != nil {
110 return err
111 }
112 c.tlsConn = tr
113 return nil
114}
115
116// makeNewH2ClientConn must be called while c.mu is held.
117func (c *Client) makeNewH2ClientConn(addr string) (*gohttp2.ClientConn, error) {

Callers 2

connectToRelayFunction · 0.95
TestCreateTCPStreamFunction · 0.95

Calls 2

dialProxyViaH2Method · 0.95
dialProxyViaTLSMethod · 0.95

Tested by 1

TestCreateTCPStreamFunction · 0.76