增加 Systemd 文件等.
Signed-off-by: chen.yang <chen.yang@yuzhen-iot.com>
This commit is contained in:
parent
9afe84ae64
commit
428c0b4238
|
@ -8,9 +8,9 @@ Clash 镜像地址为:<https://blacktea.vip.cpolar.top/OrgGo/clash>
|
|||
## Clash 基本命令
|
||||
|
||||
```bash
|
||||
# 指定配置文件目录,该目录下的配置文件名必须为 config.yaml,如果不存在则以默认值创建一个。
|
||||
# 指定配置文件目录,必须有 config.yaml 和 Country.mmdb,如果不存在则自动创建。
|
||||
clash -d <dir>
|
||||
# 指定配置文件
|
||||
# 指定配置文件,该参数不包含 Country 设置信息,所以一般不单独使用。
|
||||
clash -f <config file>
|
||||
```
|
||||
|
||||
|
@ -59,6 +59,27 @@ export https_proxy=127.0.0.1:7890 http_proxy=127.0.0.1:7890 all_proxy=socks5://1
|
|||
export https_proxy=http://192.168.0.200:7890 http_proxy=http://192.168.0.200:7890 all_proxy=socks5://192.168.0.200:7891
|
||||
```
|
||||
|
||||
## Systemd 文件
|
||||
|
||||
```bash
|
||||
[Unit]
|
||||
Description=Clash
|
||||
After=syslog.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
RestartSec=2s
|
||||
Type=simple
|
||||
User=rick
|
||||
Group=rick
|
||||
WorkingDirectory=/<Path>/<To>/<Clash>/<WorkDir>
|
||||
ExecStart=/<Path>/<To>/<Clash>/clash -d /<Path>/<To>/<Clash>/<WorkDir>
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
## 外部参考资料
|
||||
|
||||
1. [ArchLinux 上使用 Clash](https://www.cnblogs.com/LzsCxb/p/15662957.html)
|
||||
|
|
Loading…
Reference in New Issue