Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 991 Bytes

README.md

File metadata and controls

32 lines (27 loc) · 991 Bytes

Info

Neck stands for 'Neat, Eye-catching, Cute, Killer', although it's not actually a 'killer'. Rather, it's a cute tool designed to block egress traffic (acting as a policer) based on a given CIDR with a nice UI.

Why

I wanted to test bubbletea with ebpf BPF_PROG_TYPE_CGROUP_SOCK_ADDR program type to get:

  • knowledges about bubbletea,
  • check BPF_PROG_TYPE_CGROUP_SOCK_ADDR program type constraints and behavior.

It took me one day to write this program, so it looks how it looks.

Build and Run

Static:

make static

Dynamic:

make dynamic

Run from the build directory:

cd build
sudo ./neck-cli-<static|dynamic>

Conclusions

  • Bubbletea is a great tool for writing terminal applications. I'll definitely stick to it.
  • BPF_PROG_TYPE_CGROUP_SOCK_ADDR program type is good choice for egress traffic filtering if you do not need to filter at the package level and do not have to kill running processes.