项目
关于
Network Top -- Help you monitor network traffic with bpf
系统与基础设施可以做什么
- Use the bpf rule filter
- Multi-rule switching
- Resource occupation is small, rust Written
- Support docker deployment
实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.zh-CN.md
原文Language : 🇺🇸 English | 🇨🇳 简体中文
netop
简介
netop 是可以自定义过滤网络流量规则的终端命令行界面 🎯
特点
- 使用
bpf规则过滤 - 多规则切换
- 实时速率
- 总流量
- 响应式 UI
- 资源占用小,
Rust编写 docker部署
安装
Docker
docker run -it --rm --net=host zingerbee/netop
Cargo
需要 rust 和 pcap, 具体查看 如何构建
# 安装
sudo cargo install netop
# 运行
netop
# 或者指定网卡运行
netop -n eth0
NetBSD
在 NetBSD 上有官方软件包, 要安装预编译的二进制文件,只需运行
pkgin install netop
或者,如果你喜欢从源代码构建它
cd /usr/pkgsrc/net/netop
make install
Arch Linux
由 @kemelzaidan 提供
如何使用
- 按
e进入编辑模式, 输入新 bpf 规则, 回车确认 - 按
Esc退出编辑模式 - 使用方向键
<-和->在不同规则间切换 - 在非编辑模式下, 按
dd删除当前规则 - 在非编辑模式下, 按
q退出程序
查看帮助
netop -h
# docker
docker run -it --rm --net=host zingerbee/netop -h
输出如下
netop 0.1.4
USAGE:
netop [OPTIONS]
OPTIONS:
-h, --help 打印帮助信息
-n, --name <NAME> 指定网卡运行
-V, --version 打印版本信息
指定网卡运行
参数为网卡名称
*unix: 使用
ifconfig查看所有网卡信息windows: 使用
ipconfig查看所有网卡信息
netop -n eth0
# docker
docker run -it --rm --net=host zingerbee/netop -n eth0
如何从源码构建
开发环境
- 最好是
root用户,pcap需要权限 rust>= 1.40.0pcap- Ubuntu、Debian:
apt install libpcap-dev - MacOS: 系统自带
- Windows: 下载 WinPcap 开发者包, 添加
/Lib或/Lib/x64目录到系统环境变量中
- Ubuntu、Debian:
# clone
git clone https://github.com/ZingerLittleBee/netop.git
# run
sudo cargo run
发现问题或提出建议
发行说明
SEE CHANGELOG
探索相关项目
加载中…