在linux中设置clash代理

1 min read
Table of Contents

linux配置快速教程

bashTerminal window
wget https://github.com/MetaCubeX/mihomo/releases/download/v1.19.23/mihomo-linux-amd64-v1.19.23.gz
  1. 解压
bashTerminal window
gunzip mihomo-linux-amd64-*.gz
  1. 改名
bashTerminal window
mv mihomo-linux-amd64-* clash
chmod +x clash
  1. 配置文件
bashTerminal window
mkdir -p ~/.config/clash
  1. 下载订阅
bashTerminal window
curl -o ~/.config/clash/config.yaml "你的订阅链接"
  1. 配置代理
bashTerminal window
export http_proxy=http://127.0.0.1:7890
  1. 配置alias
bashTerminal window
clash() {
~/clash -d ~/.config/clash
}
clashbg() {
nohup clash -d ~/.config/clash > ~/.config/clash/clash.log 2>&1 &
}
clashlog() {
tail -f ~/.config/clash/clash.log
}
clashstop() {
pkill -f "$HOME/bin/clash -d $HOME/.config/clash"
}
  1. 验证
bashTerminal window
curl -I https://auth.openai.com

后记

My avatar

感谢你读到这里。

这座小站更像一份持续维护的“终端笔记”:记录我解决问题的过程,也记录走过的弯路。


More Posts

评论

评论 (0)

请先登录后再发表评论

加载中...