google / martian

Martian is a library for building custom HTTP/S proxies
Apache License 2.0
2k stars 247 forks source link

Problem on SetDeadline will cause unwanted conn break #340

Closed ghost closed 2 years ago

ghost commented 2 years ago

The current proxy.go will SetDeadline for a fixed time period, that will cause two kind problem:

  1. if set timeout too small, the conn will break for unwanted
  2. if set timeout too large, the conn will too much more , and will leads memory out of max.
ghost commented 2 years ago

I made a pull request
https://github.com/google/martian/pull/339

Which base on my hard working on test and load running. for serval month to find the better way to handle the connections.

which on my open source project: https://github.com/cnmade/gohttpproxy

I hope my works will help other people.