Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

proxy not working with https: pages. #16

Closed
matkor opened this Issue Oct 10, 2012 · 0 comments

Comments

Projects
None yet
2 participants

matkor commented Oct 10, 2012

Hi!
I am trying to use proxy for my SSL requests.
Default way
browser.set_proxy()
seems to work for http: requests only, leaving https to go directly.

As workaround I set proxy globally:
proxy = QtNetwork.QNetworkProxy(QtNetwork.QNetworkProxy.HttpProxy, PROXY_HOST,
without calling browser.set_proxy() and than it seems to work.

Example code:

! /usr/bin/python

PROXY_HOST = "put.proxy.here"
PROXY_PORT = 3128
PROXY = "http://%s:%d" % (PROXY_HOST, PROXY_PORT, )

if 0:
from PyQt4 import QtNetwork
proxy = QtNetwork.QNetworkProxy(QtNetwork.QNetworkProxy.HttpProxy, PROXY_HOST, PROXY_PORT)
QtNetwork.QNetworkProxy.setApplicationProxy(proxy)

import spynner
import pyquery

browser = spynner.Browser(debug_level=spynner.INFO)
if 1:
browser.set_proxy("PROXY")

browser.create_webview()
browser.show()

browser.load("http://www.whatismyip.com/", load_timeout=30)
browser.browse()

@kiorky kiorky closed this Mar 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment