推荐学习书目
› 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 · Mar 18, 2016 · 3841 views
    This topic created in 3846 days ago, the information mentioned may be changed or developed.
    3 replies  •  2016-03-25 02:42:44 +08:00
    DravenJohnson
        1
    DravenJohnson  
    OP
       Mar 18, 2016
    有没有可能通过 Python 设置系统( Windows )的代理使其所有的设置后的流量(包括 HTTP 和 HTTPS )走 Proxy 。然后在指定情况下取消掉所有系统 Proxy 的设置?
    AndyCrz
        2
    AndyCrz  
       Mar 18, 2016   ❤️ 1
    @DravenJohnson 如果你的意思是让指定程序走代理,可以使用 LSP hook 这个古老的技术,当想不代理的时候,卸载钩子就行了,如果是只过滤协议这个就麻烦了,得在 NDIS 层面写个过滤驱动识别流量(最简单方法根据请求远程 server 的端口判定)然后转发数据流
    DravenJohnson
        3
    DravenJohnson  
    OP
       Mar 25, 2016
    @AndyCrz 指定 urllib2 ,打开一个网页而已
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   849 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 19:16 · PVG 03:16 · LAX 12:16 · JFK 15:16
    ♥ Do have faith in what you're doing.