小猫咪安装(Linux)

2026-03-01 08:45:25

下载文件

Github:

https://github.com/Dreamacro/clash/releases/tag/v1.18.0

库没了,找镜像吧

解压

1gzip -d cnn o-linux-amd64-v1.18.0.gz

加权限

1chmod 764 ./clash-linux-amd64-v1.18.0

运行

1./clash-linux-amd64-v1.18.0

这时会自动下载Country.mmdb

配置代理

首次运行后会有 ~/.config/clash,进入这个文件夹,里面是自动创建的配置文件,修改config.yaml即可

或者wget -O config.yaml 订阅地址

修改代理规则/代理模式

安装ui面板

不安了,直接用 yacd-dashboard:http://yacd.haishan.me/

确保开启了外部控制选项

config.yaml中

12345external-controller: :9090## 如果本地安装了ui面板那得写出面板路径## ui 表示在 ~/.config/clash 下 ui 文件夹内是面板的文件(有yacd.ico等文件)# external-ui: ui

然后访问ip:9090(放行端口), 应该看到

123{ "hello": "clash"}

然后在yacd中填写地址http://ip:9090,连接,进入修改

代理命令行

在~/.profile或者~/.bash_profile或者~/.zprofile(取决于用什么shell)中添加了函数proxy,之后可以通过proxy_on和proxy_off来开启和关闭代理。

1234567891011121314151617181920function proxy_on() { export http_proxy=http://127.0.0.1:7890 export https_proxy=http://127.0.0.1:7890 echo -e "终端代理已开启。"}function proxy_off(){ unset http_proxy https_proxy echo -e "终端代理已关闭。"} ~/hexo > proxy_on 终端代理已开启。 ~/hexo > npx hexo init blog INFO Cloning hexo-starter https://github.com/hexojs/hexo-starter.gitINFO Install dependenciesINFO Start blogging with Hexo! ~/hexo > proxy_off 终端代理已关闭。

Copyright © 2022 游戏活动大全网 - 全网活动一网打尽 All Rights Reserved.