wsdo / blog-back Goto Github PK
View Code? Open in Web Editor NEW树东博客
Home Page: https://shudong.wang
树东博客
Home Page: https://shudong.wang
本文首发:https://github.com/wsdo/blog/issues/5
stark.wang 作为开发者经常使用 npm 安装某些包的时候, wget 或curl 下载某些东西的时候、git、brew ,使用docker下载镜像的时候,等场景,经常出现超慢 timeout 卡死。 对于开发者来说,这是一个很棘手的事情,也是每天常见的一个问题。
使用下面命令:
brew install privoxy
因为是 Homebrew 方式安装的 privoxy,所以跟官方网站的使用方式不一样,请以此文为准。
打开配置文件 /usr/local/etc/privoxy/config
vim /usr/local/etc/privoxy/config
在 config 配置文件的最底部,手动加入以下代码:
listen-address 0.0.0.0:8118
forward-socks5 / localhost:1080 .
或者用echo命令直接写入,执行以下命令:
cd /usr/local/etc/privoxy/
echo 'listen-address 0.0.0.0:8118\nforward-socks5 / localhost:1080 .' >> config
sudo /usr/local/sbin/privoxy /usr/local/etc/privoxy/config
查看是否启动成功
netstat -na | grep 8118
出现下面结果表示启动成功
tcp4 0 0 *.8118 . LISTEN
终端里 privoxy 的使用
export http_proxy='http://localhost:8118'
export https_proxy='http://localhost:8118'
stark.wang 使用以下命令测试
wget https://www.google.com
connected. 表示成功通信 ok!
Source URL ➡️ https://getmarker.io/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.