Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mcamou committed Nov 21, 2024
1 parent b7a66ed commit 5c8ff3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/network/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ func NewProxy(host host.Host, listenAddr string, listenPort uint16, targetPort u
return &Proxy{host, addr, listenPort, targetPort}, nil
}

// streamHandler handles the incoming libp2p streams. The stream will contain an HTTP request.
// We need to parse it, make the request on behalf of the original node, write the response to
// the stream, and close it.
// streamHandler handles the incoming libp2p streams. We know that the stream will contain an
// HTTP request, but strictly speaking we don't care (since CONNECT should act as a transparent
// tunnel).
func (p *Proxy) streamHandler(stream network.Stream) {
target := fmt.Sprintf("localhost:%d", p.targetPort)
conn, err := net.Dial("tcp", target)
Expand Down

0 comments on commit 5c8ff3d

Please sign in to comment.