Commit graph

984 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
b404c4c631 ui,i18n: updated nl, it and tr translations
Some checks failed
CI - build eBPF modules / build (6.0, 1.5.0) (push) Has been cancelled
CI - build eBPF modules / build (6.0, master) (push) Has been cancelled
Test resources validation / Install tools (push) Has been cancelled
Build status / Build (push) Has been cancelled
2025-12-13 11:58:40 +01:00
Gustavo Iñiguez Goia
1bf2129ddd
ui: fixed possible crash handling notifications 2025-12-12 21:21:35 +01:00
Gustavo Iñiguez Goia
ede079fb9f
ui: minor window adjustments 2025-12-11 23:36:04 +01:00
Gustavo Iñiguez Goia
ad0df38e8c ui: better system notifications
Try to use Desktop Environment notifications whenever possible, and
fallback to Qt's notifications system if it fails.

Related: #1464
2025-12-11 17:33:27 +01:00
Gustavo Iñiguez Goia
73f2d40242 ui,nodes: removed print call 2025-12-11 12:27:12 +01:00
Gustavo Iñiguez Goia
a0af75b0d1
ui,stats: better nodes monitoring
When clicking on a node, the GUI starts a background task to obtain the
system stats of the daemon (ram, swap, uptime, load avg, ...).

We were not handling the monitoring/unmonitoring actions properly.
2025-12-10 17:07:35 +01:00
Gustavo Iñiguez Goia
90dfba1380
ui,stats: nodes view improvements
- Use the address of the node as the unique index to select rows.
 - Restore order of the nodes properly when coming back from the details
   view.
2025-12-10 13:25:53 +01:00
Gustavo Iñiguez Goia
321c152f26
ui,nodes: improved adding nodes to the db
When a node connected to the gui for the first time, we were not
updating the db accordingly. We were doing it when populating the
stats or adding events.

Unfortunately, not all fields are available when a node subscribes to
the GUI, they're sent when the node posts new events. Because of this,
some fields may appear blank until the node send new events.

It'll be fixed in future releases.
2025-12-10 01:55:05 +01:00
Gustavo Iñiguez Goia
74a7cb80f7 ui,stats: fixed restoring nodes detail view
When showing/hiding the main window by clicking on the systray icon, if
the user was reviewing the connections of a node before hiding the
window, the node table was not restored again.

We changed a few weeks ago how the window is shown (showEvent() ->
show()), so this is an unexpected error from that change.
2025-12-10 00:24:44 +01:00
Gustavo Iñiguez Goia
f0a90a1d71
ui: fixed start/stopping interception by node 2025-12-09 22:14:06 +01:00
Gustavo Iñiguez Goia
3e87ceac0c
ui: fixed creating QFileDialog widgets 2025-12-09 18:08:57 +01:00
Gustavo Iñiguez Goia
7592aae0c5
ui: added server config items 2025-12-09 01:56:26 +01:00
Gustavo Iñiguez Goia
ada74a2d8f
ui,prefs: allow configuring server's max workers and clients
Related: c356c82ac7
2025-12-09 01:35:47 +01:00
Gustavo Iñiguez Goia
12da478135
ui: fixed .ui designers files
again.

See commit: 807ba02bb9
2025-12-08 23:26:16 +01:00
Gustavo Iñiguez Goia
c356c82ac7
ui: allow to configure max nodes and server workers
- allow to configure max number of nodes (incoming connections).
   If the server address is a unix socket, it'd make sense to limit it
   to 1.
 - allow to configure server workers.
   By default ThreadPoolExecutor max_workers value is calculated based
   on the number of CPUs: min(32, os.cpu_count() + 4).

   When the GUI (server) is configured to manage multiple nodes, if
   there're not enough server workers (for example because there's
   only 1 CPU, thus ~6 threads), it can end up freezing, blocking new
   requests (new nodes, new stats, new rule requests, etc).

   The server uses one worker per node to handle notifications, and
   it's not released until the node exits.
   Every second, the nodes send the statistics to the server, which also
   consumes one worker for at least one second.
   Additionally the server may receive new rule requests and alerts,
   which also consume one worker each temporarily.

   So if there're 6 nodes, the server may need ~3 workers per node.

Related: #1453
2025-12-08 19:35:34 +01:00
Gustavo Iñiguez Goia
49b929523b
ui: fixed rules name validator 2025-12-08 11:55:50 +01:00
Gustavo Iñiguez Goia
0bbbbb546a
ui: hide node column by default if nodes < 2 2025-12-07 15:06:56 +01:00
Gustavo Iñiguez Goia
e7c36e29ae ui,prefs: improved node management
Added better alerts when changing nodes or server address.
2025-12-07 13:36:34 +01:00
Gustavo Iñiguez Goia
e9f64682a0
ui: improved remote nodes status management
- Close notifications channel in more cases.
 - misc: use the word "proto" only for protocol, instead of protobuffer.

Related: #1453.
2025-12-07 01:08:07 +01:00
Gustavo Iñiguez Goia
8d31289c35
ui,netstat: disable monitoring when changing tab 2025-12-05 01:32:07 +01:00
Gustavo Iñiguez Goia
3a712db2a4 ui: improved netstat view
Removed horizontal autoscrolling, which made impossible to click on all
columns.
2025-12-05 00:54:08 +01:00
Gustavo Iñiguez Goia
4729e6df9b
ui,fw: fixed applying rules to nodes 2025-12-03 21:09:06 +01:00
Gustavo Iñiguez Goia
be037674f5
ui,fw: improved rule dialog
When loading a system firewall rule for editing (save operation), if the
user changes the node, add the rule instead of saving it.
2025-12-03 01:38:35 +01:00
Gustavo Iñiguez Goia
8ac02acbbb
ui: display nodes ip and hostname on more places
Added the hostname to the node comboboxes, to help identify them more
easily.
2025-12-02 01:10:33 +01:00
Gustavo Iñiguez Goia
a741326e50
ui,stats: minor improvements
- Display the column Node only if there's more than 1 node, or if the
   user selected it from the Preferences (rel: #1456).
 - Adjust the Rules panels default sizes.
 - Don't resize the first column of the rules left panel.
2025-12-01 16:53:29 +01:00
Gustavo Iñiguez Goia
f1a04dde25
ui: allow to change firewall rules by node
- Added option to add, save or delete system firewall rules by node.
 - Added new option to apply the action to all nodes.
2025-12-01 13:17:21 +01:00
Gustavo Iñiguez Goia
09bb7e5f0e
ui,fw: allow to configure nodes policies
Previously you could only change firewall policies of one node.
Now if there's more than one node you can select the node, or change the
policies of all nodes.
2025-12-01 01:26:10 +01:00
Gustavo Iñiguez Goia
12d523be76
ui,fw: rules fixes
- Select correctly fw rules by node, table, etc.
 - minor change to nodes.
2025-11-30 23:41:35 +01:00
Gustavo Iñiguez Goia
9b1ae176d6
ui,netstat: open the process dialog from the PID column
It was not working.
2025-11-29 01:01:14 +01:00
Gustavo Iñiguez Goia
6f72bd1221
ui,netstat: allow to select nodes by hostname
display the hostname of a node in the list of nodes of the Netstat tab,
to easily identify remote systems.
2025-11-29 00:47:56 +01:00
Gustavo Iñiguez Goia
427b37c77a ui: allow to select rows pressing shift
TODO: handle selections when the first row selected is out of the
viewport.

See: #1428
2025-11-28 13:14:32 +01:00
Gustavo Iñiguez Goia
1a7e4371ba
ui,stats: fixed selecting rows 2025-11-27 02:14:57 +01:00
Gustavo Iñiguez Goia
4f64e04d89
ui,stats: highlight filter line if there's a filter
Closes: #1419
2025-11-27 01:53:25 +01:00
Gustavo Iñiguez Goia
a0bb7b69a7
ui,stats: show the hostname of a node in the rules list 2025-11-26 21:20:01 +01:00
Gustavo Iñiguez Goia
4fed62625f
ui,popups: updated appimage regular expression
Appimages unpack their content under /tmp/._mount<random-chars>/*.
Usually the random part consist of 6 characters, but some appimages do
not follow this rule, like the Eden appimage.

See: #1377.
2025-11-26 01:09:56 +01:00
Gustavo Iñiguez Goia
339c66030a
ui,popups: allow to select snap paths automatically
In the same way that we automatically select AppImages paths, now we'll
also select snap paths.

Usually these paths start with /snap, followed by the name of the app, a
revision number and the path to the executable:

/snap/firefox/12345/usr/lib/firefox/firefox

Internally the rule will create this regular expression, to match the
the snap regardless of the revision:
^\/snap\/firefox\/[0-9]+\/usr\/lib\/firefox\/firefox$

Closes: #1439.
2025-11-26 00:33:21 +01:00
Gustavo Iñiguez Goia
dff12836c2
ui,popups: added missing function parameter 2025-11-26 00:15:13 +01:00
Gustavo Iñiguez Goia
58c379424d
ui: new plugin version checker
Added a basic plugin to check latest release version on github. Disabled
by default.

Since it's not possible to enable plugins from the GUI yet, you have to
copy the configuration to
$HOME/.config/opensnitch/actions/versionchecker.json:

{
  "name": "versionchecker",
  "created": "",
  "updated": "",
  "description": "",
  "type": ["global"],
  "actions": {
      "versionchecker": {
          "enabled": true,
          "config": {
              "check_on_start": false,
              "name": "check-latest-release",
              "interval": "12",
              "units": "hours",
              "url": "https://api.github.com/repos/evilsocket/opensnitch/releases"
          }
      }
  }
}

This configuration example is available under
opensnitch/plugins/versionchecker/.

Requested here: #1461.
2025-11-25 21:27:25 +01:00
Gustavo Iñiguez Goia
41d49c2109
ui: fixed applying rules to remote nodes
Closes: #1438
2025-11-25 01:19:32 +01:00
Gustavo Iñiguez Goia
76f4edcb48
ui: display the hostname of remote nodes in the popups
When a remote node sends a connection attempt request, display the
hostname alongside the node's IP, to better identify the node.
2025-11-24 23:41:31 +01:00
Gustavo Iñiguez Goia
7871c345fd
ui: fixed netstat tab rows selection 2025-11-24 01:29:39 +01:00
Gustavo Iñiguez Goia
c57114deed
Bumped versions to v1.8.0 2025-11-23 23:18:35 +01:00
Gustavo Iñiguez Goia
b68e0ca9d8
ui,i18n: updated es_ES translation 2025-11-23 23:01:28 +01:00
Gustavo Iñiguez Goia
0c7c6b81e3
ui: allow to open multiple rules editors
now you can open multiple rules editor dialogs from the rules list.
Right click on the rules list to edit the selected rule, then right
click on another rule to edit a new rule.

When editing a rule from the detailed view (after double clicking on a
rule), it'll only allow to open one dialog.

Closes #1455.
2025-11-23 21:12:08 +01:00
ryan.steed.usa
58ca1c03ba
fix: replace showEvent override with show method in stats dialog
This change modifies the StatsDialog class to use the show() method instead of overriding showEvent(). This resolves a recursion error.

Changes made:
- Replaced the showEvent() method override with a show() method
- Maintained the same functionality including:
  - Emitting the _shown_trigger signal
  - Setting window state to active and unminimized
  - Updating the window title with version information
- Removed the event parameter since show() doesn't receive event arguments
- Preserved all existing logic for address checking and window title formatting

Co-authored-by: Gustavo Iñiguez Goia <gooffy1@gmail.com>
2025-11-22 16:18:23 -07:00
ryan.steed.usa
6cd5af5b78
fix: restore maximized window state correctly when loading dialog geometry
This change fixes an issue where the statistics dialog would not properly restore its maximized state when reopening. The previous implementation attempted to manually set the window geometry to simulate a maximized state, but this approach was unreliable and didn't properly handle screen boundaries or multi-monitor setups.

The fix replaces the manual geometry setting with a proper call to showMaximized() when the dialog is visible, ensuring that Qt's window management correctly handles the maximized state restoration. This provides consistent behavior across different platforms and display configurations.

Changes made:
- Removed the manual geometry calculation that attempted to simulate maximized state
- Added proper isVisible() check before calling showMaximized() to ensure the window is properly initialized
- Simplified the maximized state restoration logic to use Qt's built-in functionality
2025-11-16 22:42:06 -07:00
Gustavo Iñiguez Goia
017889a9ce
i18n: translations update
- added zh_Hans.
- updated sv_SE.
2025-11-15 00:39:03 +01:00
Gustavo Iñiguez Goia
27eb063f69
i18n: added arabic language
For now we won't detect it automatically, because we're using
QtCore.QLocale.system().name() to detect the language. This function
usually returns the language and country (en_UK, ...), but this
translation is not tied to any specific country (ar).

It can be configured manually from the Preferences, UI tab.
2025-11-12 23:04:25 +01:00
Gustavo Iñiguez Goia
7a5484523a
i18n: added new languages
Hebrew and Albanian.
2025-11-11 01:26:53 +01:00
Gustavo Iñiguez Goia
d13e023895 i18n: updated translations
de, ro and uk.
2025-11-11 01:24:58 +01:00