Loading... # 环境 下载`clash`并启动 [GitHub](https://github.com/NKUlpj/profiles/raw/main/pbin.zip) ```sh clash -f ./config.yaml ``` 同时在<u>[Setting]->[Network]->[Network Proxy]</u>中将代理设置为<span style='color:#dc143c'>Manual</span> ``` HTTP Proxy 127.0.0.1 7890 HTTPS Proxy 127.0.0.1 7890 Socks Host 127.0.0.1 7891 Ignore Hosts localhost,127.0.0.0/8,::1 ``` # 终端设置 ```sh cat >> ~/.bash_profile << EOF function proxy_on() { export http_proxy=http://127.0.0.1:7890 export https_proxy=\$http_proxy echo -e "终端代理已开启。" } function proxy_off(){ unset http_proxy https_proxy echo -e "终端代理已关闭。" } EOF source ~/.bash_profile proxy_on ``` <div class="tip inlineBlock warning"> 注意`cat >>`这里一个`>`会覆盖原有内容,而`>>`则是追加写! </div> 最后修改:2023 年 12 月 02 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 如果觉得我的文章对你有用,请随意赞赏