作为服务运行
本指南适用于使用 systemd 的系统,说明如何启动 dae 服务并设置开机自动启动。
前提条件
可选的 Geo 数据文件
为了更方便地进行流量分流,dae 依赖以下数据源:geoip.dat 和 geosite.dat。
shell
sudo mkdir -p /usr/local/share/dae/
pushd /usr/local/share/dae/
sudo curl -L -o geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
sudo curl -L -o geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat
popdshell
mkdir -p /usr/local/share/dae/
pushd /usr/local/share/dae/
curl -L -o geoip.dat https://github.com/v2fly/geoip/releases/latest/download/geoip.dat
curl -L -o geosite.dat https://github.com/v2fly/domain-list-community/releases/latest/download/dlc.dat
popd配置文件
注意:建议将配置文件保存在
/etc/dae下
下载示例配置文件:
shell
sudo mkdir -p /etc/dae
sudo curl -L -o /etc/dae/config.dae https://github.com/daeuniverse/dae/raw/main/example.dae
sudo chmod 600 /etc/dae/config.daeshell
mkdir -p /etc/dae
curl -L -o /etc/dae/config.dae https://github.com/daeuniverse/dae/raw/main/example.dae
chmod 600 /etc/dae/config.dae启动服务前,编辑 /etc/dae/config.dae,设置网络接口、订阅或节点。参见最小配置。
下载预编译二进制文件
发布版本位于 https://github.com/daeuniverse/dae/releases
注意:如果你想体验新功能,可以使用夜间(最新)构建。大多数时候,新提出的变更会包含在
PRs中,并会在构建(GitHub Action Workflow Build)中导出为跨平台可执行二进制文件。请注意,新引入的功能有时存在错误,风险由你自行承担。不过,我们仍强烈鼓励你查看最新构建,因为这可能有助于我们进一步分析功能稳定性并相应地解决潜在错误。
夜间构建位于 https://github.com/daeuniverse/dae/actions/workflows/build-nightly.yml
shell
sudo chmod +x ./dae
sudo install -Dm755 dae /usr/bin/shell
chmod +x ./dae
install -Dm755 dae /usr/bin/检查可执行文件
shell
# helper
dae --help
# check version
dae version设置
shell
# download the sample systemd.service
sudo curl -L -o /etc/systemd/system/dae.service https://github.com/daeuniverse/dae/raw/main/install/dae.serviceshell
# download the sample systemd.service
curl -L -o /etc/systemd/system/dae.service https://github.com/daeuniverse/dae/raw/main/install/dae.service启动并启用服务
shell
sudo systemctl daemon-reload
sudo systemctl enable dae --now
sudo systemctl status daeshell
systemctl daemon-reload
systemctl enable dae --now
systemctl status dae检查系统日志
shell
sudo journalctl -xefu daeshell
journalctl -xefu dae来源:dae 上游文档 · AGPL-3.0 许可证。
