二度とGFWで時間を無駄にしたくありません。
如果你的包管理器想帰使用される秀的镜像仓库、请適用
目录
〜/ .config / pip / pip.conf
[global] proxy=http://localhost:1087
不注意ソックス5
在文件后
~/.ssh/config四行两行
Host github.com
# Mac下
ProxyCommand nc -X 5 -x 127.0.0.1:1080 %h %p
# Linux下
ProxyCommand nc --proxy-type socks5 --proxy 127.0.0.1:1080 %h %p
注Linux和Mac下ncat/netcat区4、详见https://unix.stackexchange.com/questions/368155/what-are-the-differences-between-ncat-nc-and-netcat
git config --global http.proxy http://127.0.0.1:1087
建议使用http、因是socks5在使用git-lfs時会报错
proxyconnect tcp: dial tcp: lookup socks5: no such host
https://gist.github.com/laispace/666dd7b27e9116faece6
貨物会依次检查
CARGO_HTTP_PROXY
export CARGO_HTTP_PROXY=http://127.0.0.1:1080
config.toml_
http.proxy
[http]
proxy = "127.0.0.1:1080"
HTTPS_PROXY変数量&&
https_proxy
http_proxy
export https_proxy=http://127.0.0.1:1080
export http_proxy=http://127.0.0.1:1080
http_proxy普通来讲没Ph、非非使用基にHTTP的クレートリポジトリ
貨物使用libcurl、故可接受任何符合libcurlformat的地址与协议
(
127.0.0.1:1080、、
http://127.0.0.1:1080)
socks5://127.0.0.1:1080均可
https://doc.rust-lang.org/cargo/reference/config.html#httpproxy
在
/etc/apt/apt.conf.d/目录下新增文件
proxy.conf、化:
Acquire::http::Proxy "http://127.0.0.1:8080/"; Acquire::https::Proxy "http://127.0.0.1:8080/";
適合:無法使用Socks5代。
https://askubuntu.com/a/349765/883355
socks5 = "127.0.0.1:1080"
追加
~/.curlrc
https://www.zhihu.com/question/31360766
この浪费了好86時間额〜/ .gradle / gradle.properties
systemProp.http.proxyHost=127.0.0.1 systemProp.http.proxyPort=1087 systemProp.https.proxyHost=127.0.0.1 systemProp.https.proxyPort=1087
https://stackoverflow.com/questions/5991194/gradle-proxy-configuration
%Maven安装目录%/ conf / settings.xml
<!-- proxies
| This is a list of proxies which can be used on this machine to connect to the network.
| Unless otherwise specified (by system property or command-line switch), the first proxy
| specification in this list marked as active will be used.
|-->
<proxies>
<!-- proxy
| Specification for one proxy, to be used in connecting to the network.
|
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>proxyuser</username>
<password>proxypass</password>
<host>proxy.host.net</host>
<port>80</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
-->
<proxy>
<id>proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>127.0.0.1</host>
<port>1087</port>
</proxy>
</proxies>
https://maven.apache.org/guides/mini/guide-proxies.html
HTTP_PROXY=socks5://localhost:1080 go get
⯕了下HTTPS_PROXY和ALL_PROXY都不起作用
npm config set proxy http://127.0.0.1:1087 npm config set https-proxy http://127.0.0.1:1087
用ソックス5就报错--
推荐用毛糸、npm是真的頂
export https_proxy=http://127.0.0.1:1080
废物中国電信、不挂差かつ如龟
yarn config set proxy http://127.0.0.1:1087 yarn config set https-proxy http://127.0.0.1:1087
不用ソックス5
https://github.com/yarnpkg/yarn/issues/3418
yarn config set httpProxy http://127.0.0.1:1087
yarn config set httpsProxy http://127.0.0.1:1087
不回答
全局
入力:これらの命令会修改项目目录下的
.yarnrc.yml文件、请的不要☆带有如:
httpsProxy: "socks5://127.0.0.1:1080"
代代码提交到仓库、以免造成麻烦
yarn config set npmRegistryServer https://127.0.0.1:1087
注意:この方法不用用下5000ヤーン官方插件!
糸的官方插件默认会からGitHub(raw.githubusercontent.com
)
〜/ .gemrc
--- # See 'gem help env' for additional options. http_proxy: http://localhost:1087
ALL_PROXY=socks5://localhost:1080 brew ...
use_proxy=yes http_proxy=127.0.0.1:1087 https_proxy=127.0.0.1:1087
〜/ .wgetrc
sudo snap set system proxy.http="http://127.0.0.1:1087"
sudo snap set system proxy.https="http://127.0.0.1:1087"
$ sudo mkdir -p /etc/systemd/system/docker.service.d $ sudo vim /etc/systemd/system/docker.service.d/proxy.conf [Service] Environment="ALL_PROXY=socks5://localhost:1080" $ sudo systemctl daemon-reload $ sudo systemctl restart docker
必须是socks5、http不生化
変数と変数
ELECTRON_GET_USE_PROXY=true GLOBAL_AGENT_HTTPS_PROXY=http://localhost:1080
WSL2環境下可通過取脚本スクリプト件
~/.vscode-server/server-env-setup、設定変数変換量、使用変数。
WSL2内循環路访问Win下的代理行端口代理(例子代码中http差端口监听17070)、因是子ر
新建
~/.vscode-server/server-env-setup文件、これ文件会在VSCode启PINWSL環構后加
source。
WSL_HOST=$(sed -n '/^nameserver/p' /etc/resolv.conf | cut -d' ' -f2) export http_proxy=http://${WSL_HOST}:17070 export https_proxy=$http_proxy export all_proxy=$http_proxy
VSCodeSSH后的インターネット不会使用本地界面VSCode内的代理設定、如果SSH主机没有默认0042络链接または在墙内、会導致问题。
需要手PINダウンロードvscode的サーバーエンドトランシーバー
虽然文档未提済、しかし是受使用WSL定的方案、配置
~/.vscode-server/server-env-setup文件設定ファイル。
SSH主机有代理程序监听在17070端口:
新建
~/.vscode-server/server-env-setup文件、これ文件会在VSCode启PINWSL環構后加ソース。
export http_proxy=http://127.0.0.1:17070 export https_proxy=$http_proxy export all_proxy=$http_proxy
推荐使用Clash、windows版、mac版(注意:ClashX ProDTUN功能、ClashX不適用)、開启Tunモード
https://docs.cfw.lbyczf.com/contents/tun.html
scoop config proxy 127.0.0.1:1080
在LUCI面版菜単配置または者/etc/opkg.conf
option http_proxy http://localhost:1080/
https://openwrt.org/docs/guide-user/additional-software/opkg