dae/docs/en/user-guide/build-by-yourself.md

65 lines
1.4 KiB
Markdown
Raw Normal View History

2023-03-15 11:27:28 +07:00
# Build Guide
## Build
### Make Dependencies
2023-03-15 11:27:28 +07:00
```shell
clang >= 10
2023-03-17 14:37:12 +07:00
llvm >= 10 (optional)
2023-03-15 11:27:28 +07:00
golang >= 1.18
make
```
### Compilation
2023-03-15 11:27:28 +07:00
```shell
git clone https://github.com/daeuniverse/dae.git
cd dae
git submodule update --init
2023-03-17 14:37:12 +07:00
## Minimal dependency build
2023-03-17 14:40:49 +07:00
make GOFLAGS="-buildvcs=false" \
2023-03-17 14:57:30 +07:00
CC=clang
2023-03-17 14:37:12 +07:00
## 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
2023-03-15 11:27:28 +07:00
```
## Run
### Runtime Dependencies
2023-03-15 11:27:28 +07:00
For traffic splitting, dae relies on the following data sources, [geoip.dat](https://github.com/v2fly/geoip/releases/latest) and [geosite.dat](https://github.com/v2fly/domain-list-community/releases/latest).
2023-03-15 11:27:28 +07:00
```shell
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
2023-03-15 11:27:28 +07:00
popd
```
### Run
2023-03-15 11:27:28 +07:00
Download the example config file:
2023-03-15 11:27:28 +07:00
```shell
curl -L -o example.dae https://github.com/daeuniverse/dae/raw/main/example.dae
```
2023-03-15 11:27:28 +07:00
See [example.dae](https://github.com/daeuniverse/dae/blob/main/example.dae).
After fine tuning, run dae:
2023-03-15 11:27:28 +07:00
```shell
./dae run -c example.dae
```
> **Note**: Alternatively, you may run dae as a daemon (systemd) service. Check out more details [HERE](run-as-daemon.md).