Skip to content

Commit 72c384c

Browse files
author
Delta-Kronecker
committed
fix: add r key hint in IP scan, cumulative scan stats
1 parent 8672890 commit 72c384c

10 files changed

Lines changed: 809 additions & 3 deletions

File tree

crates/zerodpi-core/src/proxy.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,11 +1630,11 @@ async fn find_ip_cycle_manager(cmc: CycleManagerConfig) {
16301630
}
16311631
}
16321632

1633-
// Update stats.
1633+
// Update stats (cumulative across cycles).
16341634
{
16351635
let mut stats = cmc.stats.lock().unwrap();
1636-
stats.total_scanned = tcp_tested as u64;
1637-
stats.total_successful = all_scan_results.iter().filter(|e| e.score > 0).count() as u64;
1636+
stats.total_scanned += tcp_tested as u64;
1637+
stats.total_successful += all_scan_results.iter().filter(|e| e.score > 0).count() as u64;
16381638
}
16391639

16401640
// Add best IPs to pool immediately.

crates/zerodpi/src/tui.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,6 +1590,12 @@ fn draw_ip_scan_progress(
15901590
.title(" Live results "),
15911591
);
15921592
frame.render_widget(table, chunks[2]);
1593+
1594+
let help_line = Line::from(vec![
1595+
Span::styled(" r ", Style::default().fg(Color::Yellow)), Span::raw("change range "),
1596+
Span::styled(" q/Esc ", Style::default().fg(Color::Red)), Span::raw("use results so far "),
1597+
]);
1598+
frame.render_widget(Paragraph::new(help_line).block(Block::default().borders(Borders::ALL)), chunks[3]);
15931599
})?;
15941600
Ok(())
15951601
}

deltaspoof-windows-x86_64.zip

2.3 MB
Binary file not shown.

release/README.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# DeltaSpoof
2+
3+
> **Cross-platform DPI bypass proxy** — forked from [nullroute1970/ZeroDPI](https://github.com/nullroute1970/ZeroDPI)
4+
5+
DeltaSpoof sits between your **upstream VPN app** (xray-core, sing-box, v2ray, etc.) and the internet, transparently evading **Deep Packet Inspection (DPI)** that would otherwise block or throttle your VPN traffic.
6+
7+
It works on **Windows**, **Linux**, and **rooted Android/Termux**.
8+
9+
---
10+
11+
## What Changed from ZeroDPI
12+
13+
This fork adds the **`find_ip` mode** — a new operating mode that helps you find the best IP from a CIDR range for a specific CDN domain.
14+
15+
### New Features
16+
17+
| Feature | Description |
18+
|---------|-------------|
19+
| **`find_ip` mode** | Full workflow: SNI scan → select domain → select IP range → test IPs → live proxy with dynamic pool |
20+
| **Live IP dashboard** | Real-time table showing ↑/Cycle, ↓/Cycle, Total, Conns, Cycles, Duration for each active IP |
21+
| **Dynamic IP pool** | IPs with 0 total bytes are automatically removed; new IPs are scanned and added in real-time |
22+
| **Per-cycle byte tracking** | Upload/download bytes are tracked per evaluation cycle and reset each cycle |
23+
| **IP selection picker** | Press `s` to stop and pick from all IPs ever used, sorted by total bytes |
24+
| **Domain change** | Press `d` to change the domain without restarting |
25+
| **IP range change** | Press `r` to change the IP range during scanning |
26+
| **Special domain priority** | `www.hcaptcha.com` always ranks first in SNI scan results (shown in magenta) |
27+
| **Scan stats in header** | Shows scanned count, successful count, and removed count |
28+
| **Auto-start** | Automatically starts when 2x MAX_IP candidates are found |
29+
| **IP scan results saved** | Results are saved to `find-ip-results.json` |
30+
| **Removed unused features** | Removed star markers and separator lines for special domains |
31+
32+
### Removed from ZeroDPI
33+
34+
- Star markers (``) and separator lines for special domain display
35+
- `proxy_scan` mode (not needed for this use case)
36+
- `ip_bypass_plus` mode (not needed for this use case)
37+
38+
### Configuration Changes
39+
40+
- Default port changed from `44444` to `40443`
41+
- New config fields:
42+
- `MAX_IP = 10` — Maximum concurrent IPs in the pool
43+
- `IP_TEST_TIMEOUT_SECS = 10` — Seconds per evaluation cycle
44+
- `FIND_IP_DROP_COUNT = 5` — Number of lowest-total IPs to remove when all have bytes
45+
- `FIND_IP_MIN_BYTES = 1024` — Minimum bytes to consider an IP alive
46+
47+
---
48+
49+
## How It Works
50+
51+
1. **SNI Scan** — Scans candidate hostnames from `sni_list.txt`, ranks by score (TCP latency, TLS, TTFB, speed)
52+
2. **Select Domain** — User picks a domain (or auto-selects the best)
53+
3. **Select IP Range** — User picks a CIDR range from `ip_list.txt`
54+
4. **IP Scan** — Tests all IPs in the range against the selected domain
55+
5. **Live Proxy** — Starts with top-scored IPs, distributes VPN traffic across them
56+
6. **Dynamic Pool** — Every `IP_TEST_TIMEOUT_SECS` seconds:
57+
- Removes IPs with 0 total bytes
58+
- When all have bytes, removes the lowest-total IPs
59+
- Scans and adds replacement IPs
60+
7. **Pick IP** — Press `s` to stop and select the best IP
61+
8. **Continue** — Press `p` to pick a different IP from the full history
62+
63+
---
64+
65+
## Quick Start
66+
67+
1. **Edit `config.toml`** — Set `MODE = "find_ip"` and configure `MAX_IP`
68+
2. **Fill `sni_list.txt`** with CDN hostnames
69+
3. **Fill `ip_list.txt`** with CIDR ranges (e.g., Cloudflare ranges)
70+
4. **Run:**
71+
```powershell
72+
# Windows (Admin)
73+
.\deltaspoof.exe --config .\config.toml
74+
75+
# Linux
76+
sudo ./deltaspoof --config ./config.toml
77+
```
78+
5. **Select domain****Select IP range****Watch live dashboard**
79+
6. **Press `s`** when you see good IPs → **Pick the best one**
80+
81+
---
82+
83+
## Dashboard Controls
84+
85+
| Key | Action |
86+
|-----|--------|
87+
| `s` | Stop scanning and pick best IP |
88+
| `d` | Change domain (back to SNI scan) |
89+
| `r` | Change IP range (back to CIDR selection) |
90+
| `p` | Pick a different IP (when in Fixed mode) |
91+
| `q` / `Esc` | Quit |
92+
93+
---
94+
95+
## Building from Source
96+
97+
Requires **Rust 1.75+**.
98+
99+
```bash
100+
# Build
101+
cargo build --release
102+
103+
# Or with Python helper
104+
python build.py --platform linux|windows|termux
105+
```
106+
107+
---
108+
109+
## Credits
110+
111+
- Original project: [nullroute1970/ZeroDPI](https://github.com/nullroute1970/ZeroDPI)
112+
- DPI bypass research: [patterniha/SNI-Spoofing](https://github.com/patterniha/SNI-Spoofing)
113+
114+
## License
115+
116+
MIT — see [LICENSE](LICENSE).

release/WinDivert.dll

46.5 KB
Binary file not shown.

release/WinDivert64.sys

91.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)