summaryrefslogtreecommitdiffhomepage
path: root/src/pkt.rs
Commit message (Collapse)AuthorAgeFilesLines
* log: add debug!/info!/warn!/error! macros and refactor to use itdilluti0n2026-03-021-12/+4
|
* pkt: add hop infer log to put_hop_1dilluti0n2026-02-261-1/+10
|
* pkt: move fake_autottl check out of put_hop_1 to callerdilluti0n2026-02-261-3/+18
| | | | pkt: inline hop inference into put_hop_1, decoupling it from fake
* linux: add rxring skeleton and integrate into run loopdilluti0n2026-02-261-8/+15
| | | | | | | - Add rxring module with RxRing struct (new/next_packet unimplemented) - Attach cBPF filter for TCP src port 443 SYN/ACK packets - Multiplex nfqueue and rxring via poll in run loop - Move fake_autottl SYN/ACK handling to pkt::put_hop
* pkt: add debug log to send_split with dst, segments, payload lendilluti0n2026-02-261-6/+10
|
* pkt: nit: rename split_packet_0/split_packet/split_packet_1dilluti0n2026-02-261-7/+7
| | | | to build_packet/build_segment/send_split
* Refactor send_to_raw to remove in-place packet reparsingdilluti0n2026-02-261-2/+5
| | | | | | Pass destination address from PktView::daddr() at call site instead of re-extracting it from raw bytes inside send_to_raw. Windows side ignores the argument. Also add #[inline] to PktView accessor methods.
* pkt: remove pub on internal codesdilluti0n2026-01-231-8/+8
|
* pkt: implement hop cache for --fake-autottldilluti0n2026-01-231-9/+20
| | | | | | | | | - 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()
* pkt: move fake ClientHello logic into pkt::fake moduledilluti0n2026-01-231-85/+6
|
* pkt: add SYN/ACK(443) detection hook for fake-autottldilluti0n2026-01-231-0/+17
|
* windows: extend WinDivert filter for --fake-autottldilluti0n2026-01-231-0/+1
| | | | | | | 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.
* pkt: add debug_assertions to prevent cargo warningsdilluti0n2026-01-161-1/+3
|
* Refactor main.rs; modulize opt.rs and pkt.rsdilluti0n2026-01-161-15/+97
| | | | | Move option parsing to opt.rs and packet handling to pkt.rs from main.rs
* pkt: support overriding TCP checksum (badsum) in split_packet_0dilluti0n2026-01-161-10/+36
| | | | | | - 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.
* Add option --fake-badsumdilluti0n2026-01-141-0/+5
|
* Add fake ClientHello injection runtime optionsdilluti0n2025-12-301-3/+7
| | | | | - Add --fake flag to enable fake ClientHello injection - Add --fake-ttl option to override TTL of fake packets
* Consolidate fake ClientHello and split packet logicdilluti0n2025-12-301-24/+21
| | | | Introduce send_segment abstraction
* Prevent infinite loop on packet injection/filteringdilluti0n2025-12-301-1/+1
| | | | | - linux: fix infinite NFQUEUE loop by marking injected packets - windows: by marking packet to impostor
* Implement fake ClientHello injection with const TTLdilluti0n2025-12-301-2/+76
|
* Add dummy tls clienthello packetdilluti0n2025-12-301-0/+63
|
* Update copyright notices to notice email instead of github linkdilluti0n2025-09-051-1/+1
|
* Add license document and copyright notice headersdilluti0n2025-09-051-0/+17
|
* Remove unused field PktView.rawdilluti0n2025-08-211-2/+1
|
* Introduce PktView to remove duplicate packet parsinghskim2025-08-201-0/+18
- Added new `pkt.rs` with `PktView` struct wrapping `IpSlice` and `TcpSlice` - Updated `split_packet` and `handle_packet` to use `PktView` - Removed repeated calls to `IpSlice::from_slice` / `TcpSlice::from_slice` - Simplifies code and ensures parsing happens only once per packet