MCPcopy
hub / github.com/coyove/goflyway / dialHostAndBridge

Method dialHostAndBridge

proxy/client.go:328–338  ·  view source on GitHub ↗
(downstreamConn net.Conn, host string, resp []byte)

Source from the content-addressed store, hash-verified

326}
327
328func (proxy *ProxyClient) dialHostAndBridge(downstreamConn net.Conn, host string, resp []byte) {
329 targetSiteConn, err := net.Dial("tcp", host)
330 if err != nil {
331 proxy.Logger.E("Dial", "Error", err)
332 downstreamConn.Close()
333 return
334 }
335
336 downstreamConn.Write(resp)
337 go proxy.Cipher.IO.Bridge(downstreamConn, targetSiteConn, nil, IOConfig{})
338}
339
340func (proxy *ProxyClient) ServeHTTP(w http.ResponseWriter, r *http.Request) {
341 if proxy.UserAuth != "" {

Callers 2

ServeHTTPMethod · 0.95
handleSocksMethod · 0.95

Calls 3

CloseMethod · 0.45
WriteMethod · 0.45
BridgeMethod · 0.45

Tested by

no test coverage detected