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

Support SOCKS proxies #1049

Closed
Roguelazer opened this issue Mar 10, 2021 · 1 comment · Fixed by #1050
Closed

Support SOCKS proxies #1049

Roguelazer opened this issue Mar 10, 2021 · 1 comment · Fixed by #1050
Assignees
Labels
Enhancement New feature or request

Comments

@Roguelazer
Copy link
Contributor

If pysocks is available, urllib3 supports SOCKS proxies, but you can't use the urllib3.ProxyManager class and must instead use urllib3.contrib.socks.SOCKSProxyManager. It would be very nice if sentry_sdk.transport.HttpTransport could detect a proxy set to socks:// (or one of the many variants) and Do The Right Thing.

Roguelazer added a commit to Roguelazer/sentry-python that referenced this issue Mar 10, 2021
Roguelazer added a commit to Roguelazer/sentry-python that referenced this issue Mar 10, 2021
Roguelazer added a commit to Roguelazer/sentry-python that referenced this issue Mar 10, 2021
@kenoss
Copy link

kenoss commented Jun 17, 2021

I vote one. It is great that sentry_sdk itself has SOCKS proxy support (integrated in the class HttpTransport.).

Rationale:

  1. There are situations we have to use sentry under SOCKS proxy. E.g., IoT device with restricted network access.
  2. I tried to write external class Socks5HttpTransport, but it's not cool to use.

And then, here's some implementation options.

How to designate proxy URL

A. From http_proxy/https_proxy option, like requests and #1050 .
B. From other new option like socks_proxy.

I guess the members of sentry prefer B because #178 (comment) .


@untitaker @ahmedetefy Could you let us know your thoughts?

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

Successfully merging a pull request may close this issue.

3 participants