Forwarder is a production-ready, fast MITM proxy with PAC support. It's suitable for debugging, intercepting and manipulating HTTP traffic. It's used as a core component of Sauce Labs Sauce Connect Proxy.
if rl, wl := l.ReadLimit, l.WriteLimit; rl > 0 || wl > 0 {
// Notice that the ReadLimit stands for the read limit *from* a proxy, and the WriteLimit
// stands for the write limit *to* a proxy, thus the ReadLimit is in fact
// a txBandwidth and the WriteLimit is a rxBandwidth.
ll = ratelimit.NewListener(ll, wl, rl)
}
Invert that and share the limit across all connections.
Currently the limits have confusing logic:
Invert that and share the limit across all connections.