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
Hey, I'm looking into this issue right now, but can't seem to figure out how to test this... it also shouldn't be overriding your agent unless you also provided a proxyUrl in your got options.
I also have encountered this problem, if I send multiple requests to the same host, it should use the same socket instead of establishing connection to the proxy server every time.(hpagent doesn't seem to support http2).
(update: http2-wrapper's agent supports reusable sockets)
I took a look at this again and I think there are two separate issues that I didn't articulate well in my original report.
agent is overridden if proxyUrl is specified. I understand now this is expected behavior, but I didn't understand this originally. Should we raise an exception or print a warning if both are specified?
There is no built-in support for reusable sockets. Is this a feature the team would consider supporting? In the code I see the following comment: Sockets must not be reused, the proxy server may rotate upstream proxies as well. As a workaround I'm just manually specifying agent and not using proxyUrl.
Probably worth splitting this single issue into two separate issues depending on how you'd like to proceed.
Activity
B4nan commentedon Oct 17, 2023
Feel free to PR this, I guess we just didn't think about such use case.
vladfrangu commentedon Nov 2, 2023
Hey, I'm looking into this issue right now, but can't seem to figure out how to test this... it also shouldn't be overriding your agent unless you also provided a proxyUrl in your got options.
Do you have a reproduction sample we could use? 🙏
Edoardopacino commentedon Feb 5, 2024
I also have encountered this problem, if I send multiple requests to the same host, it should use the same socket instead of establishing connection to the proxy server every time.(hpagent doesn't seem to support http2).
(update: http2-wrapper's agent supports reusable sockets)
tonybruess commentedon Feb 28, 2024
I took a look at this again and I think there are two separate issues that I didn't articulate well in my original report.
agentis overridden ifproxyUrlis specified. I understand now this is expected behavior, but I didn't understand this originally. Should we raise an exception or print a warning if both are specified?Sockets must not be reused, the proxy server may rotate upstream proxies as well.As a workaround I'm just manually specifyingagentand not usingproxyUrl.Probably worth splitting this single issue into two separate issues depending on how you'd like to proceed.
fduman commentedon Apr 16, 2024
@tonybruess I set the "http2: false" then I could use the hpagent.