Commit Graph

69 Commits

Author SHA1 Message Date
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
d635db77c2 Improve pause info display and error handling 2025-11-26 13:01:24 +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
ae72509293 UI(Tauri): Replace local rust-dark-light with published dark-light crate
https://github.com/safing/portmaster/issues/2051
2025-11-11 19:44:31 +02:00
Alexandr Stelnykovych
3abb2b3c69 feat(control): add notification for automatic resume from pause state 2025-11-11 17:18:58 +02:00
Alexandr Stelnykovych
3aaa5ab161 fix(control): adjust pause logic to ensure correct state updates and notification behavior
fix(traymenu): update tray menu label from "Secured" to "unknown"
fix(notifications): log error when notification is clicked without an associated action
2025-11-10 18:20:34 +02:00
Alexandr Stelnykovych
139610b99d feat(UI): enhance pause info display in system tray menu and reorganize menu item positions
https://github.com/safing/portmaster/issues/2050
2025-11-10 15:14:20 +02:00
Alexandr Stelnykovych
997f95698b UI(system tray menu): added pause/resume menu items + replaced subscription to obsolete "runtime:subsystems" by "runtime:system/status" 2025-11-07 16:58:42 +02:00
Alexandr Stelnykovych
f8679f6b8c fix[desktop:Tauri]: block navigation to blank page
https://github.com/safing/portmaster/issues/2023
2025-10-02 17:53:42 +03:00
Alexandr Stelnykovych
8dbd61215b feat: implement debounced window state saving for shutdown resilience
- Add create_debounced_window_state_saver() function in window.rs
- Extract WINDOW_STATE_FLAGS_TO_SAVE and WINDOW_STATE_SAVE_TIMEOUT constants
- Listen to tauri://move and tauri://resize events with 5-second debouncing
- Automatically save window state after positioning changes settle
- Prevent window position loss during system shutdowns/restarts

The debouncing mechanism avoids excessive disk I/O during active window
manipulation while ensuring recent position changes are preserved even
when the application doesn't close normally.

Fixes window position being lost when system restarts before user
manually closes the application.
https://github.com/safing/portmaster/issues/2011
2025-09-04 23:36:01 +03:00
Alexandr Stelnykovych
5b121338ef [desktop] UI: Ctrl+/Crtl- shortcuts to Zoom-in/Zoom-out
https://github.com/safing/portmaster/issues/1961
2025-08-25 13:12:43 +03:00
Alexandr Stelnykovych
95838b510c fix(UI; Linux): Workaround for unresponsive title-bar buttons on KDE with Wayland
https://github.com/safing/portmaster/issues/1909
2025-06-19 15:38:36 +03:00
Alexandr Stelnykovych
2e5076b3bc fix(UI): Automatically unminimize window when triggered by left mouse click 2025-06-06 13:55:06 +03:00
Alexandr Stelnykovych
ff18ec1292 Refactor window creation functions for improved environment variable handling 2025-06-05 15:08:14 +03:00
Alexandr Stelnykovych
11c4ae39d2 (Windows) Fix false-positive detection of Portmaster UI processes
Problem:
  System browsers launched from the Portmaster UI (e.g., when a user clicks a link) may be incorrectly detected as Portmaster UI child processes.

Solution:
  The Tauri UI app now sets the PORTMASTER_UI_WEBVIEW_PROCESS environment variable for all child WebView processes. Portmaster-core uses this variable to accurately determine if a process is truly related to the Portmaster UI.
2025-05-21 18:08:04 +03:00
Alexandr Stelnykovych
5bc1e779b2 fix: force UI to use IPv4 (127.0.0.1) for API endpoints
Previously, the API endpoint was defined using `localhost`, which could resolve to the IPv6 address `::1`.
This caused issues because the Portmaster core service is listening on `127.0.0.1:817` and only fast-tracking connections to that specific IPv4 address.
2025-05-16 10:56:30 +03:00
Alexandr Stelnykovych
d3e489f10a Merge branch 'v2.0' into feature/ui-security 2025-04-28 11:08:25 +03:00
Alexandr Stelnykovych
f81f5c7566 [desktop] Fix: --background command-line argument for UI 2025-04-25 17:12:03 +03:00
Alexandr Stelnykovych
5053ef1a23 [desktop] Use custom Tauri command for HTTP requests instead of http-client plugin
Replaced the http-client plugin, as it does not support keep-alive connections.
Each request opened a new TCP connection to the service, which was inefficient.

The new custom `send_tauri_http_request` command, exposed to the UI, uses an application-wide `reqwest::Client`, which supports idle (persistent) connections.
2025-04-24 14:00:15 +03:00
Alexandr Stelnykovych
09412e9222 [desktop] fix: Rust compilation warnings in Tauri project 2025-04-23 13:45:45 +03:00
Alexandr Stelnykovych
4ef04c72ca [desktop] Tauri HTTP interceptor 2025-04-12 23:34:07 +03:00
Vladimir Stoilov
e4756862ac [destkop] Fix tray context menu update 2025-03-31 16:20:50 +03:00
Alexandr Stelnykovych
27235ad7b7 Revert "[desktop] Fix tray menu spn status and button"
This reverts commit 8aab22a9ec.
2025-03-26 14:44:10 +02:00
Vladimir Stoilov
8aab22a9ec [desktop] Fix tray menu spn status and button 2025-03-25 14:47:13 +02:00
Vladimir Stoilov
c21a93a4d6 Add missing TODOs 2024-12-10 14:21:34 +02:00
Vladimir Stoilov
5ae261f062 [WIP] Fix tauri notifications 2024-12-03 17:28:40 +02:00
Vladimir Stoilov
85031e861b [desktop] Update tauri (#1760) 2024-11-28 10:41:14 +02:00
Vladimir Stoilov
96b1280b5c [WIP] Fix tauri compile issue 2024-10-11 11:40:28 +03:00
Vladimir Stoilov
3411e08500 [WIP] Fix cargo clippy lint build 2024-09-30 18:48:38 +03:00
Vladimir Stoilov
08830f29c6 [WIP] Fix ui api authentication 2024-09-25 17:34:23 +03:00
Vladimir Stoilov
83ec18f552 [WIP] Updater support for windows 2024-09-11 18:52:36 +03:00
Vladimir Stoilov
8c6eb04292 [desktop] Fix merge issues 2024-09-05 11:21:19 +03:00
Vladimir Stoilov
556e5dd921 [desktop] tauri remove some global variables. 2024-09-05 10:25:56 +03:00
Vladimir Stoilov
4c340f7b70 [desktop] Fix all clippy warning. Add clippy to CI. 2024-09-05 10:23:04 +03:00
Vladimir Stoilov
500256759e [desktop] Minor tauri fixes and improvments 2024-09-05 10:20:34 +03:00
Vladimir Stoilov
05a4093676 [desktop] improve theme detection and add manual theme selection. 2024-09-03 11:32:47 +03:00
Vladimir Stoilov
e162c81978 [desktop] Fix tauri unexpected exits 2024-09-03 11:31:15 +03:00
Vladimir Stoilov
2ea21b5fb8 [desktop] Move logging to user dir on windows. 2024-08-30 14:49:35 +03:00
Vladimir Stoilov
c9ee01d2c4 [desktop] update tauri 2.0.0-rc.3 2024-08-19 17:56:46 +03:00
Vladimir Stoilov
7a06b0bc1c [desktop] Tauri ignore extra cmdline args 2024-08-01 16:02:00 +03:00
Vladimir Stoilov
e92da53703 [desktop] Add tauri logs 2024-07-26 15:58:27 +03:00
Vladimir Stoilov
a12504178e [desktop] Switch to png for tray menu 2024-07-24 11:09:42 +03:00
Vladimir Stoilov
a6e1a37239 [desktop] Add support for system theme detection 2024-07-24 10:53:58 +03:00
Vladimir Stoilov
5b03076fac [desktop] tauri fix main windows size and theme 2024-07-23 17:26:53 +03:00
Vladimir Stoilov
674787df87 [desktop] tauri seve window size/position on exit 2024-07-23 17:25:59 +03:00
Vladimir Stoilov
c3d787e3ce [desktop] Update tauri 2024-07-23 17:24:29 +03:00
Vladimir Stoilov
273b16c523 [cmds] Handle edge cases when running tauri in beta 2024-07-11 09:33:21 +03:00