| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Now --fake-* options implicitly turn on --fake option.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Introduce `EvictPriority` enum.
- Optimize `is_stale` and `evict_priority` by passing entry references
to eliminate redundant memory loads.
pkt: hoptab: derive stale age from CAP
Replace the magic `64` threshold with `STALE_AGE = CAP >> 1` and make
the stale check inclusive (`age >= STALE_AGE`). This keeps the
eviction/staleness policy consistent when CAP changes and documents
the intended half-table age cutoff.
pkt: hoptab: add compile time assertion for CAP
pkt: hoptab: add comments
|
| |
|
|
|
| |
Use ST_OCCUPIED instead of ST_EMPTY to avoid skipping valid entries;
add debug logs
|
| | |
|
| |
|
|
|
|
|
|
|
| |
- add pkt::hoptab: small fixed-size hash table keyed by
IP (v4-mapped/v6) with TTL-based staleness + simple eviction
- store (src_ip -> inferred hop) on SYN/ACK from :443
- lookup (dst_ip -> hop) when crafting fake ClientHello, fallback to
--fake-ttl on miss
- add PktView helpers: ttl(), saddr(), daddr()
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Build WinDivert filter at runtime:
- Default: outbound TLS ClientHello packets
- --fake-autottl: also capture inbound SYN/ACK from tcp sport 443
Keep !impostor to avoid recapture.
|
| |
|
|
|
|
| |
- Add mangle/INPUT jump to DPIBREAK
- Queue tcp sport 443 SYN/ACK packets (NFQUEUE --queue-bypass)
- Cleanup removes INPUT jump as well
|
| |
|
|
| |
- simplify nftables rules by removing DPIBREAK chain
|
| | |
|
| |
|
|
|
|
|
| |
Split iptables and nftables rule management into dedicated modules.
Keep linux.rs focused on shared helpers and rule dispatch.
(cherry picked from commit 60c0011ca0cf5a463056fca17f2f747e762e19f9)
|
| | |
|
| |
|
|
| |
Introduce minimal iptables wrapper.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Initialize log_level from DEFAULT_LOG_LEVEL instead of duplicated
cfg(debug_assertions) branches in parse_args_1().
|
| | |
|
| | |
|
| |
|
|
|
| |
Move option parsing to opt.rs and packet handling to pkt.rs from
main.rs
|
| |
|
|
|
|
| |
- Extend split_packet_0 to optionally override TCP checksum.
- Compute L3 header length for IPv4/IPv6 and patch checksum field when requested.
- Wire fake_clienthello to set checksum to 0 when fake_badsum() is enabled.
|
| |
|
|
| |
For --fake-badsum work; Anyway, it is already calculated
|
| | |
|
| |
|
|
| |
Fake was enabled by default.....
|
| |
|
|
| |
Log runtime options on startup
|
| |
|
|
|
| |
- Add --fake flag to enable fake ClientHello injection
- Add --fake-ttl option to override TTL of fake packets
|
| |
|
|
| |
Introduce send_segment abstraction
|
| |
|
|
|
| |
- linux: fix infinite NFQUEUE loop by marking injected packets
- windows: by marking packet to impostor
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Introduce exec_process() to handle external command execution, stdin
piping, and error reporting. Now cleanup() and apply_nft_rules() call
exec_process() to call modprobe, nft respectively.
This improves error handling for cleanup xt_u32.
|
| |
|
|
|
| |
Do not log errors if cleanup fails during startup.
Retain error logging for cleanup failures on shutdown.
|
| |
|
|
|
| |
nftables-rs didn’t fit use case, so it was decoupled, and logging was
improved.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
`CloseAction::Uninstall` triggers ERROR_INVALID_NAME (0x8007007B) on Windows,
likely due to the crate passing a non–NUL-terminated "WinDivert" string to
`OpenServiceA`. For now, skip uninstallation and just close the handle
normally. Added a FIXME comment with details.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Add additional nftables match expressions to detect TLS records
(ContentType 0x16 = Handshake): and specifically ClientHello
(HandshakeType 0x01):. Packets matching this pattern are queued to
NFQUEUE. Mark xt_u32 as supported when nftables filtering is
successfully applied.
|
| |
|
|
|
|
|
|
|
|
| |
Introduce nftables rules under a dedicated "dpibreak" table and
chain. Traffic on TCP port 443 is queued using NFQUEUE. If nftables
is not supported, fall back to the existing iptables-based rules
for both IPv4 and IPv6.
Also update cleanup logic to remove nftables table if used, or
iptables rules otherwise.
|
| | |
|
| |
|
|
|
|
|
| |
* Extracted: repeated split/send/sleep logic from `handle_packet` into
new `split_packet_1` function for clarity and reuse.
* Simplifies: `handle_packet` by replacing manual steps with a single
call.
|
| |
|
|
| |
This removes unnecessary allocations per packet handling.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* Introduce: `splash!` macro in `log.rs` to print startup messages
conditionally, based on `--no-splash` flag.
* Move: `NO_SPLASH` management into `log.rs` with helper
functions: (`set_no_splash`, `no_splash`).
* Remove: old `splash()` function in `main.rs` and replace with
`splash!` macro usage.
* Set: default `LogLevel` according to build profile (Debug → Debug,
Release → Warning).
* Print: unified startup messages across Linux and Windows, including
`MESSAGE_AT_RUN`.
|