Privoxy | 终端运用privoxy自由选择是否代理拉取Golang包(Mac OS) 原

栏目: Go · 发布时间: 5年前

内容简介:3. 配置设置(配置帮助文档:

21天精品区块链课程免费学习,深入实战行家带路,助力开发者轻松玩转区块链! >>> Privoxy | 终端运用privoxy自由选择是否代理拉取Golang包(Mac OS) 原

背景:

1.运用包管理工具dep管理引用包
2.有些包需要代理,有包是内部包不能用代理

实现:

1.配置socks5代理(略过)

2.安装privoxy

通过brew install privoxy进行安装
安装成功后,通过brew info privoxy查看安装过后的信息
  privoxy: stable 3.0.26 (bottled)
  ******省略******
  To have launchd start privoxy now and restart at login:
     brew services start privoxy
  Or, if you don't want/need a background service you can just run:
     privoxy /usr/local/etc/privoxy/config
	 
从信息中可以看出来配置文件在/usr/local/etc/privoxy/config

3. 配置设置(配置帮助文档: https://www.privoxy.org/user-manual/config.html )

# privoxy 监听配置
listen-address  127.0.0.1:1087

# privoxy 代理到socks的地址上
forward-socks5 / 127.0.0.1:1086 .

# 不需要走http代理的IP或者域名
forward 192.168.*.* .
forward 10.*.*.* .
forward 127.*.*.* .
forward *.com .

保存配置,启动privoxy

让终端走privoxy的http代理

export http_proxy="http://127.0.0.1:1087"
export https_proxy="http://127.0.0.1:1087"

终端代理的N中方法: https://blog.fazero.me/2015/09/15/%E8%AE%A9%E7%BB%88%E7%AB%AF%E8%B5%B0%E4%BB%A3%E7%90%86%E7%9A%84%E5%87%A0%E7%A7%8D%E6%96%B9%E6%B3%95/

以上所述就是小编给大家介绍的《Privoxy | 终端运用privoxy自由选择是否代理拉取Golang包(Mac OS) 原》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Elements of Information Theory

Elements of Information Theory

Thomas M. Cover、Joy A. Thomas / Wiley-Blackwell / 2006-7 / GBP 76.50

The latest edition of this classic is updated with new problem sets and material The Second Edition of this fundamental textbook maintains the book's tradition of clear, thought-provoking instr......一起来看看 《Elements of Information Theory》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

URL 编码/解码
URL 编码/解码

URL 编码/解码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换