從原始碼建置
建置
建置相依套件
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 授權條款。
