From adbab807ad5a68941c041da374a7a4a5f2f5e058 Mon Sep 17 00:00:00 2001 From: yqlbu Date: Sun, 19 Feb 2023 16:14:33 +0800 Subject: [PATCH] doc: add getting-started section --- docs/getting-started/README.md | 73 +++++++++++--------------- docs/getting-started/kernel-upgrade.md | 28 ++++++++-- 2 files changed, 57 insertions(+), 44 deletions(-) diff --git a/docs/getting-started/README.md b/docs/getting-started/README.md index 81116e9..aa911a2 100644 --- a/docs/getting-started/README.md +++ b/docs/getting-started/README.md @@ -9,58 +9,49 @@ Use `uname -r` to check the kernel version on your machine. > **Notes** > If you find your kernel version is `< 5.8`, follow the guide [HERE](./kernel-upgrade.md) to upgrade the kernel to the minimum required version. -**Bind to LAN: >= 5.8** +## Usage -You need bind dae to LAN interface, if you want to provide network service for LAN as an intermediate device. +### Build -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 Configuration Item - -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. +**Make Dependencies** ```shell -zcat /proc/config.gz || cat /boot/{config,config-$(uname -r)} +clang >= 10 +llvm >= 10 +golang >= 1.18 +make ``` -**Bind to LAN** - -``` -CONFIG_DEBUG_INFO_BTF -``` - -**Bind to WAN** - -``` -CONFIG_DEBUG_INFO_BTF -``` - -Check them using command like: +**Build** ```shell -(zcat /proc/config.gz || cat /boot/{config,config-$(uname -r)}) | grep 'CONFIG_DEBUG_INFO_BTF=' +git clone https://github.com/v2rayA/dae.git +cd dae +git submodule update --init +# Minimal dependency build: +make GOFLAGS="-buildvcs=false" CC=clang +# Or normal build: +# make ``` -### Enable IP Forwarding +### Run -By default, any latest Linux distributions will have IP Forwarding `disabled`. In the case where we need to up a Linux router/gateway or a VPN server or simply a plain dial-in server, then we must need to enable forwarding. Do the followings to have `ip-forwarding` feature enabled: +**Runtime Dependencies** + +Download [geoip.dat](https://github.com/v2ray/geoip/releases/latest) and [geosite.dat](https://github.com/v2fly/domain-list-community/releases/latest) to `/usr/local/share/dae/`. + +``` +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** ```shell -sudo tee /etc/sysctl.d/dae.conf< +``` + +Reboot to take effect + +```bash +reboot +uname -r ``` ### Upgrade kernel on RedHat and Fedora Linux @@ -36,6 +53,11 @@ Fedora and RedHat Linux users can install a specific version of Kernel on their ```bash sudo yum update kernel sudo yum install kernel-{version} +``` + +Reboot to take effect + +```bash sudo reboot uname -r ```