Skip to content

[Feature] add proxy support for discord.com https requests in undici #37

@pinkli

Description

@pinkli

Problem / Motivation

the standard http_proxy/https_proxy envionment variables seems not working in the undici lib, so it's annoy sometimes when the machine has to use a http proxy to access the discord server.

Proposed Solution

add proxy to undici such as

`
import { setGlobalDispatcher, ProxyAgent } from 'undici';

const proxy =
process.env.HTTPS_PROXY ||
process.env.HTTP_PROXY ||
process.env.ALL_PROXY;

if (proxy) {
setGlobalDispatcher(new ProxyAgent(proxy));
}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions