mirror of
https://github.com/daeuniverse/dae.git
synced 2024-12-22 20:34:40 +07:00
15 lines
542 B
Bash
Executable File
15 lines
542 B
Bash
Executable File
#!/bin/bash
|
|
dev=docker0
|
|
|
|
sudo tc qdisc add dev $dev clsact > /dev/null 2>&1
|
|
|
|
set -ex
|
|
|
|
# clang -fno-stack-protector -O2 -g -emit-llvm -c component/control/kern/tproxy.c -o - | llc -march=bpf -mcpu=probe -filetype=obj -o foo.o
|
|
clang -O2 -g -Wall -Werror -c component/control/kern/tproxy.c -target bpf -o foo.o
|
|
sudo tc filter del dev $dev ingress
|
|
sudo tc filter add dev $dev ingress bpf direct-action obj foo.o sec tc/ingress
|
|
sudo tc filter del dev $dev egress
|
|
sudo tc filter add dev $dev egress bpf direct-action obj foo.o sec tc/egress
|
|
|
|
exit 0 |