Commit graph

2,297 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
5b67e2e53e stop notifications at the server's request 2025-12-07 13:14:50 +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
8270be1278
check TaskMgr validity 2025-12-05 23:12:51 +01:00
Gustavo Iñiguez Goia
fefbf385f1
lower ping() log level to DEBUG
When sending the events to the GUI (server), there's a hardcoded timeout
of one second. If the call takes longer, we were writing a warning to
the logs for each call, which in some cases could be excessive.

Hitting the timeout can be normal under some circumstances, such as when
connecting to a GUI with multiple nodes and a lot of activity.

More info: #1453
2025-12-05 22:45:42 +01:00
Gustavo Iñiguez Goia
7a0c96c17e initiate Ping() timeout after collecting the stats
We have a hardcoded timeout of one second to send the daemon stats to
the GUI. In some cases it's not unusual to hit the deadline.

So in order to just measure the network call, we now initiate the
timeout after collecting the daemon statistics.

See: #1453
2025-12-05 15:32:18 +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
528091f513 avoid crashing when executing fw tests
Found while debugging an issue with several Verdict errors on kernel
6.17.x. Something has changed.
2025-12-03 22:33:15 +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
55ac4b7fa4
tasks improvements
- fixed some race conditions.
- added more errors logging.
2025-11-28 00:02:52 +01:00
Gustavo Iñiguez Goia
7224acc7bd print the notifications type on error 2025-11-27 21:32:39 +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
4ca6c0e992
rpm: fixed .service path 2025-11-24 00:47:04 +01:00
Gustavo Iñiguez Goia
9891d106cc
init services moved to data/init/ 2025-11-24 00:07:07 +01:00
Gustavo Iñiguez Goia
fbc72bb96a
mount tracefs path if it's not mounted
Some kernels or systems may not have tracefs mounted or available
by default.

We need the path /sys/kernel/tracing to be mounted, in order to add
syscalls ebpf probes.

So from now on we'll try to mount /sys/kernel/tracing if it's not
already mounted.

-check-requirements parameter updated to check if this option is
available.

Closes #1450.
2025-11-23 23:40:37 +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
2c142620c4
daemon default configuration files moved to data/ 2025-11-23 23:11:31 +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
Gustavo Iñiguez Goia
0260693244
Merge pull request #1458 from ryan-steed-usa/minimize-maximize-geometry-fix
fix: restore maximized window state correctly when loading dialog geometry
2025-11-23 15:43:06 +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
Gustavo Iñiguez Goia
543241f7cd
improved tasks stopping
We don't need to close the channels on stopping a task. We use a Context
to exit from the task results loop.
2025-11-20 01:25:31 +01:00
Gustavo Iñiguez Goia
2c3120b936
tasks: send results to the loggers
elastic, grafana, syslog, etc.
2025-11-20 01:16:33 +01:00
Gustavo Iñiguez Goia
c719c34de3
tasks,iocscanner: scheduler improvements
note: if the pc is suspended, the timers do not take into account the
time spent suspended.
2025-11-19 21:36:20 +01: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
24f7e6ff1b
tasks,iocscanner: improved running cmds
Sometimes we never reset the running status of the command.
2025-11-14 01:12:57 +01:00
Gustavo Iñiguez Goia
906ad17b12
tasks, iocscanner: minor changes
added tools name as constants, and explain how to use them.

The name of a tool identifies an instance of that tool. Each tool has
its own configuration and logic.

In order to create multiple instances of a tool (for example to run
multiple commands or scripts), just append details to the tool name:

 "name": "script",
 "cmd": ["/usr/bin/clamscan"]

 "name": "script-unhide",
 "cmd": ["/usr/sbin/unhide"]
2025-11-14 00:52:39 +01:00
Gustavo Iñiguez Goia
ab6638f9a0
tasks, iocscanner: simplify messages to the GUI 2025-11-14 00:35:08 +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
450adf6485
tasks, iocscanner: updated README 2025-11-12 01:11:08 +01:00
Gustavo Iñiguez Goia
3d2d99648f
tasks: iocscanner minor improvements
- stop scheduler properly.
 - skip closing channels for now.
2025-11-12 00:52:12 +01:00