Linux配置clash客户端
侧边栏壁纸
  • 累计撰写 185 篇文章
  • 累计收到 115 条评论

Linux配置clash客户端

cby
cby
2023-07-01 / 0 评论 / 986 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2023年07月01日,已超过385天没有更新,若内容或图片失效,请留言反馈。

Linux配置clash客户端

创建配置目录

root@cby:~# mkdir /etc/clash

下载主程序

root@cby:~# wget https://mirrors.chenby.cn/https://github.com/Dreamacro/clash/releases/download/v1.17.0/clash-linux-amd64-v1.17.0.gz--2023-07-01 05:03:15--  https://mirrors.chenby.cn/https://github.com/Dreamacro/clash/releases/download/v1.17.0/clash-linux-amd64-v1.17.0.gz
Resolving mirrors.chenby.cn (mirrors.chenby.cn)... 2606:4700:3032::ac43:86f6, 2606:4700:3031::6815:19fd, 104.21.25.253, ...
Connecting to mirrors.chenby.cn (mirrors.chenby.cn)|2606:4700:3032::ac43:86f6|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3995044 (3.8M) [application/octet-stream]
Saving to: ‘clash-linux-amd64-v1.17.0.gz’

clash-linux-amd64-v1.17.0.gz       100%[==============================================================>]   3.81M  1.06MB/s    in 3.6s    

2023-07-01 05:03:21 (1.06 MB/s) - ‘clash-linux-amd64-v1.17.0.gz’ saved [3995044/3995044]
root@cby:~#

解压主程序

root@cby:~# gunzip clash-linux-amd64-*
root@cby:~# 
root@cby:~# ls
clash-linux-amd64-v1.17.0
root@cby:~# mv clash-linux-amd64-*  /usr/local/bin/clash

配置clash守护进程

root@cby:~# chmod +x /usr/local/bin/clash 
root@cby:~# cat > /etc/systemd/system/clash.service << EOF 
[Unit]
Description=Clash daemon, A rule-based proxy in Go.
After=network-online.target

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

[Install]
WantedBy=multi-user.target
EOF

设置开机自启并启动

systemctl daemon-reload
systemctl enable --now clash
systemctl restart clash
systemctl status clash

下载订阅配置

wget 'xxx' -O /etc/clash/config.yaml

启动控制面板

docker run -p 1234:80 -d --name yacd --rm ghcr.io/haishanh/yacd:master

关于

https://www.oiox.cn/

https://www.oiox.cn/index.php/start-page.html

CSDN、GitHub、51CTO、知乎、开源中国、思否、博客园、掘金、简书、华为云、阿里云、腾讯云、哔哩哔哩、今日头条、新浪微博、个人博客

全网可搜《小陈运维》

文章主要发布于微信公众号

0

评论 (0)

取消