https://github.com/gwuah/many-ports
simple tcp-proxy powered by ebpf 🐝
https://github.com/gwuah/many-ports
Last synced: 28 days ago
JSON representation
simple tcp-proxy powered by ebpf 🐝
- Host: GitHub
- URL: https://github.com/gwuah/many-ports
- Owner: gwuah
- Created: 2024-12-04T22:27:38.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-04T22:27:47.000Z (5 months ago)
- Last Synced: 2025-02-09T07:15:17.782Z (3 months ago)
- Language: Go
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ManyPorts
This is a simple tcp proxy that's powered by ebpf router running in the kernel.# How it works
The application has 2 parts.
- ebpf (kernel) - routes all network traffic to multiple ports to a single socket.
- proxy (userspace) - directs traffic to the appropriate backend.
See config.json for how the routing map looks like.## How to regenerate bpf files
- Run `make deps` to install bpf2go tool.
- run `make generate` to generate the object files & go types.## How to run
After generating all the bpf files, run `go run cmd/proxy/*.go`## Versions
- Ubuntu, 20.04.4
- Clang, 10.0.0
- Golang, 1.18 (linux/amd64)