CIDR support for proxy bypass list
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
Feature or enhancement
Proposal:
I propose adding universal support for CIDR-notation IP addresses when reading NO_PROXY / the OS-specific equivalents.
Currently, support for NO_PROXY is a bit inconsistent, both across the ecosystem and within Python. On MacOS using SystemConfiguration, CIDR is supported out of the box, as is the short notation 10.0. The default implementation and the windows nt ProxyOverride registry key do not. Go and curl and wget all support CIDR notation, so despite not being standardized, there is precedent towards this.
In some environments, all outbound traffic is required to go through a proxy. However, traffic to internal services is allowed to be direct (for performance, or inherent trust, or any other reason). An example NO_PROXY may look like NO_PROXY=localhost,.localhost,127.0.0.1,127.0.0.2,0.0.0.0,169.254.169.254,10.0.0.0/8,.internal.,.internal,.local.,.local.
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://discuss.python.org/t/support-cidr-notation-in-no-proxy/66292 - discussion was tepid but leant towards yes if a good PR was proposed. I'm working on that in tandem with this gh ticket.
Windows specifically: https://github.com/python/cpython/issues/149136
More generally: https://about.gitlab.com/blog/we-need-to-talk-no-proxy/
Linked PRs
- gh-149744
- gh-156336
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先查看 gh-149744 和 gh-156336 中的相关工作,然后阅读相关的 Discourse 讨论以及 Windows issue gh-149136。所需结果是对 NO_PROXY 和操作系统特定等效项一致地处理 CIDR 表示法,包括列出的内部网络示例。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- networking
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100