Skip to content

Commit

Permalink
Use socks5/socks5h proxy URLs verbatim (fixes boto#880)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbevacqua committed Jun 17, 2020
1 parent cbac60b commit 1a5d198
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions botocore/httpsession.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def proxy_headers_for(self, proxy_url):
def _fix_proxy_url(self, proxy_url):
if proxy_url.startswith('http:') or proxy_url.startswith('https:'):
return proxy_url
elif proxy_url.startswith('socks5:') or proxy_url.startswith('socks5h:'):
return proxy_url
elif proxy_url.startswith('//'):
return 'http:' + proxy_url
else:
Expand Down

0 comments on commit 1a5d198

Please sign in to comment.