• 请不要在回答技术问题时复制粘贴 AI 生成的内容
dbow
V2EX  ›  程序员

分享自写的 go 语言 net/http 的 socks5 代理支持库

  •  
  •   dbow ·
    maliubiao · Aug 15, 2014 · 5304 views
    This topic created in 4316 days ago, the information mentioned may be changed or developed.
    代码不多,net/http只支持http代理, 用了这个以后就能用http.Get配合ss取墙外的某些东西了。
    6 replies    2014-08-15 22:33:02 +08:00
    deathscythe
        1
    deathscythe  
       Aug 15, 2014
    how to use?
    nilai
        2
    nilai  
       Aug 15, 2014
    how to use too
    dbow
        3
    dbow  
    OP
       Aug 15, 2014
    @deathscythe
    @nilai 下面有示例的,socks5_example.go. socks5.go放到源代码目录,直接import, 然后在socks5.SetProxy(url)设置ss的地址, socks5.ModifyHeader的参数是个函数,用来修改Header, socks5.UnsetProxy()取消代理, 例子应该够清楚了.
    timothyye
        4
    timothyye  
       Aug 15, 2014 via Android
    代码放到gist上吧,方便star和fork
    dbow
        5
    dbow  
    OP
       Aug 15, 2014
    @timothyye 发的是gist的地址, 结果被直接嵌入了,重发一下地址, schema://gist.github.com/maliubiao/3e2e93d765759898f4f9
    Comdex
        6
    Comdex  
       Aug 15, 2014 via Android
    好东西学习一下
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1041 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 19:05 · PVG 03:05 · LAX 12:05 · JFK 15:05
    ♥ Do have faith in what you're doing.