mirror of
https://github.com/wnlen/clash-for-linux.git
synced 2025-05-06 20:14:44 +08:00
docs: update
This commit is contained in:
parent
16948a8709
commit
dac5fd8833
46
README.md
46
README.md
|
@ -1,17 +1,13 @@
|
|||
[TOC]
|
||||
|
||||
# 项目介绍
|
||||
|
||||
此项目是通过使用开源项目[clash](https://github.com/Dreamacro/clash)作为核心程序,再结合脚本实现简单的代理功能。
|
||||
|
||||
主要是为了解决我们在服务器上下载GitHub等一些国外资源速度慢的问题。
|
||||
|
||||
<br>
|
||||
|
||||
# 使用须知
|
||||
|
||||
- 本脚本适合在 fish 下使用,如使用 bash/zsh 则还需要自行修改。
|
||||
- 运行本项目建议使用root用户,或者使用 sudo 提权。
|
||||
- 使用过程中如遇到问题,请优先查已有的 [issues](https://github.com/wanhebin/clash-for-linux/issues)。
|
||||
- 在进行issues提交前,请替换提交内容中是敏感信息(例如:订阅地址)。
|
||||
- 本项目是基于 [clash](https://github.com/Dreamacro/clash) 、[yacd](https://github.com/haishanh/yacd) 进行的配置整合,关于clash、yacd的详细配置请去原项目查看。
|
||||
- 此项目不提供任何订阅信息,请自行准备Clash订阅地址。
|
||||
|
@ -19,10 +15,6 @@
|
|||
- 当前在RHEL系列和Debian系列Linux系统中测试过,其他系列可能需要适当修改脚本。
|
||||
- 支持 x86_64/aarch64 平台
|
||||
|
||||
> **注意**:当你在使用此项目时,遇到任何无法独自解决的问题请优先前往 [Issues](https://github.com/wanhebin/clash-for-linux/issues) 寻找解决方法。由于空闲时间有限,后续将不再对Issues中 “已经解答”、“已有解决方案” 的问题进行重复性的回答。
|
||||
|
||||
<br>
|
||||
|
||||
# 使用教程
|
||||
|
||||
## 下载项目
|
||||
|
@ -30,20 +22,18 @@
|
|||
下载项目
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/wanhebin/clash-for-linux.git
|
||||
$ git clone https://github.com/NekoRectifier/clash-for-linux.git
|
||||
```
|
||||
|
||||
进入到项目目录,编辑`.env`文件,修改变量`CLASH_URL`的值。
|
||||
|
||||
```bash
|
||||
$ cd clash-for-linux
|
||||
$ vim .env
|
||||
$ nano .env
|
||||
```
|
||||
|
||||
> **注意:** `.env` 文件中的变量 `CLASH_SECRET` 为自定义 Clash Secret,值为空时,脚本将自动生成随机字符串。
|
||||
|
||||
<br>
|
||||
|
||||
## 启动程序
|
||||
|
||||
直接运行脚本文件`start.sh`
|
||||
|
@ -58,33 +48,15 @@ $ cd clash-for-linux
|
|||
|
||||
```bash
|
||||
$ sudo bash start.sh
|
||||
|
||||
正在检测订阅地址...
|
||||
Clash订阅地址可访问! [ OK ]
|
||||
|
||||
正在下载Clash配置文件...
|
||||
配置文件config.yaml下载成功! [ OK ]
|
||||
|
||||
正在启动Clash服务...
|
||||
服务启动成功! [ OK ]
|
||||
|
||||
Clash Dashboard 访问地址:http://<ip>:9090/ui
|
||||
Secret:xxxxxxxxxxxxx
|
||||
|
||||
请执行以下命令加载环境变量: source /etc/profile.d/clash.sh
|
||||
|
||||
请执行以下命令开启系统代理: proxy_on
|
||||
|
||||
若要临时关闭系统代理,请执行: proxy_off
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
$ source /etc/profile.d/clash.sh
|
||||
$ source /etc/profile.d/clash.fish
|
||||
$ proxy_on
|
||||
```
|
||||
|
||||
- 检查服务端口
|
||||
- 检查服务端口
|
||||
如有内容即为正常启动。
|
||||
|
||||
```bash
|
||||
$ netstat -tln | grep -E '9090|789.'
|
||||
|
@ -102,9 +74,7 @@ http_proxy=http://127.0.0.1:7890
|
|||
https_proxy=http://127.0.0.1:7890
|
||||
```
|
||||
|
||||
以上步鄹如果正常,说明服务clash程序启动成功,现在就可以体验高速下载github资源了。
|
||||
|
||||
<br>
|
||||
以上步骤如果正常,说明服务clash程序启动成功,现在就可以体验高速下载github资源了。
|
||||
|
||||
## 重启程序
|
||||
|
||||
|
@ -145,7 +115,7 @@ $ proxy_off
|
|||
|
||||
- 访问 Clash Dashboard
|
||||
|
||||
通过浏览器访问 `start.sh` 执行成功后输出的地址,例如:http://192.168.0.1:9090/ui
|
||||
通过浏览器访问 `start.sh` 执行成功后输出的地址,例如:http://localhost:9090/ui
|
||||
|
||||
- 登录管理界面
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user