Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dorkamotorka/transparent-proxy-ebpf
https://github.com/dorkamotorka/transparent-proxy-ebpf
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dorkamotorka/transparent-proxy-ebpf
- Owner: dorkamotorka
- License: gpl-2.0
- Created: 2024-06-08T17:20:38.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-08-29T20:54:10.000Z (4 months ago)
- Last Synced: 2024-08-29T23:09:10.919Z (4 months ago)
- Language: C
- Size: 78.1 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Transparent Proxy
A transparent proxy, also known as an inline proxy, intercepts client requests and redirects them without modifying the request or requiring client-side configuration. It operates invisibly to users, meaning they are unaware of its presence and do not need to adjust their network settings. This technology is invaluable for network management, security policy enforcement, traffic monitoring, and optimization. Transparent proxies can execute a range of functions, including content filtering, cache acceleration, traffic control, and load balancing. Commonly used technologies for implementing transparent proxies include TPROXY, NAT, and others.
In this repository, I implementated Transparent proxy using eBPF. Specifically, I utilize Golang alongside the ebpf-go package.
## How to Run
https://github.com/user-attachments/assets/325745b2-9be1-43cd-bd64-14fa6ac5f5e0
First build and run the eBPF program:
```
go generate
go build
sudo ./proxy
```Now let's verify it works as expected:
- Run the HTTP Server from `/test` directory `go run main.go`
- From another shell, run `curl http://localhost:8000`
You can then inspect eBPF logs using `sudo cat /sys/kernel/debug/tracing/trace_pipe` to verify transparent proxy indeed intercepts the network traffic.