export HTTP_PROXY=http://proxy_host:proxy_port export HTTPS_PROXY=https://proxy_host:proxy_port “` 或者包含代理服务器的用户名和密码: “` export HTTP_PROXY=http://username:password@proxy_host:proxy_port export HTTPS_PROXY=https://username:password@proxy_host:proxy_port “` – 如果代理服务...
export http_proxy="socks5://${hostip}:7890" export https_proxy="socks5://${hostip}:7890" 如果端口一样就可以合并成一句话,http 的同理 export all_proxy="socks5://${hostip}:7890" 使用curl即可验证是否代理成功,如下有返回值说明成功 ➜ ~curl google.com<HTML><HEAD><TITLE>301 Moved</TI...
依以前的做法,直接使用export http_proxy="http://127.0.0.1:7899"就可以临时使用,但是 WSL2 下访问主机已经没有这么简单, 官方文档有说明: If you want to access a networking app running on Windows (for example an app running on a NodeJS or SQL server) from your Linux distribution (ie Ubuntu),...
export http_proxy="http://${hostip}:7890"; \ export all_proxy="socks5://${hostip}:7890"; \ export ALL_PROXY="socks5://${hostip}:7890"; \ sed -i "s, *ProxyCommand.*$, ProxyCommand nc -X connect -x $hostip:7890 %h %p,g" ~/.ssh/config' alias unsetproxy='unset https_pr...
export wslip=$(hostname -I | awk '{print $1}') export PROXY_SOCKS5="socks5://${winip}:7890" export PROXY_HTTP="http://${winip}:7890" } proxy_git() { ssh_proxy="${winip}:7890" git config --global http.https://github.com.proxy ${PROXY_HTTP} ...
在WSL2的终端内,运行以下命令:exporthttp_proxy="http://[从resolv.conf找到的IP地址]:7890"export...
export https_proxy="http://127.0.0.1:41091"; export http_proxy="http://127.0.0.1:41091"; } stopProxy(){ unset https_proxy; unset http_proxy; } source ~/.zshrc # 开启代理 startProxy 附ping端口 sudo apt install tcptraceroute sudo wget http://www.vdberg.org/~richard/tcpping -O /usr...
export http_proxy=$ALL_PROXY export HTTPS_PROXY=$ALL_PROXY export https_proxy=$ALL_PROXY 1. 2. 3. 4. 5. 6. git也可以设置为使用代理 : git config --global proxy.https socks5://$windows_host:10808 1. 如果想要这些环境变量和设置每次启动终端都生效, 可以在~/.bashrc文件最下方添加上述内容...
export http_proxy="http://192.168.31.25:6666"export https_proxy="http://192.168.31.25:6666" 另外,如果你希望默认使用这个代理,还可以在~/.bashrc中配置Bash启动运行: vim ~/.bashrc 添加这两行命令: export http_proxy="http://192.168.31.25:6666"export https_proxy="http://192.168.31.25:6666" ...
exporthttp_proxy=http://ip:port # ip 就是上面获取到的,端口就是 clash 配置的exporthttps_proxy=https://ip:port # 同上 # 配置全部代理exportALL_PORXY=socks5://ip:port 配置完成后通过curl -v www.google.com来检验,如果输出如下,则说明开启成功 ...