Closed zu1k closed 3 years ago
If this is mainly for a benefit to performance, I think there should be some benchmarks performed first and if the benefit is negligible or minimal then it would probably not be worth it for the added complexity. I have been meaning to do some performance testing, but have not had the time to get around to it yet.
I have done some performance testing and was unable to determine a noticeable impact on performance (when using the no-op handlers). In light of this (and the fact that a good portion of applications will support a no_proxy
setting themselves), I will close this feature request.
When using the proxy provided by hudsucker, all https requests will use the certificate issued by hudsucker. However, usually most of our requests may not need to be processed through hudsucker, so I suggest adding some option for selective MITM.
My idea is that the user of your crate could pre-provide a list of hosts and only mitm requests corresponding to the hosts in that list.
Or a more flexible way, let the user provide some kind of judgment method closure, and pass in the req to determine if it should be forwarded directly or need to mitm.
I believe that selective mitm will improve the overall performance when using hudsucker's proxy.