| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Query the service state with `sc query windivert` at startup, as this
is observed to resolve the bad state described in commit 168a88b8
("windows: fix some kind of race").
This is a defensive measure against the driver uninstall introduced by
that commit. Normally the uninstall is attempted only after all
handles opened by the current process are closed, but if another
process still holds an open WinDivert handle at that point, the driver
can remain stuck in a bad state on subsequent runs.
Link: https://github.com/basil00/WinDivert/issues/406
|
| |
|
|
|
|
| |
This is pulled from cargo cache:
cp -r ~/.cargo/registry/src/index.crates.io-*/windivert-0.6.0 \
crates/windivert
|
| |
|
|
|
|
|
|
|
| |
While solving it, introduced Pkt abstraction so that advance() is
automatically executed upon dropping it.
This change still allows access to mmapped pointers within the
Pkt.net() and enables the addition of other slice fields (such as mac)
later.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When I updated nix to 0.31, `nix::fcntl::flock` became deprecated and
unusable. At first I try to refactor `lock_pid_file()` to use the
`lock` method of the `nix::fcntl::Flock` struct, but a situation arose
where `set_len(0)` could not be called due to ownership issues. Linux
system calls are fundamentally simple, stable, and backward
compatible. Therefore, a compat layer is not necessary.
Anticipating that this might happen again, this commit introduce the
`libc_s`, which handles simple error processing for unsafe ffis in
libc syscall bindings.
|
| |
|
|
|
|
| |
This integrates well with the main poll loop and removes the global
AtomicBool RUNNING, which previously did nothing but detect interrupts
before entering the loop.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
windows: add cleanup for SEND_HANDLE
windows: fix every packet goes to send-only handle
|
| |
|
|
| |
100 lines of JSON soup -> 16 lines of actual nftables
|
| | |
|
| |
|
|
| |
24 KiB is precious :)
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Revert lock_handle()
send_to_raw cannot get a mutex since lock is not released per
iteration.
commit e08b57d281d8368dc02f06e3b6cd43edf88b2438
|
| |
|
|
|
| |
Closes: #2
Link: https://github.com/dilluti0n/dpibreak/issues/2
|
| |
|
|
| |
Closes: https://github.com/dilluti0n/dpibreak/issues/12
|
| | |
|
| | |
|
| |
|
|
| |
Introduce minimal iptables wrapper.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
nftables-rs didn’t fit use case, so it was decoupled, and logging was
improved.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
* Use: Cargo.toml inside on program
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
The main motivation for using poll + recv (even with a single FD) is
that blocking recv() is not interrupted by SIGINT, likely due to
SA_RESTART being enabled by default. On the other hand, poll() is
always interruptible by signals regardless of SA_RESTART.
Instead of manually configuring sigaction in Rust, using poll here is
simpler and more reliable.
|
| |
|
|
| |
* important: it works !!
|
| |
|
|
|
|
|
|
|
| |
* Introduced `etherparse` and `arrayvec` dependencies to parse and reconstruct IP/TCP packets
* Replaced legacy TCP payload extraction with robust parsing via `IpSlice` and `TcpSlice`
* Added `split_packet` to split TCP payloads and reconstruct headers
* Added stub `send_to_raw` function to transmit custom-crafted packets (implementation pending)
* Modified `handle_packet` to detect ClientHello and perform split+delay packet transmission
* Improved xt_u32 fallback logic and control flow using early returns and internal closure
|
| | |
|