mirror of
https://github.com/daeuniverse/dae.git
synced 2024-12-22 20:04:40 +07:00
chore/docs: lease building requirement and write build instruction
This commit is contained in:
parent
2560587022
commit
10c0c264b2
2
Makefile
2
Makefile
@ -8,9 +8,9 @@
|
||||
# Pin the default clang to a stable version.
|
||||
CLANG ?= clang
|
||||
STRIP ?= llvm-strip
|
||||
OUTPUT ?= dae
|
||||
CFLAGS := -O2 -Wall -Werror $(CFLAGS)
|
||||
TARGET ?= bpfel,bpfeb
|
||||
OUTPUT ?= dae
|
||||
|
||||
# Get version from .git.
|
||||
date=$(shell git log -1 --format="%cd" --date=short | sed s/-//g)
|
||||
|
37
README.md
37
README.md
@ -10,15 +10,42 @@ As a successor of [v2rayA](https://github.com/v2rayA/v2rayA), dae abandoned v2ra
|
||||
|
||||
## Usage
|
||||
|
||||
Build:
|
||||
### Build
|
||||
|
||||
**Make Dependencies**
|
||||
```
|
||||
clang >= 10
|
||||
llvm >= 10
|
||||
golang >= 1.18
|
||||
```
|
||||
|
||||
**Build**
|
||||
```shell
|
||||
git clone https://github.com/v2rayA/dae.git
|
||||
cd dae
|
||||
git submodule update --init
|
||||
make
|
||||
# Minimal dependency build:
|
||||
make GOFLAGS="-buildvcs=false" CGO_ENABLED=0
|
||||
# Or normally build:
|
||||
# make
|
||||
```
|
||||
|
||||
Run:
|
||||
### Run
|
||||
|
||||
**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
|
||||
./dae run -c example.dae
|
||||
```
|
||||
@ -51,8 +78,8 @@ Note that if you bind dae to WAN only, dae only provide network service for loca
|
||||
|
||||
1. Check dns upstream and source loop (whether upstream is also a client of us) and remind the user to add sip rule.
|
||||
1. Domain routing performance optimization.
|
||||
1. Handle the case that nodes do not support UDP by adding `filter: l4proto_out(tcp, udp)`, and filter out those nodes support both TCP and UDP. Thus we can use routing to handle it.
|
||||
1. Handle the case that nodes do not support IPv6 by adding `filter: ipversion_out(4, 6)`, and filter out those nodes support both IPv4 and IPv6. Thus we can use routing to handle it.
|
||||
1. Handle the case that nodes do not support UDP.
|
||||
1. Handle the case that nodes do not support IPv6.
|
||||
1. L4Checksum problem. Maybe it is hard to solve.
|
||||
1. MACv2 extension extraction.
|
||||
1. Log to userspace.
|
||||
|
@ -26,7 +26,6 @@ var (
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Println("OK")
|
||||
},
|
||||
}
|
||||
)
|
||||
|
@ -43,8 +43,9 @@ func Ipv6ByteSliceToUint32Array(_ip []byte) (ip [4]uint32) {
|
||||
}
|
||||
|
||||
func Ipv6Uint32ArrayToByteSlice(_ip [4]uint32) (ip []byte) {
|
||||
ip = make([]byte, 16)
|
||||
for j := 0; j < 4; j++ {
|
||||
ip = binary.LittleEndian.AppendUint32(ip, _ip[j])
|
||||
binary.LittleEndian.PutUint32(ip[j*4:], _ip[j])
|
||||
}
|
||||
return ip
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 69c6c597560e3c0c445b8b0824e9a6e4e7af7dc1
|
||||
Subproject commit 99eb2ebd74b10f2b91c7840c83ad08eec8f50e59
|
@ -3,17 +3,18 @@
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
* Copyright (c) since 2022, v2rayA Organization <team@v2raya.org>
|
||||
*/
|
||||
#include "headers/if_ether_defs.h"
|
||||
#include "headers/pkt_cls_defs.h"
|
||||
#include "headers/socket_defs.h"
|
||||
#include "headers/bpf_probe_read.h"
|
||||
#include "headers/vmlinux.h"
|
||||
|
||||
#include <asm-generic/errno-base.h>
|
||||
|
||||
#include "headers/if_ether_defs.h"
|
||||
#include "headers/pkt_cls_defs.h"
|
||||
#include "headers/socket_defs.h"
|
||||
#include "headers/vmlinux.h"
|
||||
|
||||
// #include <bpf/bpf_core_read.h>
|
||||
#include <bpf/bpf_endian.h>
|
||||
#include <bpf/bpf_helpers.h>
|
||||
#include "headers/bpf_probe_read.h"
|
||||
#include "headers/bpf_endian.h"
|
||||
#include "headers/bpf_helpers.h"
|
||||
|
||||
// #define __DEBUG_ROUTING
|
||||
// #define __PRINT_ROUTING_RESULT
|
||||
|
Loading…
Reference in New Issue
Block a user