Language : 🇺🇸 English | 🇨🇳 简体中文
netop
is a terminal command line interface that can customize the filter network traffic rule 🎯
bpf
rule filterrust
Writtendocker
deploymentbash
docker run -it --rm --net=host zingerbee/netop
need rust
and pcap
, detail look at How to build
```bash
sudo cargo install netop
netop
netop -n eth0 ```
On NetBSD there's an official package available.
To install a pre-compiled binary, simply run
bash
pkgin install netop
Or, if you prefer to build it from source,
bash
cd /usr/pkgsrc/net/netop
make install
e
to enter edit mode input bpf rule, and then press enter
Esc
to exit edit mode<-
or ->
to switch between different rulesdd
to delete current ruleq
to quit```bash netop -h
docker run -it --rm --net=host zingerbee/netop -h
Output as follows
bash
netop 0.1.0
USAGE: netop [OPTIONS]
OPTIONS:
-h, --help Print help information
-n, --name
The parameter is name of network interface card
*unix: Use
ifconfig
to view network interface cards informationwindows: Use
ipconfig
to view network interface cards information ```bash netop -n eth0docker
docker run -it --rm --net=host zingerbee/netop -n eth0 ```
Development environment
- It is best to be root
user, pcap
requires permissions
- rust
>= 1.40.0
- pcap
- Ubuntu、Debian: apt install libpcap-dev
- MacOS: installed by default
- Windows: Download the WinPcap Developer's Pack. Add the /Lib or /Lib/x64 folder to your LIB environment variable.
```bash sudo cargo install --path .
sudo cargo run ```
SEE CHANGELOG