V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2013-04-22 22:00:37 +08:00 · 3494 次点击
    这是一个创建于 4020 天前的主题,其中的信息可能已经有所发展或是发生改变。
    为什么国内的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 条回复    1970-01-01 08:00:00 +08:00
    ywencn
        1
    ywencn  
       2013-04-22 22:45:14 +08:00
    因为这些是http代理,不是Https代理, chrome认为你在Https里面走Http是不安全的,于是就拒绝了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5391 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 09:12 · PVG 17:12 · LAX 02:12 · JFK 05:12
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.