Skip to content

Steering connections to sockets with BPF socket lookup hook (eBPF Summit 2020)

Notifications You must be signed in to change notification settings

dorkamotorka/sk_lookup-ebpf

 
 

Repository files navigation

Test

Run HTTP server, e.g. python3 raw-examples/socket-tests/blocking-accept.py

Figure out its PID and FD using lsof -i :8080 and ss -lpt. Run eBPF code using sudo ./inet-lookup-ebpf -pid <PID> -fd <FD>

Then you can make a request using

curl http://localhost:8081
curl http://localhost:8082
curl http://localhost:8083

which is hardcoded in eBPF and the request will be redirected to the service with provided PID.

About

Steering connections to sockets with BPF socket lookup hook (eBPF Summit 2020)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 64.8%
  • Python 24.7%
  • C 10.5%