Repository navigation
fix: treat the <empty> proxy as a direct connection on Windows and macOS - #175
Merged
Merged
Conversation
…macOS sentry-native passes `<empty>` when the proxy is explicitly set to an empty string. The libcurl transport already maps it to no proxy (getsentry#119). The WinHTTP transport fell back to WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY, and the macOS transport passed `<empty>/` to CrackURL and std::stoi. Open the WinHTTP session with WINHTTP_ACCESS_TYPE_NO_PROXY, and give the macOS session an empty connectionProxyDictionary, which disables the proxy.
This was referenced Oct 18, 2026
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.
sentry-native passes the proxy
<empty>to the handler when the SDK's proxy is set to an empty string, which means "no proxy, not even from the environment or the system settings". #119 made the libcurl transport map<empty>to no proxy. The Windows and macOS transports do not handle it yet, which is why sentry-native sends<empty>only on Linux today:<empty>does not start withhttp://, soHTTPTransportWinfalls back toWINHTTP_ACCESS_TYPE_AUTOMATIC_PROXYand uses the system proxy.<empty>is not empty, soHTTPTransportMactakes the proxy path and passes<empty>/toCrackURLand the empty port tostd::stoi.This change:
WINHTTP_ACCESS_TYPE_NO_PROXYfor<empty>.connectionProxyDictionaryfor<empty>. An empty dictionary turns the proxy off;nilwould use the system settings.The sentry-native side, which sends
<empty>on every platform and pointsexternal/crashpadhere, is getsentry/sentry-native#2218. As with #119, the tests are in sentry-native: they set the system proxy on Windows and macOS and check that an empty proxy bypasses it.