From ad2a128820e4fc6769e3a71665ef04f60b0c086d Mon Sep 17 00:00:00 2001
From: Night Owl Nerd <256460992+nightowlnerd@users.noreply.github.com>
Date: Fri, 30 Jan 2026 19:28:48 +0100
Subject: [PATCH] docs: add features section, fix RTL, document burst testing
and hijacking detection
---
README.fa.md | 109 +++++++++------------------------------------------
README.md | 21 ++++++++++
2 files changed, 40 insertions(+), 90 deletions(-)
diff --git a/README.fa.md b/README.fa.md
index 1b23d34..48ed970 100644
--- a/README.fa.md
+++ b/README.fa.md
@@ -1,5 +1,3 @@
-
-
# dnscan
[](https://github.com/nightowlnerd/dnscan/actions/workflows/ci.yml)
@@ -10,6 +8,13 @@
پیدا کردن سرورهای DNS فعال برای تونلهای DNS در زمان قطعی اینترنت. این ابزار رنجهای IP کشورهای مختلف را اسکن میکند تا resolverهای بازگشتی که میتوانند به سرور تونل شما برسند را پیدا کند.
+## ویژگیها
+
+- 🧪 **تست Burst** - سرورهایی که فقط به یک کوئری جواب میدهند اما زیر بار واقعی fail میشوند را فیلتر میکند (مثل 1.1.1.1 که 0% موفقیت دارد)
+- 🛡️ **تشخیص DNS Hijacking** - سرورهایی که IP خصوصی برمیگردانند را شناسایی و هشدار میدهد
+- ⚡ **مرتبسازی بر اساس QPS** - نتایج بر اساس سرعت (queries per second) مرتب میشوند
+- 🎨 **رنگبندی** - سبز برای ≥85% موفقیت، زرد برای 70-84%
+
## کاربرد
در زمان محدودیتهای اینترنتی، تونلهای DNS (مثل [slipstream](https://github.com/Mygod/slipstream-rust)) میتوانند با کدگذاری ترافیک در کوئریهای DNS، محدودیتها را دور بزنند. این ابزار سرورهای DNS را پیدا میکند که:
@@ -19,10 +24,6 @@
## شروع سریع
-
-
-
-
```bash
# دانلود و استخراج (Linux amd64)
curl -LO https://github.com/nightowlnerd/dnscan/releases/latest/download/dnscan-linux-amd64.tar.gz
@@ -32,20 +33,12 @@ tar xzf dnscan-linux-amd64.tar.gz
./dnscan --country ir --domain t.example.com --mode list
```
-
-

-
-
**نکته:** فایل tarball شامل باینری `dnscan` و پوشه `data/` است. رنجهای IP برای کشورهای جدید به صورت خودکار دانلود میشوند.
## ساخت از سورس
-
-
-
-
```bash
# Linux
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o dnscan-linux-amd64 .
@@ -54,10 +47,6 @@ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o dnscan-linux-
go build -o dnscan .
```
-
-
-
-
## پرچمها
| پرچم | پیشفرض | توضیحات |
@@ -84,10 +73,6 @@ go build -o dnscan .
## مثالها
-
-
-
-
```bash
# تست سریع - فقط DNSهای شناختهشده
./dnscan --country ir --domain t.example.com --mode list
@@ -108,26 +93,28 @@ go build -o dnscan .
./dnscan --country cn --domain t.example.com --mode fast
```
-
+## تست Burst
-
+وقتی `--domain` مشخص شود، dnscan هر سرور کاندید را با 20 کوئری همزمان تست میکند. این کار سرورهایی مثل 1.1.1.1 را که به یک کوئری جواب میدهند اما زیر بار واقعی slipstream fail میشوند، فیلتر میکند.
-## پرچم --verify
+نتایج بر اساس QPS (queries per second) مرتب میشوند - سریعترین سرورها اول نشان داده میشوند.
-به صورت پیشفرض، اسکنر فقط چک میکند که آیا سرور DNS پاسخ میدهد. با `--verify`، هر کاندیدا را با slipstream-client واقعی تست میکند تا کارکرد تونل را تأیید کند:
+## تشخیص DNS Hijacking
-
+اگر ISP شما DNS را hijack کرده باشد (کوئریها به IP خصوصی مثل 10.x.x.x برمیگردند)، dnscan این سرورها را رد کرده و هشدار میدهد:
-
+```
+Warning: 5 servers returned private IPs (possible DNS hijacking)
+```
+
+## پرچم --verify
+
+به صورت پیشفرض، اسکنر فقط چک میکند که آیا سرور DNS پاسخ میدهد. با `--verify`، هر کاندیدا را با slipstream-client واقعی تست میکند تا کارکرد تونل را تأیید کند:
```bash
./dnscan --domain t.example.com --mode list --verify ./slipstream-client
```
-
-
-
-
دریافت slipstream-client از: https://github.com/AliRezaBeigy/slipstream-rust-deploy/releases
خروجی زمان اتصال هر سرور را نشان میدهد:
@@ -139,10 +126,6 @@ go build -o dnscan .
## فایلهای داده
-
-
-
-
```
data/
ranges/
@@ -151,55 +134,31 @@ data/
ir.txt # سرورهای DNS شناختهشده
```
-
-
-
-
### دانلود خودکار رنجهای IP
رنجهای IP به صورت خودکار از [ipdeny.com](https://www.ipdeny.com/ipblocks/) دانلود میشوند وقتی کشور جدیدی استفاده کنید:
-
-
-
-
```bash
# اولین اجرا de.zone را دانلود میکند
./dnscan --country de --domain t.example.com --mode fast
```
-
-
-
-
### اضافه کردن DNS
فایل `data/dns/.txt` را ویرایش کنید (برای `--mode list` استفاده میشود):
-
-
-
-
```
# data/dns/ir.txt
185.8.174.140
130.185.77.69
```
-
-
-
-
## راهاندازی سرور
قبل از اسکن، سرور تونل شما باید در حال اجرا باشد. اسکنر کوئریهای DNS به دامنه شما میفرستد - اگر سرور در حال اجرا نباشد، همه سرورهای DNS ناموفق به نظر میرسند.
برای slipstream:
-
-
-
-
```bash
# روی سرور شما
docker run -d --network host bashsiz/slipstream-rust slipstream-server \
@@ -208,49 +167,25 @@ docker run -d --network host bashsiz/slipstream-rust slipstream-server \
--target-address 127.0.0.1:22
```
-
-
-
-
برای تست بدون تونل (فقط چک کردن دسترسی DNS):
-
-
-
-
```bash
# DNS responder ساده
dnsmasq --no-daemon --log-queries --address=/t.example.com/1.2.3.4
```
-
-
-
-
## خروجی
سرورهای DNS فعال در stdout چاپ میشوند (هر خط یکی):
-
-
-
-
```
185.8.174.140
130.185.77.69
217.218.127.127
```
-
-
-
-
استفاده با slipstream:
-
-
-
-
```bash
./slipstream-client \
--resolver 185.8.174.140:53 \
@@ -259,10 +194,6 @@ dnsmasq --no-daemon --log-queries --address=/t.example.com/1.2.3.4
--tcp-listen-port 7000
```
-
-
-
-
## عیبیابی
**هیچ سرور DNS پیدا نشد:**
@@ -278,5 +209,3 @@ dnsmasq --no-daemon --log-queries --address=/t.example.com/1.2.3.4
**"Failed to download ranges":**
- اتصال اینترنت را چک کنید
- کد کشور ممکن است در ipdeny.com وجود نداشته باشد
-
-
diff --git a/README.md b/README.md
index c414c17..0e85191 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,13 @@
Find working DNS servers for DNS tunnels during internet blackouts. Scans country-specific IP ranges to find recursive resolvers that can reach your tunnel server.
+## Features
+
+- 🧪 **Burst Testing** - Filters servers that respond to single queries but fail under real load (e.g., 1.1.1.1 shows 0% success)
+- 🛡️ **DNS Hijacking Detection** - Detects and warns when servers return private IPs
+- ⚡ **QPS Sorting** - Results sorted by throughput (queries per second)
+- 🎨 **Color Coding** - Green for ≥85% success, yellow for 70-84%
+
## Use Case
During internet restrictions, DNS tunnels (like [slipstream](https://github.com/Mygod/slipstream-rust)) can bypass blocks by encoding traffic in DNS queries. This tool finds DNS servers that:
@@ -87,6 +94,20 @@ go build -o dnscan .
./dnscan --country cn --domain t.example.com --mode fast
```
+## Burst Testing
+
+When `--domain` is specified, dnscan tests each candidate with 20 concurrent queries. This filters out servers like 1.1.1.1 that respond to single queries but fail under real slipstream load.
+
+Results are sorted by QPS (queries per second) - fastest servers listed first.
+
+## DNS Hijacking Detection
+
+If your ISP hijacks DNS (queries return private IPs like 10.x.x.x), dnscan rejects those servers and warns you:
+
+```
+Warning: 5 servers returned private IPs (possible DNS hijacking)
+```
+
## The --verify Flag
By default, the scanner only checks if a DNS server responds. With `--verify`, it tests each candidate with the actual slipstream-client to confirm the tunnel works: