mirror of
https://github.com/daeuniverse/dae.git
synced 2025-02-23 21:23:25 +07:00
doc: add getting-started section
This commit is contained in:
parent
b13b6787bb
commit
adbab807ad
@ -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<<EOF
|
||||
net.ipv4.ip_forward = 1
|
||||
net.ipv6.conf.all.forwarding = 1
|
||||
EOF
|
||||
sudo sysctl --system
|
||||
./dae run -c example.dae
|
||||
```
|
||||
|
||||
See [example.dae](https://github.com/v2rayA/dae/blob/main/example.dae).
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
A `kernel` is the core of any operating system. Before you start calling Linux an operating system, you need to know the basic concept and Linux’s birth history. **_Linux is not an operating system; mainly, Linux is a kernel_**.
|
||||
|
||||
## Upgrade Guide
|
||||
## How To Upgrade Linux Kernel On Various Distributions
|
||||
|
||||
### Disclaimer
|
||||
|
||||
@ -22,9 +22,26 @@ Various Linux distributions have different methods to upgrade the Linux kernel.
|
||||
|
||||
### Upgrade Kernel on Debian-based Linux
|
||||
|
||||
```bash
|
||||
sudo apt search linux-image
|
||||
Debian-based Linux distribution users can upgrade their Linux kernel upgrading the `linux-image-generic` to a desired version by making use of the [mainline](https://github.com/pimlie/ubuntu-mainline-kernel.sh) tool. It will update both `linux-image-generic` and `linux-headers-generic`.
|
||||
|
||||
```bash
|
||||
sudo apt-add-repository -y ppa:cappelikan/ppa
|
||||
sudo apt update
|
||||
sudo apt install wget mainline
|
||||
wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh
|
||||
chmod +x ubuntu-mainline-kernel.sh
|
||||
sudo install ubuntu-mainline-kernel.sh /usr/local/bin/
|
||||
|
||||
# list available kernel patches
|
||||
ubuntu-mainline-kernel.sh -l
|
||||
ubuntu-mainline-kernel.sh -i <DESIRED VERSION>
|
||||
```
|
||||
|
||||
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
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user