xdqi / warp-ebpf

A tc-bpf action to rewrite wg.reserved_zero[3] to client_id required by warp, and vice versa for ingress.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What

A tc-bpf action to rewrite wg.reserved_zero[3] to client_id required by warp, and vice versa for ingress.

Usage

  • Register with warp-register.py first, save the result into /etc/wireguard/cf.conf
  • Edit config.h
    • Find line static const __u8 warp_private[3] = {11, 45, 14};
    • Change {11, 45, 14} to the content of ClientID in cf.conf above
  • make to build the eBPF module
  • ./attach.sh <your network interface> to load it into your system
  • wg-quick up cf start the wireguard tunnel
  • ./detach.sh to remove it from your system

Build Dependencies

Debian/Ubuntu: sudo apt install build-essential clang libc6-dev-i386 libbpf-dev

Arch: sudo pacman -S base-devel clang libbpf

TODO

  • IPv6 support

Credits

About

A tc-bpf action to rewrite wg.reserved_zero[3] to client_id required by warp, and vice versa for ingress.

License:GNU General Public License v2.0


Languages

Language:C 62.3%Language:Python 27.0%Language:Shell 8.4%Language:Makefile 2.3%