
界面是这个样子 
https://github.com/ZingerLittleBee/netop
docker run -it --rm --net=host zingerbee/netop 按 e 输入新 bpf 规则 , 回车确认
使用方向键 <- 和 -> 在不同规则间切换
按 q 就可以退出了
想通过编码的方式获得流量等参数, 可以看下我封装的 pcap 的库 https://github.com/ZingerLittleBee/netraffic
1 Zinzin Jun 6, 2022 好 cool 啊 |
2 nmap Jun 6, 2022 docker 对 linux 发行版有要求吗 |
3 binhb OP @nmap #2 docker 底层是依赖了 libpcap, 按理说有 libpcap 的发行版都可以, 不过 alpine 打包遇到了些问题, 就暂且搁置了 |
4 ragnaroks Jun 6, 2022 docker run -it --rm --net=host zingerbee/netop => memory allocation of 18446744073709551612 bytes failed |
5 ragnaroks Jun 6, 2022 宿主机是洋垃圾 64 线程 256 内存,debian 11 |
6 654656413245 Jun 6, 2022 牛批了大佬,学习 ebpf 有什么推荐路线或学习资料吗 |
8 binhb OP @654656413245 误会啦,我对 bpf 只有浅显的了解,解析这一块是底层库做的 |
9 henbf Jun 6, 2022 看到你这个,让我想起了 zenith https://github.com/bvaisvil/zenith |
13 Andydufresneguoh Jun 8, 2022 还要用 host 模式吗,不太安全,不用行不行 |
14 binhb OP @Andydufresneguoh 不用 host ,捕获的是 docker 容器的流量 |
15 m9rco Jun 10, 2022 网络这块楼主好擅长 |
17 buxiang Jun 28, 2022 是否有办法监听统计 host 模式运行的 docker 的流量呢,因为没有命名空间,所以网上得到的办法最后取到的都是宿主机的网卡流量 |