yzbtdiy

yzbtdiy

github
bilibili

Set up proxy for common software sources

Please prepare your own tools for accessing the internet through a proxy.

Docker#

Due to uncontrollable reasons, DockerHub cannot be accessed in China, and domestic mirror services have also stopped. Normal domestic mirror services have started implementing whitelist, rate limiting, and degradation measures. Using a proxy is currently the most effective solution.

Setting up a proxy#

[root@localhost~]# vim /etc/systemd/system/docker.service.d/http-proxy.conf
[Service]
Environment="HTTP_PROXY=http://127.0.0.1:10809"
Environment="HTTPS_PROXY=http://127.0.0.1:10809"
Environment="NO_PROXY=localhost,127.0.0.1"
[root@localhost ~]# systemctl daemon-reload
[root@localhost ~]# systemctl restart docker

pip(python)#

Domestic mirror#

Tsinghua mirror

[root@localhost~]# pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
[root@localhost~]# pip config set install.trusted-host pypi.tuna.tsinghua.edu.cn

Setting up a proxy#

[root@localhost~]# pip config set global.proxy http://127.0.0.1:10809

npm(nodejs)#

Domestic mirror#

Alibaba mirror

[root@localhost~]# npm config set registry https://registry.npmmirror.com

Setting up a proxy#

npm config set proxy="http://127.0.0.1:10809"
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.