-
-
Notifications
You must be signed in to change notification settings - Fork 856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not support "no_proxy" including value of ipv6 prefix style #3221
Comments
Another test case to throw in that is affecting us:
|
For python -c 'import httpx; url = httpx.URL("all://127.0.0.0/8"); print(url.path)'
/8 httpx version: 0.27.0 |
Duplicate of #1536 No we don't currently support subnet masks here, yes we should at least raise an error if they're in play. Aside... what's an example of a real-world scenario where it's useful to have a subnet masking used to toggle proxy routing on/off? |
I also encountered this issue when using proxy in company's network. We use proxy to visit outside networks and automatically set |
Here’s my take: For no_proxy, I think we should address the issue in phases, so create a branch rather than do all in the main one. Let’s fix the crash problem first, rather than implementing the full semantic functionality (like subnet mask support) in httpx. Since no_proxy is commonly used in VPN and Zero Trust setups, It could be to adapt the no_proxy parser to handle these cases and prevent crashes at the first step. Of course, just preventing crashes isn’t a perfect solution, it will break the intended semantics of no_proxy and could lead to unexpected behavior. I also suggest considering a refactor of the proxy handling in httpx, allowing dispatching at both the domain and the ip:port level. However, this might be too extreme and could cause a breaking change to the API. I’d love to hear ideas from you all. As for some potential concerns, here are my quick responses:
I think this could change behavior between versions, which I’m not comfortable with—even with a warning mechanism in place.
That would compromise the consistency of the API and break the intended semantics of no_proxy inside.
I’m not sure, so I wander tom on this.
Some languages do often require extra configuration(java, nodejs), but Python’s tradition is to make things work out-of-the-box. |
Example:
no_proxy=fe11::/16
How to reproduce:
it will raise:
httpx version:
0.27.0
The text was updated successfully, but these errors were encountered: