0

I'm trying to send an http request using the requests library through a proxy from a new aws server. I've allowed all traffic inbound/outbound in the security settings.

urllib3.exceptions.ProxyError: ('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))

This exact same information works elsewhere such as on my personal laptop, just not on this new AWS one. I've read pages and pages of google results and can't find anything that suggests what my issue is. I've tried setting auth=(user, pass), just using username:pass@ip:port, as well as setting the http(s)_proxy environment variables. Any idea what I might be missing here?

1
  • As you get 407 error, the security group should not be the problem. Could you paste your python code snippet so that we can take a look?
    – shogo2022
    Aug 31, 2017 at 7:43

1 Answer 1

0

I fixed this issue by logging into my proxy provider, realizing that there is a white list for https connection IPs, and then adding my server IP to that whitelist.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .