Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shadowsocks与privoxy打造http代理 #90

Open
PLDaily opened this issue Dec 20, 2017 · 0 comments
Open

shadowsocks与privoxy打造http代理 #90

PLDaily opened this issue Dec 20, 2017 · 0 comments

Comments

@PLDaily
Copy link
Owner

PLDaily commented Dec 20, 2017

mac下使用brew安装

brew update
brew install privoxy

设置

进入/usr/local/etc/privoxy目录,编辑config

forward-socks5t   /               127.0.0.1:1080 .
listen-address  0.0.0.0:8118

0.0.0.0即允许所有来源的访问,如何只需本地则使用127.0.0.1

重启privoxy

sudo /usr/local/sbin/privoxy /usr/local/etc/privoxy/config

查看服务是否开启

ps aux | grep privoxy
netstat -an | grep 8118

终端设置代理

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

只在该终端下起作用

npm设置http代理

npm config set proxy "http://127.0.0.1:8118"
npm config set https-proxy "http://127.0.01:8118"

远程连接需将127.0.0.1改成本地ip地址,例192.168.1.121

问题

远程无法连接需关闭防火墙或将listen-address设为0.0.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant