2023-02-19 14:54:44 +07:00
# Quick Start Guide
## Linux Kernel Requirement
2023-02-26 18:44:25 +07:00
## Kernel Version
2023-02-19 14:54:44 +07:00
Use `uname -r` to check the kernel version on your machine.
2023-02-26 18:50:38 +07:00
> **Note**
2023-02-26 18:44:25 +07:00
> If you find your kernel version is `< 5.8`, follow the [**Upgrade Guide**](./kernel-upgrade.md) to upgrade the kernel to the minimum required version.
**Bind to LAN: >= 5.8**
You need bind dae to LAN interface, if you want to provide network service for LAN as an intermediate device.
This feature requires the kernel version of machine on which dae install >= 5.8.
Note that if you bind dae to LAN only, dae only provide network service for traffic from LAN, and not impact local programs.
**Bind to WAN: >= 5.8**
You need bind dae to WAN interface, if you want dae to provide network service for local programs.
This feature requires kernel version of the machine >= 5.8.
Note that if you bind dae to WAN only, dae only provide network service for local programs and not impact traffic coming in from other interfaces.
## Kernel Configurations
Usually, mainstream desktop distributions have these items turned on. But in order to reduce kernel size, some items are turned off by default on embedded device distributions like OpenWRT, Armbian, etc.
Use following command to show kernel configuration items on your machine.
```shell
zcat /proc/config.gz || cat /boot/{config,config-$(uname -r)}
```
dae needs:
```
CONFIG_DEBUG_INFO_BTF=y
2023-03-21 15:07:56 +07:00
CONFIG_BPF_EVENTS=y
2023-03-21 15:11:11 +07:00
CONFIG_KPROBE_EVENTS=y
2023-02-26 18:44:25 +07:00
CONFIG_NET_CLS_ACT=y
CONFIG_NET_SCH_INGRESS=m
CONFIG_NET_INGRESS=y
CONFIG_NET_EGRESS=y
```
Check them using command like:
```shell
2023-03-21 15:11:11 +07:00
(zcat /proc/config.gz || cat /boot/{config,config-$(uname -r)}) | grep -E 'CONFIG_(DEBUG_INFO_BTF|BPF_EVENTS|KPROBE_EVENTS|NET_CLS_ACT|NET_SCH_INGRESS|NET_INGRESS|NET_EGRESS)='
2023-02-26 18:44:25 +07:00
```
2023-02-26 18:50:38 +07:00
> **Note**
2023-02-26 18:44:25 +07:00
> `Armbian` users can follow the [**Upgrade Guide**](./kernel-upgrade.md) to upgrade the kernel to meet the kernel configuration requirement.
2023-03-15 11:27:28 +07:00
## Installation
2023-02-19 14:54:44 +07:00
2023-03-15 11:27:28 +07:00
### Archlinux/Manjaro
2023-02-19 14:54:44 +07:00
2023-03-15 11:27:28 +07:00
dae has been released on [AUR ](https://aur.archlinux.org/packages/dae/ ).
2023-02-19 14:54:44 +07:00
2023-02-19 15:14:33 +07:00
```shell
2023-03-15 11:27:28 +07:00
# yay -S dae
pacman -S --needed git base-devel
git clone https://aur.archlinux.org/dae.git
cd dae
makepkg -si
2023-02-19 15:14:33 +07:00
```
2023-02-19 14:54:44 +07:00
2023-03-15 11:27:28 +07:00
After installation, use systemctl to control it.
2023-02-19 14:54:44 +07:00
```shell
2023-03-15 11:27:28 +07:00
# start dae
sudo systemctl start dae
# auto start dae at boot
sudo systemctl enable dae
2023-02-19 14:54:44 +07:00
```
2023-03-15 11:27:28 +07:00
### Docker
2023-02-19 14:54:44 +07:00
2023-03-15 11:27:28 +07:00
Pre-built image and related docs can be found at https://hub.docker.com/r/daeuniverse/dae.
2023-02-19 14:54:44 +07:00
2023-03-15 11:27:28 +07:00
Alternatively, you can use `docker compose` :
2023-02-19 14:54:44 +07:00
2023-02-20 23:41:30 +07:00
```shell
2023-03-15 11:27:28 +07:00
git clone --depth=1 https://github.com/daeuniverse/dae
docker compose up -d --build
2023-02-19 14:54:44 +07:00
```
2023-03-15 11:27:28 +07:00
### Others
Other users can build dae by scratch. See [Build Guide ](build-by-yourself.md ) for more help.
### Minimal Configuration
For minimal bootable config:
2023-02-19 14:54:44 +07:00
2023-02-21 11:45:26 +07:00
```shell
2023-03-15 11:27:28 +07:00
global{}
routing{}
2023-02-21 11:45:26 +07:00
```
2023-03-15 11:27:28 +07:00
However, this config leaves dae no-load state. If you want dae to be in working state, following is a best practice for small config:
2023-02-19 14:54:44 +07:00
```shell
2023-03-15 11:27:28 +07:00
global {
# Bind to LAN and/or WAN as you want. Replace the interface name to your own.
#lan_interface: docker0
2023-03-24 12:30:02 +07:00
wan_interface: auto # Use "auto" to auto detect WAN interface.
2023-03-15 11:27:28 +07:00
log_level: info
allow_insecure: false
2023-03-25 16:16:24 +07:00
auto_config_kernel_parameter: true
2023-03-15 11:27:28 +07:00
}
subscription {
# Fill in your subscription links here.
}
2023-03-16 13:42:08 +07:00
# See https://github.com/daeuniverse/dae/blob/main/docs/dns.md for full examples.
2023-03-15 11:27:28 +07:00
dns {
upstream {
googledns: 'tcp+udp://dns.google:53'
2023-03-15 11:55:33 +07:00
alidns: 'udp://dns.alidns.com:53'
2023-03-15 11:27:28 +07:00
}
2023-03-16 23:42:37 +07:00
routing {
request {
fallback: alidns
}
response {
upstream(googledns) -> accept
!qname(geosite:cn) & & ip(geoip:private) -> googledns
fallback: accept
}
2023-03-15 11:27:28 +07:00
}
}
group {
proxy {
#filter: name(keyword: HK, keyword: SG)
policy: min_moving_avg
}
}
2023-03-16 13:42:08 +07:00
# See https://github.com/daeuniverse/dae/blob/main/docs/routing.md for full examples.
2023-03-15 11:27:28 +07:00
routing {
2023-03-22 20:55:20 +07:00
pname(NetworkManager, systemd-resolved, dnsmasq) -> must_direct
2023-03-15 11:27:28 +07:00
dip(224.0.0.0/3, 'ff00::/8') -> direct
### Write your rules below.
dip(geoip:private) -> direct
dip(geoip:cn) -> direct
domain(geosite:cn) -> direct
fallback: proxy
}
2023-02-19 14:54:44 +07:00
```
2023-03-15 11:27:28 +07:00
See more at [example.dae ](https://github.com/daeuniverse/dae/blob/main/example.dae ).
2023-02-20 23:41:30 +07:00
2023-03-16 23:42:37 +07:00
If you use PVE, refer to [#37 ](https://github.com/daeuniverse/dae/discussions/37 ).
2023-03-19 11:39:36 +07:00
### Troubleshooting
2023-03-21 23:32:09 +07:00
See [Troubleshooting ](troubleshooting.md ).