logo
0
0
WeChat Login
Wuying Created Local Users<admin@0ou8bhu743mnkvc.CN-BEIJING-198-6-1.WUYING.LOCAL>
refactor: 移除多余的 clash-install 目录层级

Clash Install

一键安装 Clash 代理工具及其配置。

目录结构

clash-install/ ├── install.sh # 安装脚本 ├── gnome-proxy.sh # GNOME 系统代理控制脚本 ├── bashrc_additions.txt # .bashrc 配置片段 └── clash/ ├── clash # clash 二进制文件 ├── config.yaml # clash 配置文件 (需手动配置) ├── Country.mmdb # GeoIP 数据库 ├── LICENSE └── README.md

安装步骤

1. 下载并执行安装脚本

# 下载并解压本仓库 cd clash-install # 执行安装 bash install.sh

2. 配置 .bashrc

# 将配置添加到 ~/.bashrc cat bashrc_additions.txt >> ~/.bashrc # 重新加载 source ~/.bashrc

3. 配置 Clash

复制你的 Clash 配置文件到正确位置:

cp -f clash/config.yaml ~/.config/clash/config.yaml

注意: config.yaml 包含代理账户信息,请使用你自己的配置文件覆盖。

4. 启动 Clash

# 前台运行 clash # 或后台运行 clash &

5. 启用代理

# 开启代理 gproxy on # 关闭代理 gproxy off # 查看状态 gproxy status

使用方法

终端代理命令

proxy_on # 开启终端代理 proxy_off # 关闭终端代理 proxy_status # 查看代理状态

GNOME 系统代理命令

~/gnome-proxy.sh on # 开启系统代理 ~/gnome-proxy.sh off # 关闭系统代理 ~/gnome-proxy.sh status # 查看状态 ~/gnome-proxy.sh toggle # 切换状态 # 或使用快捷命令 (需先配置 .bashrc) gproxy on gproxy off gproxy status gproxy toggle

注意事项

  1. 配置文件: clash/config.yaml 是模板文件,包含示例配置。安装后需要替换为你自己的配置文件。
  2. 首次使用: 确保先执行 install.sh 安装,再配置 config.yaml
  3. GNOME 桌面: gnome-proxy.sh 依赖 gsettings,仅适用于 GNOME 桌面环境。

卸载

手动删除以下内容:

rm -f ~/.local/bin/clash rm -f ~/gnome-proxy.sh # ~/.config/clash/ 目录可根据需要保留或删除

About

No description, topics, or website provided.
Language
Shell100%