Commit Graph

2803 Commits

Author SHA1 Message Date
Alexandr Stelnykovych 16b59bdf99 fix(windows_kext): WIP. Try to solve issue with localhost connections while split-tunneling 2026-02-06 15:02:55 +02:00
Alexandr Stelnykovych 587377413d feat(split-tunneling): enhance split tunneling logic with blocking reasons and add local interface IP retrieval 2026-02-05 15:37:16 +02:00
Alexandr Stelnykovych 4b74c4c98f feat(firewall): WIP. implement split tunneling support with configuration options and request handling 2026-02-04 18:08:55 +02:00
Alexandr Stelnykovych ded260f156 feat(windows_kext): implement split tunneling cache and simplify bind requests
1. Add cache for split-tunnel verdicts
   - Reduces redundant user-mode notifications for repeated bind operations
   - ALE_CONNECT layer now finalizes Accept verdicts for split-tunneled connections
     This prevents lower-weight WFP filters from overriding our permit decisions
     (e.g., ensures IVPN Firewall won't block connections we redirected)

2. Simplify bind redirect requests to use PID-only keys
   - local_address and local_port are typically unspecified (0.0.0.0:0) at bind stage
   - Changed BindRedirectKey to use only process_id for lookups
   - Removed unnecessary fields from bind request protocol
   - Portmaster now makes split-tunnel decisions based solely on PID
2026-01-30 13:16:14 +02:00
Alexandr Stelnykovych b7d349c6ac feat(windows_kext): implement bind-redirect cache and associated logic for split tunneling 2026-01-29 17:05:23 +02:00
Alexandr Stelnykovych f287cbb946 refactor(windows_kext): simplify Redirector initialization, remove unused handle, improve comments 2026-01-28 22:51:22 +02:00
Alexandr Stelnykovych 5a39226d85 refactor(windows_kext/test/playground): use kextinterface module 2026-01-28 11:22:47 +02:00
Alexandr Stelnykovych b6499122a7 (firewall): updated kextinterface according to last changes in driver communication protocol 2026-01-28 11:19:24 +02:00
Alexandr Stelnykovych a83f0ee1b2 (windows_kext): use BIND_REDIRECT instead of CONNECT_REDIRECT for local address modification
Although local address modification appears to work at the CONNECT_REDIRECT layer for TCP connections, it does not work for UDP.
According to Microsoft documentation, only the BIND_REDIRECT layers are allowed to modify the local address of a connection.
2026-01-27 18:08:03 +02:00
Alexandr Stelnykovych a4717a4f8a feat(firewall): initial split tunneling integration (new Windows KEXT driver support) 2026-01-23 17:48:47 +02:00
Alexandr Stelnykovych c9ccd3fbb9 feat(windows_kext): track own redirects and finalize verdicts
Implement tracking for connections redirected by Portmaster to prevent
interference from other WFP filters:

- Add redirected_by_us field to ConnectionV4/V6 structures
- Store connection key and process_id in PendedRedirect for pre-creation
- Pre-create connections with redirected_by_us=true before complete_redirect()
  to eliminate race conditions at ALE_AUTH_CONNECT layer
- Call clear_write_flag() in ale_callouts to finalize verdicts for our
  redirected connections, preventing lower-weight filters from overriding
  permit decisions

This ensures split-tunnel redirections work correctly even when other
applications (e.g., IVPN Firewall) have WFP filters that could block traffic.
2026-01-22 17:30:59 +02:00
Alexandr Stelnykovych 09f6776c4c chore(windows_kext/test/playground): minor refactoring 2026-01-22 17:13:50 +02:00
Alexandr Stelnykovych b82845515c refactor(windows_kext/test/playground): split files and unify V4/V6 types
Reorganize playground into smaller modules for better navigation.
Add AI-assistance notices to test READMEs.
2026-01-22 10:28:31 +02:00
Alexandr Stelnykovych aef93c166c feat(windows_kext): enhance callout registration logic for core function types 2026-01-22 10:24:08 +02:00
Alexandr Stelnykovych dbebbde82f feat(windows_kext): add runtime enable/disable for split tunneling
Add EnableSplitTunnel/DisableSplitTunnel commands that dynamically
register/unregister WFP filters without driver reload.

- Implement FilterEngine::register_filters() and unregister_filters()
- Protect Core filters from unregistration
2026-01-21 17:49:54 +02:00
Alexandr Stelnykovych ca378d171d fix(windows_kext): prevent BSOD by storing a deep copy of classify_out in PendRedirectResult 2026-01-21 10:38:45 +02:00
Alexandr Stelnykovych fe21cecd83 feat(windows_kext): Refactor ALE connect redirect handling and error management 2026-01-20 15:01:06 +02:00
Alexandr Stelnykovych 025cb1a830 feat(windows_kext): Cancel pended ALE redirect operations on failure 2026-01-20 13:43:40 +02:00
Alexandr Stelnykovych 12135297ef chore(windows_kext) "playground" console project: redirect commands 2026-01-19 17:43:13 +02:00
Alexandr Stelnykovych 2da3796640 feat(windows_kext): Split-tunnel connections (first workable version, WIP) 2026-01-19 17:41:23 +02:00
Alexandr Stelnykovych 0b1e169e70 feat(windows_kext): Split-tunnel connections to specific interface (WIP) 2026-01-16 19:03:00 +02:00
Alexandr Stelnykovych f032f66117 chore(windows_kext): Add driver build script and instructions for testing purposes 2026-01-16 18:57:34 +02:00
Alexandr Stelnykovych 67400f8a4d chore(windows_kext) Add "playground" console project for basic kernel driver testing 2026-01-16 18:53:50 +02:00
Alexandr Stelnykovych 9e8acb2d25 chore(windows_kext): reduce compiler warnings for cleaner build output 2026-01-12 17:01:27 +02:00
Alexandr Stelnykovych 2d7d0323b0 feat(VisualStudio Code): add launch configurations 2025-12-17 14:08:24 +02:00
Alexandr Stelnykovych b5cb006937 Bump version 2.1.7 v2.1.7 2025-12-09 23:35:06 +02:00
Alexandr Stelnykovych 3c8bd02808 Earthfile: exclude extra fields when creating assets.zip 2025-12-09 23:27:02 +02:00
Alexandr Stelnykovych d5d47223b4 fix(spn): Ensure intel data is initialized
Prevent intel remaining uninitialized, which caused SPN to fail to bootstrap on connect.
https://github.com/safing/portmaster/issues/2095
2025-12-09 14:28:48 +02:00
Alexandr Stelnykovych e1475a1a3e feat(build): add script to build Tauri application for Portmaster on Linux 2025-12-08 18:19:56 +02:00
Alexandr Stelnykovych 8c19468e32 refactor(UI): remove unused structs and simplify GTK theme handling 2025-12-08 17:58:58 +02:00
Alexandr Stelnykovych 9a2b4f6256 fix(UI): ensure GTK calls are executed on the main thread to prevent segfaults 2025-12-08 17:31:26 +02:00
Alexandr Stelnykovych 9af071ef17 fix(control): ensure wall-clock comparison for resume worker deadline 2025-12-01 13:32:46 +02:00
Alexandr Stelnykovych 1a47196d84 Merge pull request #2086 from safing/fix/pause-fixes
fixes in Pause logic
2025-11-28 13:40:59 +02:00
Alexandr Stelnykovych aa507572d0 fix(group): correct IsStopped logic to use local state variable 2025-11-28 13:34:07 +02:00
Alexandr Stelnykovych 569e0a70dd fix(control): wait for SPN to fully stop before completing pause operation 2025-11-28 13:26:14 +02:00
Alexandr Stelnykovych b12729cb3a Permanent verdict for accepted API outbound packets 2025-11-27 16:36:49 +02:00
Alexandr Stelnykovych b43905aac5 Refactor resume worker to handle unexpected wall-clock changes and improve SPN auto-resume logic 2025-11-27 16:27:59 +02:00
Alexandr Stelnykovych 1208783f34 Enhance fast-tracking for API connections to maintain seamless UI experience after pause 2025-11-26 17:39:42 +02:00
Alexandr Stelnykovych d635db77c2 Improve pause info display and error handling 2025-11-26 13:01:24 +02:00
Alexandr Stelnykovych 4913147dd5 (UI) minor update of update pause notification messages 2025-11-21 14:07:57 +02:00
Alexandr Stelnykovych 7341fb3068 Merge pull request #2078 from safing/fix/UI-websocket-shutdown-lifecycle
Fix/UI websocket shutdown lifecycle
2025-11-21 12:54:47 +02:00
Alexandr Stelnykovych 76214bd986 Add WebSocket ping/pong keep-alive mechanism
Implements RFC 6455 compliant ping/pong health checking to detect dead connections:
- Send ping frames every 10 seconds
- Monitor pong responses with 5-second timeout after each ping
2025-11-21 12:28:57 +02:00
Alexandr Stelnykovych 0b20a368f9 Fix WebSocket shutdown and prevent WSA errors
- Add graceful shutdown for WebSocket reconnection loop
- Implement shutdown signal to stop connection attempts on exit
- Track and cancel tray handler tasks to prevent duplicates
- Handle app exit event to trigger WebSocket cleanup

Fixes WSAStartup error 10093 and application hang on shutdown.
2025-11-21 02:08:06 +02:00
Alexandr Stelnykovych f5533b447c fix(traymenu): update SPN button logic and pause menu items based on SPN status 2025-11-20 14:13:51 +02:00
Alexandr Stelnykovych d957e0142f Merge pull request #2069 from safing/fix/2051-ui-crash-in-rust-dark-light
Fix: UI crash in rust dark light module
2025-11-12 16:11:54 +02:00
Alexandr Stelnykovych a14a55c950 Merge pull request #2067 from safing/feature/2050-pause
Feature: pause PM/SPN
2025-11-12 14:26:40 +02:00
Alexandr Stelnykovych 063fa7f115 fix(interception): ensure metrics are stopped on failed module start 2025-11-12 14:24:24 +02:00
Alexandr Stelnykovych 2a551d5f10 fix(test): add missing faker dependency for generated code
Added github.com/jaswdr/faker/v2 v2.9.0 to resolve test compilation failures
in generated factory test files
2025-11-12 13:19:17 +02:00
Alexandr Stelnykovych 40cd0dbe2f Merge pull request #2064 from D3SOX/patch-1
Update log file path in issue templates
2025-11-12 12:49:06 +02:00
Alexandr Stelnykovych 4a3a494ed2 Update report-compatibility.md
PMv2 logs path on Windows
2025-11-12 12:48:26 +02:00