自定义守护进程

安装 clash

1
sudo pacman -S clash

获取机场提供的配置文件

1
sudo mkdir /etc/clash # 创建配置文件存放地

配置文件放在/etc/clash/下

systemd

创建文件/etc/systemd/system/clash.service, 参考模板

1
2
3
4
5
6
7
8
9
10
11
[Unit]
Description=Clash daemon, A rule-based proxy in Go.
After=network.target

[Service]
Type=simple
Restart=always
ExecStart=/usr/local/bin/clash -d /etc/clash -f /etc/clash/config.yaml

[Install]
WantedBy=multi-user.target

启动

1
sudo systemctl enable --now clash.service

自定义守护进程
https://celiae.github.io/2022/06/01/自定义守护进程/
作者
celiae
发布于
2022年6月1日
许可协议