You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sentry_sdk/transport.py
+18-1Lines changed: 18 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -441,7 +441,24 @@ def _make_pool(
441
441
ifproxy_headers:
442
442
opts["proxy_headers"] =proxy_headers
443
443
444
-
returnurllib3.ProxyManager(proxy, **opts)
444
+
ifproxy.startswith("socks"):
445
+
use_socks_proxy=True
446
+
try:
447
+
# Check if PySocks depencency is available
448
+
fromurllib3.contrib.socksimportSOCKSProxyManager
449
+
exceptImportError:
450
+
use_socks_proxy=False
451
+
logger.warning(
452
+
"You have configured a SOCKS proxy (%s) but support for SOCKS proxies is not installed. Disabling proxy support. Please add `PySocks` (or `urllib3` with the `[socks]` extra) to your dependencies.",
0 commit comments