Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhouchaowen/prism
eBPF-based API Interface Builder
https://github.com/zhouchaowen/prism
api ebpf http tc
Last synced: 6 days ago
JSON representation
eBPF-based API Interface Builder
- Host: GitHub
- URL: https://github.com/zhouchaowen/prism
- Owner: Zhouchaowen
- License: apache-2.0
- Created: 2023-09-01T14:06:00.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-09T13:48:24.000Z (about 1 year ago)
- Last Synced: 2023-10-09T14:46:18.239Z (about 1 year ago)
- Topics: api, ebpf, http, tc
- Language: C
- Homepage:
- Size: 4.65 MB
- Stars: 24
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Prism
Prism is an eBPF-Based interface generator that captures the HTTP traffic of Ingress and Egress through TC and passes it to the user mode through ringbuf to assemble complete data.
# Run
- Kernel >= 5.4.0
## operating run
> device_name, replace with the name of the network device the program is attached to (e.g. eth0)
```bash
prism -n
```## docker run
```bash
docker run --net host --privileged --name prism -itd zmosquito/prism:v0.0.2 ./prism -n
```# How to compile
## require
- Kernel >= 5.4.0
- LLvm >= 14
- Clang >= 14
- Golang >= 1.18
- Cmake```bash
# Ubuntu 22.04
apt-get install linux-kernel-headers linux-headers-$(uname -r)
apt-get update && apt-get install -y make clang-14 llvm-14 libc6-dev libc6-dev-i386 libz-dev libelf-dev libbpf-dev iproute2 && apt-get clean
ln -s $(which clang-14) /usr/bin/clang && ln -s $(which llc-14) /usr/bin/llc
```## compile
```bash
make build
```## docker
compile by docker
```bash
docker run --rm -v /root/prism:/root/prism ghcr.io/cilium/ebpf-builder:1694533004 bash -c "cd /root/prism && make build"
```## Demo
https://www.bilibili.com/video/BV1tK4y1c7rh/