[Unit] Description=xiexievpn Service After=network.target [Service] Type=simple ExecStart=/usr/local/bin/xray //这里/usr/local/bin/替换成你的实际解压路径 Restart=on-failure LimitNOFILE=65535 [Install] WantedBy=multi-user.target
sudo mkdir -p /etc/systemd/resolved.conf.d
sudo tee /etc/systemd/resolved.conf.d/xray.conf << EOF
[Resolve]
DNS=127.0.0.1
DNSStubListener=no
EOF
sudo systemctl restart systemd-resolved
启动:
systemctl daemon-reload
systemctl start xiexievpn
# 开机自启(可选)
systemctl enable xiexievpn