Skip to content

Connect through a proxy #427

@delvedor

Description

@delvedor

There are some use cases where users need to connect to the upstream server via a proxy that is not handling connections transparently.

I would like to add this functionality directly into Undici, and from the user perspective, it would look like this:

const client = new Client({
  url: 'http://localhost:3000',
  proxy: 'http://localhost:3030'
})

Supporting this feature is also useful for working with proxy for debugging purposes, such as mitmproxy.
I've implemented a similar solution for the Node.js's core HTTP client via a custom agent.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions