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
DravenJohnson
V2EX  ›  Python

Python Urllib2 ProxyHandler 有没有什么办法走 Socks?在走 HTTP 的时候,有什么办法处理 urlopen 时候的 HTTPS 站点么?

  •  
  •   DravenJohnson ·
    Psiphon-Labs · 2016-03-18 00:12:28 +08:00 · 3009 次点击
    这是一个创建于 2966 天前的主题,其中的信息可能已经有所发展或是发生改变。
    3 条回复    2016-03-25 02:42:44 +08:00
    DravenJohnson
        1
    DravenJohnson  
    OP
       2016-03-18 01:15:03 +08:00
    有没有可能通过 Python 设置系统( Windows )的代理使其所有的设置后的流量(包括 HTTP 和 HTTPS )走 Proxy 。然后在指定情况下取消掉所有系统 Proxy 的设置?
    AndyCrz
        2
    AndyCrz  
       2016-03-18 09:23:51 +08:00   ❤️ 1
    @DravenJohnson 如果你的意思是让指定程序走代理,可以使用 LSP hook 这个古老的技术,当想不代理的时候,卸载钩子就行了,如果是只过滤协议这个就麻烦了,得在 NDIS 层面写个过滤驱动识别流量(最简单方法根据请求远程 server 的端口判定)然后转发数据流
    DravenJohnson
        3
    DravenJohnson  
    OP
       2016-03-25 02:42:44 +08:00
    @AndyCrz 指定 urllib2 ,打开一个网页而已
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2309 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 12:01 · PVG 20:01 · LAX 05:01 · JFK 08:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.