V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
simapeng
V2EX  ›  Python

国内HTTPS代理的怪异问题

  •  
  •   simapeng · Apr 22, 2013 · 4362 views
    This topic created in 4764 days ago, the information mentioned may be changed or developed.
    为什么国内的HTTPS代理,例如60.9.52.9:6666,使用以下代码测试HTTP Proxy的Connect方法
    r = httplib.HTTPConnection('60.9.52.9',6666)
    r.connect()
    r.send('CONNECT 220.181.111.147:80 HTTP/1.0\r\n\r\n')
    res = r.response_class(r.sock,r.strict,r._method)
    print res._read_status()
    能正常返回('HTTP/1.0', 200, 'OK\r\n'),但是使用urllib代理的访问HTTPS网站的时候,就直接返回SSL error:unkown protocol,最奇怪的时候使用chrome使用这些代理访问https网站也是直接报错,但是IE却正常,试了国外的一些免费HTTPS代理,又不存在这个问题,百思不得其解,有大神遇到过这种问题没有?
    1 replies    1970-01-01 08:00:00 +08:00
    ywencn
        1
    ywencn  
       Apr 22, 2013
    因为这些是http代理,不是Https代理, chrome认为你在Https里面走Http是不安全的,于是就拒绝了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   959 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 19:54 · PVG 03:54 · LAX 12:54 · JFK 15:54
    ♥ Do have faith in what you're doing.