Skip to content

Possible to support alternative agents? #112

Open

Description

@tonybruess

I'd like to use hpagent because it supports reusable sockets.

I tried passing in agent: { https: httpsAgent } but it was overridden / didn't work.

I'm wondering if this is easily feasible or if there's some limitation I'm overlooking. If there's no gotchas I'm happy to make a PR.

Activity

  1. B4nan commented on Oct 17, 2023

    @B4nan
    Member

    Feel free to PR this, I guess we just didn't think about such use case.

  2. vladfrangu commented on Nov 2, 2023

    @vladfrangu
    Member

    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? 🙏

  3. removed this from the 75th sprint - Tooling team milestone on Nov 6, 2023
  4. added
    t-toolingIssues with this label are in the ownership of the tooling team.
    on Nov 20, 2023
  5. Edoardopacino commented on Feb 5, 2024

    @Edoardopacino

    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)

  6. tonybruess commented on Feb 28, 2024

    @tonybruess
    Author

    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.

    1. 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?
    2. 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.

  7. fduman commented on Apr 16, 2024

    @fduman

    @tonybruess I set the "http2: false" then I could use the hpagent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions