Skip to content

Global proxy support #1490

@bitinn

Description

@bitinn

Is it possible? Depends on whether we support both http and socks proxy, this can be tricky, because you need to proxy DNS queries as well.

There are times we want io.js http and https to work with a proxy, globally, be it http or socks. With current design, the best solution one can come up with is to patch http and https which often results in compatibility problems (because you need to overwrite default http.request and Agent).

Without a global proxy setting, one cannot easily instruct the whole io.js app to use such a proxy. A notable example is oauth modules, which usually depends on some request modules, and they often use it in a fashion that do not allow proxy settings.

I used these 2 repos to workaround the lack of proxy support, but I feel they are not very sustainable given how fast io.js are improving.

https://github.com/goinstant/global-tunnel
https://github.com/yahoo/dnscache

Let me know what you think, it can help a certain group of developers a lot (say ppl in tightly controlled corp network, and ppl in china).

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.httpIssues or PRs related to the http subsystem.netIssues and PRs related to the net subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions