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.
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.
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.
- 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
- 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.
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.
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.
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.
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.
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.
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>
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
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.