summaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAgeFilesLines
* Bump version to 0.6.2v0.6.2dilluti0n2026-07-154-38/+70
|
* Change splash message formatdilluti0n2026-07-151-1/+2
|
* Merge branch 'change-tarball-name'dilluti0n2026-07-154-16/+35
|\ | | | | | | | | This change release tarball name to dpibreak-x.y.z.-target and directory inside to dpibreak-x.y.z.
| * ci: update winget manifest explicitly for zip path changedilluti0n2026-07-151-1/+11
| |
| * install.sh: support for new tarball/exdir namingdilluti0n2026-07-151-5/+12
| |
| * ci: change tarball name to lowercase for wingetdilluti0n2026-07-151-1/+1
| |
| * build.ps1: change tarball/distnamedilluti0n2026-07-151-3/+4
| |
| * Makefile: change tarball/distnamedilluti0n2026-07-151-6/+7
|/ | | | | tarball: dpibreak-x.y.z-unknown-linux-musl.tar.gz distname: dpibreak-x.y.z
* windows: nit: fix build failure.. Let?dilluti0n2026-07-151-1/+1
|
* ci: fix version matchingdilluti0n2026-07-151-1/+2
|
* Makefile: fix libc: glibc x.y.z printed on musl version infodilluti0n2026-07-151-9/+10
| | | | This was very log lived bug. Finally fixed.
* Makefile: fix version detection due to pulled windivert cratedilluti0n2026-07-151-2/+2
| | | | | | Since commit 7f5456b ("windows: pull windivert-0.6.0 to local crate/ dir from crates.io"), the workspace layout changed and the version detection in Makefile no longer finds the right Cargo.toml.
* Merge branch 'fix/cannot-delete-windivert-sys'dilluti0n2026-07-1415-35/+1681
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Register a handler to clean up all WinDivert handles and stop the WinDivert service when the program terminates. To achieve this, the windivert crate was moved in-tree and patched: WinDivert::shutdown() was relaxed to take &self, and a memory bug in the uninstall path was fixed. The root cause is that stopping the service while any handle is still open leaves the SCM registration in a bad state, making subsequent WinDivertOpen() calls fail with 1058 (see upstream report below). Closes: https://github.com/dilluti0n/dpibreak/issues/21 Link: https://github.com/dilluti0n/dpibreak/issues/29 Link: https://github.com/dilluti0n/dpibreak/pull/30 Link: https://github.com/basil00/WinDivert/issues/406
| * windows: touch WinDivert service at start to prevent bad state issuedilluti0n2026-07-143-2/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * windows: defensively check if it is service mode at paexit()dilluti0n2026-07-141-1/+5
| | | | | | | | | | It is unlikely that there is a `paexit` call in the service path, but there is no harm in checking for it.
| * windows: do not use paexit when there is no errordilluti0n2026-07-141-5/+3
| | | | | | | | | | | | | | | | loop on CTRL_CLOSE_EVENT handler causes pause occurs when the user closes the console by clicking the 'X' button, which degrades user experience. This change terminates program immediately if no error occurs.
| * windows: use OnceLock for SEND_HANDLE to close only when openneddilluti0n2026-07-141-13/+13
| |
| * windows: fix some kind of racedilluti0n2026-07-141-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | Uninstalling before all handles were closed resulted in a os error 1058 when try to open windivert. (sc stop windivert fixed it) Assumed the uninstallation would fail if the handle was still active, but it seems the initial uninstallation actually succeeded, while the subsequent attempt to close the remaining handles failed. Closing send handle that hadn't been closed previously and then explicitly performed the uninstallation fixes the issue.
| * windows: close handles and uninstall WinDivert.sys before exitdilluti0n2026-07-141-4/+34
| | | | | | | | | | | | | | This allows the WinDivert.sys can be removed after the program terminates, without needing to run `sc stop windivert`. Bug: https://github.com/dilluti0n/dpibreak/issues/21
| * windows: insert handler for console route to shutdown recv handlesdilluti0n2026-07-141-3/+30
| |
| * windows: WinDivertShutdown() recv handles at service exitsdilluti0n2026-07-141-12/+31
| | | | | | | | | | This inturrupts blocking recv() calls resulting WinDivert service can be safely removed.
| * windivert: relax shutdown() receiver to &selfdilluti0n2026-07-141-1/+1
| | | | | | | | | | | | | | Unblocking WinDivertRecv() from another thread is in fact the whole purpose of WinDivertShutdown(), but &mut self made that impossible on a shared (Arc) handle. It only reads self.handle and doesn't invalidate it, so &self is sound.
| * windows: windivert: fix rust str passed as ptr to C ffidilluti0n2026-07-141-1/+1
| | | | | | | | | | This should be null terminated or OpenServiceA() have no chance to know where str is stopped.
| * windows: windivert: fix dangling pointer in WinDivert::uninstall()dilluti0n2026-07-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | MaybeUninit::uninit() is not bound to any variable, so the temporary is dropped at the end of the statement, leaving `status` as a dangling pointer into the freed stack slot. Passing it to ControlService() as an out-pointer then makes the kernel write through a dangling pointer, which is undefined behavior. Bind the MaybeUninit<SERVICE_STATUS> to a local so it outlives the pointer.
| * build.ps1: fix version detectiondilluti0n2026-07-141-1/+3
| | | | | | | | Version for crates/windivert was detected first
| * windows: windivert: nit: add to workspacedilluti0n2026-07-132-1/+2
| |
| * windows: pull windivert-0.6.0 to local crate/ dir from crates.iodilluti0n2026-07-1311-3/+1411
|/ | | | | | This is pulled from cargo cache: cp -r ~/.cargo/registry/src/index.crates.io-*/windivert-0.6.0 \ crates/windivert
* windows: use paexit instead std::process::exitdilluti0n2026-07-132-7/+9
| | | | See error message
* windows: fix nit build failuredilluti0n2026-07-132-3/+3
|
* linux: rxring: fix lifetime issue for Pkt::net()dilluti0n2026-07-101-2/+2
| | | | Result should be unusable after Pkt is dropped, not rx is dropped.
* linux: rxring: fix tp_snaplen treated as the L3 length instead L2dilluti0n2026-07-104-17/+81
| | | | | | | | | 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.
* linux: rxring: guard div0 as EINVALdilluti0n2026-07-091-0/+3
|
* linux: rxring: fix u32 overflow on ring_size initdilluti0n2026-07-091-1/+1
|
* linux: rxring: fix possable memory ordering issuedilluti0n2026-07-091-15/+25
|
* linux: nit: move const inside to functiondilluti0n2026-07-091-2/+2
|
* linux: rules: abort if any rule is failed to installdilluti0n2026-07-081-5/+10
|
* linux: move firewall rule handling to mod ruledilluti0n2026-07-086-218/+211
|
* linux: fix iptables not cleanup on startupdilluti0n2026-07-082-31/+65
| | | | | | | | | cleanup_rules() relies on the global flag IS_NFT_NOT_SUPPORTED, which is always False before install_rule is called. Fixed it to always attempt cleanup for ipt/ip6/nft at startup. At the same time, implement Drop so that firewall cleanup occurs when dies due to ?.
* Use paexit on shutdowndilluti0n2026-07-081-1/+1
| | | | This makes windows users able to see the error message.
* Move platform-dependant codes to mod platformdilluti0n2026-07-085-46/+43
|
* opt: nit refinedilluti0n2026-07-082-16/+14
|
* linux: use syscall! macro on open_signalfd()dilluti0n2026-07-071-9/+5
| | | | | | It would be better if libc_s did not provide signalfd. The open_signalfd() function itself has issues, such as sigprocmask being applied elsewhere before opening it.
* Merge branch 'linux-cleanup'dilluti0n2026-07-075-173/+246
|\ | | | | | | | | Drop nix and add libc_s wrappers (with nix::fcntl like setsockopt abstraction).
| * linux: do not panic when failed to set IPV6_HDRINCLdilluti0n2026-07-071-1/+4
| | | | | | | | | | This is likely new feature in kernel. (mayby 5.6 or something near there)
| * linux: rxring: make tp_* series configurabledilluti0n2026-07-072-19/+23
| |
| * linux: implement socket and mmap wrapper for rxringdilluti0n2026-07-072-32/+39
| | | | | | | | | | | | | | Here mmap/munmap wrapper remain unsafe since mmap returns a pointer causes a memory leak when munmap is not called while dropping, and munmap has strict rule (PAGE_SIZE aligned) for addr defined on munmap(2).
| * linux: libc_s: add syscall! macro to reduce redundant error handlingdilluti0n2026-07-061-29/+15
| |
| * linux: add PACKET_RX_RING to libc_s::setsockopt apstractiondilluti0n2026-07-062-30/+27
| | | | | | | | | | | | | | | | | | The existing implementation was unsafe because UB could occur if a user-space pointer referenced by the struct sock_fprog was incorrectly passed. Rust safe model allows pointer creation and makes dereferencing unsafe. In this case, dereferencing happenes in kernel-space, Rust cannot guarantee this. So it must be handled separately.
| * linux: add safe abstraction for setsockopt(SO_ATTACH_FILTER)dilluti0n2026-07-062-12/+32
| | | | | | | | | | | | Treating optval as just a &[u8] in setsockopt() is not appropriate for usage patterns where a struct is put into optval. Rust treats casting a struct to &[u8] as unsafe.
| * linux: move poll_s() to mod libc_sdilluti0n2026-07-062-13/+11
| |