工具使用shadowsocks代理接口

一般使用代理的时候,一个是为了资料,另一个是为了下载。

用的系统是osx,经常会使用brew安装软件。但是很多软件的源或者它们的依赖库是被墙了。配置代理后,就方便了,不用到处去找替代源

brew 下载软件是基于curl,vim的管理软件Vim Bundle下载是基于wget的。

curl

cat ~/.curlrc 

socks5=127.0.0.1:1080 

polipo

#Via ~/.polipoc file:
logSyslog = true
logFile = ~/log/polipo/polipo.log

socksParentProxy = "127.0.0.1:1080"
socksProxyType = socks5

proxyAddress = "127.0.0.1"
proxyPort = 8123

shadowsocks使用的是socket代理,可以使用polipo转化为http代理,方便一些没有办法直接配置socket代理的工具:wget

wget

Via ~/.wgetrc file:

use_proxy=yes
http_proxy=127.0.0.1:8123
https_proxy=127.0.0.1:8123

git

#git use http proxy
git config --global https.proxy http://127.0.0.1:1080
#git use https proxy
git config --global https.proxy https://127.0.0.1:1080

#unset
git config --global --unset http.proxy
git config --global --unset https.proxy

#git socks5 proxy
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

npm

npm config set proxy http://localhost:8080/
npm config set https-proxy http://localhost:8080/
npm config set strict-ssl false

#Remove All NPM Proxy
npm config delete http-proxy
npm config delete https-proxy

npm config rm proxy
npm config rm https-proxy

set HTTP_PROXY=null
set HTTPS_PROXY=null

 

 

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.