mirror of
https://github.com/daeuniverse/dae.git
synced 2025-01-30 09:31:29 +07:00
eac04e991b
* ci: add check-docs workflow * chore: ignore node_modules * chore(deps): add package-lock * style: apply formatting * style: apply formatting * fix: fix typo * fix: fix all proposed changes by markdown-lint * fix: fix trailing spaces * fix(troubleshooting.md): apply minor fi * fix(getting-started): apply minior fix * ci: dont' kick off build when changes made to check-doc.yml * ci: ONLY kick off build when target workflow file changes * trigger build * fix(build.yml): fix syntax * trigger build * fix: fix broken syntax
66 lines
1.4 KiB
Markdown
66 lines
1.4 KiB
Markdown
# Build Guide
|
|
|
|
## Build
|
|
|
|
### Make Dependencies
|
|
|
|
```shell
|
|
clang >= 10
|
|
llvm >= 10 (optional)
|
|
golang >= 1.18
|
|
make
|
|
```
|
|
|
|
### Compilation
|
|
|
|
```shell
|
|
git clone https://github.com/daeuniverse/dae.git
|
|
cd dae
|
|
git submodule update --init
|
|
## Minimal dependency build
|
|
make GOFLAGS="-buildvcs=false" \
|
|
CFLAGS="-D__REMOVE_BPF_PRINTK" \
|
|
CC=clang
|
|
|
|
## Normal build
|
|
#make
|
|
|
|
## Cross compile
|
|
# To armv7 CPU architect:
|
|
#make CGO_ENABLED=0 GOARCH=arm GOARM=7
|
|
# To mips CPU architect:
|
|
#make CGO_ENABLED=0 GOARCH=mips
|
|
```
|
|
|
|
## Run
|
|
|
|
### Runtime Dependencies
|
|
|
|
For traffic splitting, dae relies on the following data sources, [geoip.dat](https://github.com/v2ray/geoip/releases/latest) and [geosite.dat](https://github.com/v2fly/domain-list-community/releases/latest).
|
|
|
|
```shell
|
|
mkdir -p /usr/local/share/dae/
|
|
pushd /usr/local/share/dae/
|
|
curl -L -o geoip.dat https://github.com/v2ray/geoip/releases/latest/download/geoip.dat
|
|
curl -L -o geosite.dat https://github.com/v2ray/domain-list-community/releases/latest/download/dlc.dat
|
|
popd
|
|
```
|
|
|
|
### Run
|
|
|
|
Download the example config file:
|
|
|
|
```shell
|
|
curl -L -o example.dae https://github.com/daeuniverse/dae/raw/main/example.dae
|
|
```
|
|
|
|
See [example.dae](https://github.com/daeuniverse/dae/blob/main/example.dae).
|
|
|
|
After fine tuning, run dae:
|
|
|
|
```shell
|
|
./dae run -c example.dae
|
|
```
|
|
|
|
Alternatively, you may run dae as a daemon(systemd) service. Check out more details [HERE](./run-as-daemon.md).
|