summaryrefslogtreecommitdiffhomepage
path: root/src/platform/windows.rs
Commit message (Collapse)AuthorAgeFilesLines
* windows: avoid ERR_INVALID_NAME when uninstalling WinDivertdilluti0n2025-10-061-2/+9
| | | | | | | `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.
* platform: windows: close handle and uninstall driver sanelydilluti0n2025-10-061-9/+19
|
* platform: windows: only divert clienthello packet to userspacedilluti0n2025-10-031-1/+3
|
* Refactor handle_packet to reuse external buffer for packet handlingdilluti0n2025-09-111-2/+5
| | | | This removes unnecessary allocations per packet handling.
* log: add splash! macro and centralize no-splash handlingdilluti0n2025-09-071-2/+4
| | | | | | | | | | | | | * 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`.
* 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
|
* Tidy up LogLevel enum definitiondilluti0n2025-09-031-2/+2
| | | | | | * Remove: unused `Fatal` variant from `LogLevel`. * Update: comment on `Error` to indicate it represents unrecoverable errors.
* Refactor prefixed logs to using log.rs, leaving Errors untoucheddilluti0n2025-09-031-1/+2
|
* Add prefix [INFO] or [WARNNING] on log messagesdilluti0n2025-08-311-1/+1
|
* platform: windows: log WinDivert handle creationdilluti0n2025-08-311-5/+7
| | | | | | Define the TCP:443 outbound filter as a constant and reuse it in WinDivert::network. Add a log message when the handle is successfully constructed for better visibility during runtime.
* Decouple once_cell by replacing it with standard libDilluti0n2025-08-231-3/+2
|
* Simplify signal handling with global AtomicBoolDilluti0n2025-08-231-6/+4
| | | | | | | * Remove Arc<AtomicBool> indirection and introduce global RUNNING. * Rename plant_handler() to trap_exit() for clarity. * Update run() implementations on Linux and Windows to use RUNNING directly. * Drop unused imports in main.rs, linux.rs, and windows.rs.
* Wrap platform dependant main loops to platform::runhskim2025-08-221-0/+21
|
* refactor: add error propagation to send_to_rawdilluti0n2025-08-061-2/+4
| | | | | | | * Extracted: `handle_packet!` macro to deduplicate match logic in both Linux and Windows backend. * Changed: `send_to_raw()` to return Result and propagate errors with `anyhow!`.
* refactor: Unified all error types in the project to anyhow::Errordilluti0n2025-08-061-3/+3
| | | | | | | | Configured incompatible iptables errors to be propagated using map_err into the anyhow type * refactored: split_packet and handle_packet to return Result<> instead of Option<>
* minor: remove handle_msg rapperdilluti0n2025-08-061-4/+5
| | | | | | | modify to have a simmilar flow with windows build * change ordering * debug messages
* minor: move platform-specific codes to seperate filesdilluti0n2025-08-061-0/+38