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

feat: add support for SOCKS5 proxy #1063

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

JoshuaMoelans
Copy link
Member

@JoshuaMoelans JoshuaMoelans commented Oct 29, 2024

Fixes #1030

Todo

  • Add SOCKS5 proxy option
  • Handle transport when SOCKS5 proxy is given
    -> test by providing socks5 url & seeing where it breaks (and for which transports it works/doesn't)
    -> document if transport doesn't support it (e.g. winhttp)
  • Add Proxy integration tests
  • Update changelog
  • Update docs

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 47.82609% with 12 lines in your changes missing coverage. Please review.

Project coverage is 82.52%. Comparing base (b598af0) to head (11bedad).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1063      +/-   ##
==========================================
- Coverage   82.63%   82.52%   -0.11%     
==========================================
  Files          53       53              
  Lines        7660     7670      +10     
  Branches     1208     1207       -1     
==========================================
  Hits         6330     6330              
- Misses       1216     1227      +11     
+ Partials      114      113       -1     

@JoshuaMoelans JoshuaMoelans changed the title Added socks5_proxy to options feat: add support for SOCKS5 proxy Oct 30, 2024
@@ -215,8 +215,8 @@ sentry__curl_send_task(void *_envelope, void *_state)
curl_easy_setopt(curl, CURLOPT_HEADERDATA, (void *)&info);
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback);

if (state->http_proxy) {
curl_easy_setopt(curl, CURLOPT_PROXY, state->http_proxy);
if (state->proxy) { // TODO do we need to process the proxy here?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curl supports socks-proxies since https://curl.se/ch/7.21.7.html ; our minimum required version is currently 7.10.7 -> This might need to be updated to ensure socks-proxies work.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please be aware that we have a runtime and a compile-time check for libcurl.

@getsentry getsentry deleted a comment from github-actions bot Oct 30, 2024
Copy link

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 11bedad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need support for socks5proxy for sentry-native
2 participants