2

I've just installed the the Proximo heroku add-on for a python app. I loaded up a shell and kicked the tires, and hitting a HTTP address works, but HTTPS addresses do not. HTTP addresses show up in the Proximo logs, HTTPS addresses timeout leaving nothing in the logs.

I tested using the following code:

import urllib2, urllib
from django.conf import settings

proxy  = urllib2.ProxyHandler(settings.PROXIES_DICT)
auth   = urllib2.HTTPBasicAuthHandler()
opener = urllib2.build_opener(proxy, auth, urllib2.HTTPHandler)
urllib2.install_opener(opener)

urllib2.urlopen("http://google.com").read()  # works fine
urllib2.urlopen("https://google.com").read() # times out

I should mention the PROXIES_DICT looks like this (passwords replaced):

>>> pprint(settings.PROXIES_DICT)
{'http': 'http://proxy:password@proxy-54-235-72-96.proximo.io',
 'https': 'http://proxy:password@proxy-54-235-72-96.proximo.io'}

I should also mention the time out exception looks like this:

URLError: <urlopen error [Errno 60] Operation timed out>

I'm not sure what I'm doing wrong. Can anyone help?

Eric Palakovich Carr
  • 22,701
  • 8
  • 49
  • 54

1 Answers1

3

This code tries to connect to Proximo proxy using HTTP but on 443 port. Try following settings:

{'http': 'http://proxy:password@proxy-54-235-72-96.proximo.io',
 'https': 'http://proxy:password@proxy-54-235-72-96.proximo.io:80'}

You are aware that Proximo doesn't listen on HTTPS, so connections from your application to the proxy are not going to be encrypted?

Jan Wrobel
  • 6,969
  • 3
  • 37
  • 53
  • That got it, thank you. Yes, I'm aware it doesn't listen on https. And given the data the proxy is passing back and forth between my client and the server is still encrypted, it's fine that that the actual connection the proxy is not. – Eric Palakovich Carr Apr 30 '13 at 18:09