Tracking issue: HTTP_PROXY/HTTPS_PROXY/NO_PROXY support in Node.js
未关闭
还没有人认领这个 Issue。
http
- 主要语言
- JavaScript
- 星标
- 122k
- 派生
- 37.3k
- 平均合并
- 4 天 2 小时
- 30 天内合并 PR
- 283
描述
- Support https/http proxies via HTTP_PROXY/HTTPS_PROXY/NO_PROXY in fetch() (behind NODE_USE_ENV_PROXY)
- Initial support https://github.com/nodejs/node/pull/57165
- align with curl: do not tunnel for http proxy https://github.com/nodejs/undici/issues/4083
- align with curl: support keep-alive https://github.com/nodejs/undici/issues/4086
- Support https/http proxies via HTTP_PROXY/HTTPS_PROXY/NO_PROXY in http(s) builtins (behind NODE_USE_ENV_PROXY)
- Initial support for http(s).request and agent: https://github.com/nodejs/node/pull/58980
- Check that it allows other popular user-land agents (for proxy or not) to operate with/without NODE_USE_ENV_PROXY (investigation)
- Check that it works transparently with popular npm packages that uses http/https.request (investigation)
- Investigate enabling NODE_USE_ENV_PROXY by default
- In fetch() (less risky since fetch is patched less in the wild)
- In http(s) builtins (might be too risky, need to investigate)
- Share code between the fetch and the http(s) builtin implementation (e.g. env var parsing & matching)
- Add a CLI flag that allows enabling proxies: https://github.com/nodejs/node/issues/59100
- Bug fixes: https://github.com/nodejs/node/issues/62054
Some nice to haves (depend on whether there are volunteers that want to pick them up):
- Socks 5 proxy support
- Socks5 proxy support in undici: https://github.com/nodejs/undici/issues/2224
- Socks5 proxy support in http/https builtins
- HTTP2 support? https://github.com/nodejs/node/issues/57872#issuecomment-3209437143
- Support it properly in the http2.connect
- Until then, make sure fetch() doesn't advertise h2 when proxy is enabled?
Old issues: https://github.com/nodejs/node/issues/8381 https://github.com/nodejs/node/issues/15620
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
先选择一个未勾选的条目,然后阅读链接的 Undici 或 Node.js issue,以及其中引用的现有 fetch()、http(s).request 或 http2.connect 代理工作。根据该条目所述的行为定义完成标准,并为所选代理场景添加或更新覆盖;此 tracking issue 未指定具体文件或测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- node.js
- 领域
- networking
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 活跃
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100