docs: README

This commit is contained in:
mzz2017 2023-02-07 22:29:50 +08:00
parent 5537c3f416
commit c542272493
2 changed files with 53 additions and 31 deletions

View File

@ -17,6 +17,56 @@ As a successor of [v2rayA](https://github.com/v2rayA/v2rayA), dae abandoned v2ra
1. Automatically switch nodes according to policy.
1. Support full-cone NAT for shadowsocks, vmess, and trojan(-go).
## Linux Kernel Requirement
### Kernel Version
Use `uname -r` to check the kernel version on your machine.
**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 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 commands to check the kernel configuration items on your machine.
```shell
zcat /proc/config.gz || cat /boot/{config,config-$(uname -r)}
```
**Bind to LAN**
```
CONFIG_DEBUG_INFO_BTF
```
**Bind to WAN**:
```
CONFIG_DEBUG_INFO_BTF
```
Check them using command like:
```shell
(zcat /proc/config.gz || cat /boot/{config,config-$(uname -r)}) | grep 'CONFIG_DEBUG_INFO_BTF='
```
## Usage
### Build
@ -40,28 +90,6 @@ make GOFLAGS="-buildvcs=false" CC=clang
# make
```
## Linux Kernel Requirement
### Kernel Version
Use `uname -r` to check the kernel version on your machine.
**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.
### Run
**Runtime Dependencies**
@ -91,19 +119,11 @@ See [example.dae](https://github.com/v2rayA/dae/blob/main/example.dae).
1. Domain routing performance optimization.
1. Handle the case that nodes do not support UDP.
1. Handle the case that nodes do not support IPv6.
1. WAN L4Checksum problem.
If the NIC checksumming offload is enabled, the Linux network stack will make a simple checksum a packet when it is sent out from local. When NIC discovers that the source IP of the packet is the local IP of the NIC, it will checksum it complete this checksum.
But the problem is, after the Linux network stack, before entering the network card, we modify the source IP of this packet, causing the Linux network stack to only make a simple checksum, and the NIC also assumes that this packet is not sent from local, so no further checksum completing.
1. MACv2 extension extraction.
1. Log to userspace.
1. DNS upstream support tcp://
1. ...

View File

@ -95,7 +95,9 @@ func NewControlPlane(
return nil, fmt.Errorf("rlimit.RemoveMemlock:%v", err)
}
pinPath := filepath.Join(consts.BpfPinRoot, consts.AppName)
os.MkdirAll(pinPath, 0755)
if err := os.MkdirAll(pinPath, 0755); !os.IsExist(err) {
return nil, err
}
// Load pre-compiled programs and maps into the kernel.
log.Infof("Loading eBPF programs and maps into the kernel")