Skip to content

We need an easy way to make HTTP(S) requests through proxy #17646

@lem0nify

Description

@lem0nify

NodeJS' node-fetch supports agent field in its options where different agents from external modules which implement different proxy protocols may be provided. There is no such mechanism in Deno.
Because Deno tries to maintain full compatibility with browser JS and the standard, you will not modify v8's fetch, as far as I understand. However, the inability to quickly and conveniently make an HTTP request through a proxy is a big omission for Deno, which positions itself, among other things, as a general purpose scripting tool.
In fact, we can use system sockets for this, but then we will have to rewrite HTTP, SSL, TLS, SOCKS4 and SOCKS5 protocols from scratch. It would be nice to somehow solve this problem.

UPD.
Sorry, question removed. I found Deno.createHttpClient. By the way, it would be nice to point out here that this works not only with HTTP proxies, but also with SOCKS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions