You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clientTlsReader := bufio.NewReader(rawClientTls)
for !isEof(clientTlsReader) {
// This reads a normal "GET / HTTP/1.1" request from the tunnel, as it thinks its
// talking directly to the server now, not to a proxy.
subReq, err := http.ReadRequest(clientTlsReader)
What happens here is that various sites do not properly close the TLS handshake and so the for loop continues on indefinitely. I've placed a timeout of 10 seconds on the loop, which helps a great deal. However, some connections cause the ReadRequest() to hang indefinitely. There is actually a comment above this section of code which describes the same problem.
I'm not sure why this section of code is in a for loop. Seems that a simple if...then statement would be a better way of handling this. And if anyone has any ideas of how to properly fix this, please let me know. Otherwise, I'll probably just figure out a way to timeout the connection and kill it.
The text was updated successfully, but these errors were encountered:
Hi everyone,
Not sure if this is the right place to post this but github does not allow me to submit issues to a fork.
There appears to be a memory leak in the abourget version, specifically relating to the following code at ctx.go (https://github.com/abourget/goproxy/blob/master/ctx.go):
What happens here is that various sites do not properly close the TLS handshake and so the for loop continues on indefinitely. I've placed a timeout of 10 seconds on the loop, which helps a great deal. However, some connections cause the ReadRequest() to hang indefinitely. There is actually a comment above this section of code which describes the same problem.
I'm not sure why this section of code is in a for loop. Seems that a simple if...then statement would be a better way of handling this. And if anyone has any ideas of how to properly fix this, please let me know. Otherwise, I'll probably just figure out a way to timeout the connection and kill it.
The text was updated successfully, but these errors were encountered: