-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
feat: honor http_proxy
environment variables
#1111
Open
JoshuaMoelans
wants to merge
59
commits into
master
Choose a base branch
from
joshua/feat/http_proxy_from_env_variables
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 43 commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
5a42813
read http_proxy from env. variable
JoshuaMoelans 9565c21
add proxy read from env option
JoshuaMoelans 3abce76
update CHANGELOG.md
JoshuaMoelans 32a9d60
Add proxy-from-env command + fix order of init
JoshuaMoelans 2a8df33
Merge branch 'master' into joshua/feat/http_proxy_from_env_variables
JoshuaMoelans 8081074
reorder https->http proxy fetching
JoshuaMoelans 0d3e09c
add proxy_auth tests
JoshuaMoelans c73f7f1
Merge branch 'master' into joshua/feat/http_proxy_from_env_variables
JoshuaMoelans 81abb92
fix CHANGELOG.md
JoshuaMoelans d6edb12
fix CHANGELOG.md
JoshuaMoelans c3a7575
fix test to avoid cmake build failed
JoshuaMoelans fb46808
add WinHTTP proxy username and password PoC
JoshuaMoelans aa1c8c2
remove double set_proxy_credentials call
JoshuaMoelans 86b1f6c
fix typos and some mem cleaning
JoshuaMoelans a38ea1f
add docs
JoshuaMoelans 8015666
user + test 'sentry__url_parse' for proxy auth
JoshuaMoelans 59f192e
Merge branch 'master' into joshua/feat/http_proxy_from_env_variables
JoshuaMoelans 95a08e3
cleanup
JoshuaMoelans 26966f5
add first proxy from environment test
JoshuaMoelans dd78ce5
add IPv6 proxy from env test
JoshuaMoelans da3c91e
proxy-from-env cleanup
JoshuaMoelans 0259fe8
rework integration tests structure
JoshuaMoelans 2ffd6d1
add tests
JoshuaMoelans 5f88d31
move crashpad test & reusable start_mitmdump
JoshuaMoelans 3cfefb3
test cleanup
JoshuaMoelans 3692328
Merge branch 'master' into joshua/feat/http_proxy_from_env_variables
JoshuaMoelans 718af59
fix null-string passing
JoshuaMoelans 4a97426
clean up os.environ
JoshuaMoelans 8411d8b
add check if request was proxied
JoshuaMoelans 4d63147
fix uninitialized proxy_url
JoshuaMoelans 0c64f82
add proxy_env finally check/cleanup function
JoshuaMoelans b78aa92
extract proxy test cleanup/check function
JoshuaMoelans 75f7edf
fix proxy_test_finally + update CHANGELOG.md
JoshuaMoelans 576b8da
add assert functions
JoshuaMoelans 0a1a9d3
add all-platform crashpad proxy from env reading
JoshuaMoelans 429cf7c
fix crashpad proxy-from-env test
JoshuaMoelans 40482c4
read proxy from env winHTTP transport
JoshuaMoelans 391fba1
add non-localhost hostname set/check/usage
JoshuaMoelans d44ae35
fix CI to be platform specific
JoshuaMoelans 61f3ce2
third time's the charm
JoshuaMoelans f65939b
replace the netloc replace with a string replace
JoshuaMoelans 7b8a3e9
remove accidental proxy host for non-proxy test
JoshuaMoelans 234661c
add ignore Curl_getaddrinfo_ex to leaks.txt
JoshuaMoelans b9f07cd
refactor proxy tests
JoshuaMoelans 3e54dc4
remove incorrect 'fallback' logic comments + update CONTRIBUTING.md
JoshuaMoelans 49c335d
add `http_proxy` reading
JoshuaMoelans c0cce33
update CHANGELOG.md
JoshuaMoelans f877b67
read is_secure from dsn
JoshuaMoelans 46ad5b0
cleaner proxy reading
JoshuaMoelans a2508cd
check null dsn
JoshuaMoelans 1b857ec
add tests
JoshuaMoelans fedd7fe
change env clean order
JoshuaMoelans a526df1
update crashpad to handle empty linux proxy
JoshuaMoelans 142acef
forgot ;
JoshuaMoelans 882c640
linux fix with no_proxy + revert crashpad
JoshuaMoelans 969ed41
return to <empty> proxy workaround for Linux crashpad transport
JoshuaMoelans 5bad4d4
strcmp
JoshuaMoelans 45a9f35
pointer check
JoshuaMoelans 93678e0
update CONTRIBUTING.md
JoshuaMoelans File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -271,6 +271,13 @@ main(int argc, char **argv) | |
if (has_arg(argc, argv, "http-proxy")) { | ||
sentry_options_set_proxy(options, "http://127.0.0.1:8080"); | ||
} | ||
if (has_arg(argc, argv, "http-proxy-auth")) { | ||
sentry_options_set_proxy( | ||
options, "http://user:[email protected]:8080"); | ||
} | ||
if (has_arg(argc, argv, "http-proxy-ipv6")) { | ||
sentry_options_set_proxy(options, "http://[::1]:8080"); | ||
} | ||
|
||
if (has_arg(argc, argv, "socks5-proxy")) { | ||
sentry_options_set_proxy(options, "socks5://127.0.0.1:1080"); | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can figure out why this is necessary
https://github.com/getsentry/sentry-native/actions/runs/13136044544/job/36651561430?pr=1111#step:17:12332
https://github.com/getsentry/sentry-native/actions/runs/13136044544/job/36651561430?pr=1111#step:17:9835