Armbian clash 安装流水账
发布:elantion 日期:2022-05-19 阅读:204 评论:0
近段时间折腾软路由,打算装个clash方便浏览点东西,记录下流水账。设备是t1,环境armbian apt。困难程度:地狱级。
流水
连接wifi
mncli device wifi connect $ssid password $pwd
设置代理(下面很多软件需要翻x墙)
export https_proxy=http://192.168.68.238:7890 http_proxy=http://192.168.68.238:7890 all_proxy=socks5://192.168.68.238:7890
安装Go语言(snpa)
sudo apt install snapd
sudo snap install go --classic
安装go后,执行go version
检查是否安装成功,如果在/snap/bin/go
存在,但执行失败,那可能要link一个过去
sudo ln -s /snap/bin/go /usr/bin/go
安装clash
go install github.com/Dreamacro/clash@latest
复制clash到外面,让root可以执行
sudo cp ~/go/bin/clash /usr/local/bin/clash
把订阅地址用浏览器下配置文件config.yaml
,复制到/etc/clash/config.yaml
执行下clash
看是否正常。
添加systemd服务
vim /etc/systemd/system/clash.service
复制下面内容进去
[Unit]
Description=Clash daemon, A rule-based proxy in Go.
After=network.target
[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/clash -d /etc/clash
[Install]
WantedBy=multi-user.target
执行以下命令即可添加到启动项
systemctl enable clash
现在执行以下命令可以立即启动服务
systemctl start clash
浏览器打开http://clash.razord.top,输入系统的ip地址,加上9090端口即可配置