5 releases
0.1.4 | Dec 18, 2023 |
---|---|
0.1.3 | Dec 18, 2023 |
0.1.2 | Jun 3, 2023 |
0.1.1 | Nov 16, 2022 |
0.1.0 | Jun 18, 2022 |
#1577 in Network programming
33 downloads per month
29KB
633 lines
Language : ๐บ๐ธ English | ๐จ๐ณ ็ฎไฝไธญๆ
netop
Overview
netop
is a terminal command line interface that can customize the filter network traffic rule ๐ฏ
Features
- Use the
bpf
rule filter - Multi-rule switching
- Real-time rate
- Total traffic
- Response UI
- Resource occupation is small,
rust
Written - Support
docker
deployment
Installation
Docker
docker run -it --rm --net=host zingerbee/netop
Cargo
need rust
and pcap
, detail look at How to build
# install
sudo cargo install netop
# and then run
netop
# or designated network interface card running
netop -n eth0
NetBSD
On NetBSD there's an official package available. To install a pre-compiled binary, simply run
pkgin install netop
Or, if you prefer to build it from source,
cd /usr/pkgsrc/net/netop
make install
How to use
- Press
e
to enter edit mode input bpf rule, and then pressenter
- Press
Esc
to exit edit mode - Use the
<-
or->
to switch between different rules - Not in edit mode, press
dd
to delete current rule - Not in edit mode, press
q
to quit
View help
netop -h
# docker
docker run -it --rm --net=host zingerbee/netop -h
Output as follows
netop 0.1.4
USAGE:
netop [OPTIONS]
OPTIONS:
-h, --help Print help information
-n, --name <NAME> Name of Network Interface Card
-V, --version Print version information
Designated network interface card running
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
netop -n eth0
# docker
docker run -it --rm --net=host zingerbee/netop -n eth0
How to build from source
Development environment
- It is best to be
root
user,pcap
requires permissions rust
>= 1.40.0pcap
- 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.
- UbuntuใDebian:
sudo cargo install --path .
# or
sudo cargo run
Found an issue or have a proposal
Release Notes
SEE CHANGELOG
Dependencies
~8โ14MB
~159K SLoC