界面是这个样子
https://github.com/ZingerLittleBee/netop
docker run -it --rm --net=host zingerbee/netop
按 e
输入新 bpf 规则 , 回车确认
使用方向键 <- 和 -> 在不同规则间切换
按 q
就可以退出了
想通过编码的方式获得流量等参数, 可以看下我封装的 pcap 的库 https://github.com/ZingerLittleBee/netraffic
1 Zinzin 2022-06-06 03:56:28 +08:00 ![]() 好 cool 啊 |
![]() | 2 nmap 2022-06-06 10:28:31 +08:00 docker 对 linux 发行版有要求吗 |
![]() | 3 binhb OP @nmap #2 docker 底层是依赖了 libpcap, 按理说有 libpcap 的发行版都可以, 不过 alpine 打包遇到了些问题, 就暂且搁置了 |
![]() | 4 ragnaroks 2022-06-06 11:31:50 +08:00 docker run -it --rm --net=host zingerbee/netop => memory allocation of 18446744073709551612 bytes failed |
![]() | 5 ragnaroks 2022-06-06 11:33:34 +08:00 宿主机是洋垃圾 64 线程 256 内存,debian 11 |
![]() | 6 654656413245 2022-06-06 13:27:52 +08:00 牛批了大佬,学习 ebpf 有什么推荐路线或学习资料吗 |
![]() | 8 binhb OP @654656413245 误会啦,我对 bpf 只有浅显的了解,解析这一块是底层库做的 |