unix-sockets: ignore proxy settings#21630
Closed
icing wants to merge 2 commits into
Closed
Conversation
Fix a recent regression: when a unix-socket is configured, all proxy settings must be ignored. The `via_peer` had been checked correctly, but the connections proxy bits were not cleared. Add test_11_04 to verify. Reported-by: Fabian Keil (libcurl mailing list)
bagder
approved these changes
May 15, 2026
There was a problem hiding this comment.
Pull request overview
Fixes a regression where unix-socket usage was not fully ignoring proxy settings: while via_peer was checked, the connection's proxy bits (socksproxy, httpproxy, proxy) remained set, leading to incorrect behavior. The fix explicitly clears those bits when a unix-socket peer is configured, and adjusts the host-displayname macro to key off peer pointers rather than the proxy bits. A new test verifies that proxy args are ignored under --unix-socket.
Changes:
- Clear
bits.socksproxy/httpproxy/proxywhenvia_peer->unix_socketis set; skip proxy initialization in that case. - Update
CURL_CONN_HOST_DISPNAMEto test for the existence ofsocks_proxy.peer/http_proxy.peerinstead of the proxy bits. - Add
test_11_04_unix_connect_httpto ensure proxy args are ignored when using a unix socket.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lib/url.c | Explicitly disable proxy bits on connectdata when going via a unix-socket peer. |
| lib/urldata.h | Switch CURL_CONN_HOST_DISPNAME to peer-pointer checks consistent with cleared proxy bits. |
| tests/http/test_11_unix.py | New test verifying http downloads via unix socket ignore proxy arguments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
outcast36
pushed a commit
to greearb/curl
that referenced
this pull request
Jun 3, 2026
Fix a recent regression: when a unix-socket is configured, all proxy settings must be ignored. The `via_peer` had been checked correctly, but the connections proxy bits were not cleared. Add test_11_04 to verify. Reported-by: Fabian Keil (libcurl mailing list) Closes curl#21630
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix a recent regression: when a unix-socket is configured, all proxy settings must be ignored. The
via_peerhad been checked correctly, but the connections proxy bits were not cleared.Add test_11_04 to verify.
Reported-by: Fabian Keil (libcurl mailing list)