从源代码构建
构建
构建依赖
text
clang >= 10
llvm >= 10 (optional)
golang >= 1.26.0
make工具链要求取决于源码版本。本次收录版本使用 Go 1.26.0,请核对对应的 go.mod 与构建工作流。
编译
shell
git clone https://github.com/daeuniverse/dae.git
cd dae
git submodule update --init选择一种构建方式:
shell
## Minimal dependency build
make GOFLAGS="-buildvcs=false" \
CLANG=clangshell
## Normal build
makeshell
## Cross compile
# To armv7 CPU architect:
make CGO_ENABLED=0 GOARCH=arm GOARM=7shell
# To mips CPU architect:
make CGO_ENABLED=0 GOARCH=mips运行
运行时依赖
为了进行流量分流,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运行
下载示例配置文件:
shell
curl -L -o example.dae https://github.com/daeuniverse/dae/raw/main/example.dae请参阅 example.dae。
完成微调后,运行 dae:
shell
sudo ./dae run -c example.daeshell
./dae run -c example.dae注意:或者,你可以将 dae 作为守护进程(systemd)服务运行。请查看守护进程服务指南了解详情。
来源:dae 上游文档 · AGPL-3.0 许可证。
