Skip to content
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

no_proxy not support cidr #9773

Closed
mcarbonneaux opened this issue Oct 19, 2022 · 0 comments
Closed

no_proxy not support cidr #9773

mcarbonneaux opened this issue Oct 19, 2022 · 0 comments
Assignees

Comments

@mcarbonneaux
Copy link

mcarbonneaux commented Oct 19, 2022

I did this

export http_proxy=myproxy
export no_proxy=.domain1,.domain2,127.0.0.1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
curl http://10.10.20.1

and curl go to the proxy...

I expected the following

i expect that curl no go to the proxy because 10.10.20.1 are in cidr 10.0.0.0/8...

curl/libcurl version

all version

operating system

all system unix (i've not tested windows)

when i read in the curl code i found you make only str match:
https://github.com/curl/curl/blob/master/lib/url.c#L2322

@bagder bagder self-assigned this Oct 20, 2022
bagder added a commit that referenced this issue Oct 20, 2022
For both IPv4 and IPv6 addresses. Now also checks IPv6 addresses "correctly"
and not with string comparisons.

Split out the noproxy checks and functionality into noproxy.c

Added unit test 1614 to verify checking functions.

Reported-by: Mathieu Carbonneaux

Fixes #9773
Fixes #5745
Closes #....
bagder added a commit that referenced this issue Oct 20, 2022
For both IPv4 and IPv6 addresses. Now also checks IPv6 addresses "correctly"
and not with string comparisons.

Split out the noproxy checks and functionality into noproxy.c

Added unit test 1614 to verify checking functions.

Reported-by: Mathieu Carbonneaux

Fixes #9773
Fixes #5745
Closes #9775
bagder added a commit that referenced this issue Oct 20, 2022
For both IPv4 and IPv6 addresses. Now also checks IPv6 addresses "correctly"
and not with string comparisons.

Split out the noproxy checks and functionality into noproxy.c

Added unit test 1614 to verify checking functions.

Reported-by: Mathieu Carbonneaux

Fixes #9773
Fixes #5745
Closes #9775
@bagder bagder closed this as completed in 1e9a538 Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants