| Crates.io | sniffer |
| lib.rs | sniffer |
| version | 0.2.0 |
| created_at | 2025-04-18 10:10:48.131243+00 |
| updated_at | 2025-04-18 12:02:53.15307+00 |
| description | A tool for detecting SNI-based network blocking and censorship |
| homepage | |
| repository | https://github.com/4383/sniffer |
| max_upload_size | |
| id | 1639175 |
| size | 100,967 |
SNIffer is a command-line tool for detecting and analyzing SNI-based (Server Name Indication) network blocking and censorship. This tool helps identify different types of network filtering techniques including SNI-based blocking, DNS censorship, and TLS MITM (Man-in-the-Middle) attacks.
cargo install sniffer
# Clone the repository
git clone https://github.com/4383/sniffer.git
cd sniffer
# Build in release mode
cargo build --release
# The binary will be available at ./target/release/sniffer
Test a single domain:
sniffer example.com
Test multiple domains:
sniffer facebook.com twitter.com youtube.com
USAGE:
sniffer [OPTIONS] <DOMAINS>...
ARGS:
<DOMAINS>... One or more domains to check for SNI blocking
OPTIONS:
-h, --help Print help information
--ip <IP> IP address to use instead of resolving DNS
--timeout <TIMEOUT> Maximum timeout for each test in seconds [default: 10]
--max-concurrency <MAX> Maximum number of domains to test in parallel [default: 5]
--output <FORMAT> Output format: normal, json, verbose, or silent [default: normal]
-V, --version Print version information
Basic check for SNI blocking:
sniffer facebook.com
Test multiple domains with limited concurrency:
sniffer tiktok.com youtube.com --max-concurrency 2
Test multiple domains from an input file:
cat domains.txt | xargs sniffer
Use a specific IP address (bypass DNS):
sniffer --ip 157.240.18.35 facebook.com
Set a shorter timeout and output as JSON:
sniffer --timeout 5 --output json censoredsite.com weibo.com
SNI Sniffer provides different types of results:
SNI Sniffer works by:
If the connection with correct SNI fails but works with fake SNI, it indicates SNI-based blocking.
Contributions are welcome! Please feel free to submit a Pull Request.