Commit graph

1,165 commits

Author SHA1 Message Date
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
Gustavo Iñiguez Goia
9f26ba0a6f ui: use nanoseconds to store alerts time
Otherwise when selecting a row, it may select multiple rows if they have
the same time.
2025-09-22 01:29:03 +02:00
alice945
1e2f594911 Use application specific nft table
Implements #1260, fixes #1393
2025-09-06 12:47:21 +00:00
Gustavo Iñiguez Goia
1e3893997c
Merge pull request #1413 from LordGrimmauld/python-slugify
ui: switch to python-slugify
2025-08-19 20:41:22 +02:00
Gustavo Iñiguez Goia
1883cf13eb
ui: updated i18n update procedure
With PyQt5 we used plupdate5 + *.pro file to update the translations
file with new strings, extracted from the source code and UI forms.

In PyQt6, pylupdate6 doesn't support parsing .pro files, so we need to do it
manually.
2025-08-19 01:29:37 +02:00
Gustavo Iñiguez Goia
0f4f3b0f9e
Bumped versions to v1.7.3 2025-08-18 17:30:23 +02:00
Gustavo Iñiguez Goia
807ba02bb9 ui: fixed .ui designers files
Debian's QtDesigner 6.8.2 defines horizontal/vertical spacers as
Qt::Orientation::Horizontal, but the Qt definitions since 6.5 is
Qt::Horizontal: https://doc.qt.io/qt-6.5/qt.html#Orientation-enum

Due to this problem, the GUI fails to load on some Qt versions, like
6.6.x (Mint 22.1). It doesn't fail on Arch with PyQt6 6.9 though.

Discussion: #1222
2025-08-18 14:03:44 +02:00
Grimmauld
a0f5a6ea54
ui: switch to python-slugify
unicode-slugify is basically abandoned upstream. Its repository [1] has seen
the last actual code change in 2018. It uses the deprecated `nose` testing framework.

In nixpkgs, we patched it to use pytest, but made some mistakes in those patches,
resulting in no tests actually executing. I actually fixed the tests to run,
but most of the tests fail: unicode does not reliably get replaced with a slugified version.

There does exist an actual need for slugification. However, the used slugify
package should actually work and be reasonably maintained. The replacement proposed here is
`python-slugify` [2], which sees active development in its repository while the
used API (both import name and the basic function signature `slugify(str)`) is identical.

The version requirement of >=7.0.0 is from their official support matrix for py >= 3.7,
though i did my testing with python-slugify 8.0.4.

[1] https://github.com/mozilla/unicode-slugify
[2] https://pypi.org/project/python-slugify/
2025-08-18 12:02:16 +02:00
munix9
1957c6f270
Update generate_i18n.sh - find lrelease
This should simplify the search for the lrelease binary:
lrelease - Debian/Ubuntu (?)
lrelease6 - openSUSE
lrelease-qt6 - Fedora

In addition, you can specify the path to an lrelease binary with LRELEASE, e.g.:
export LRELEASE="/usr/local/bin/my-lrelease-v6"
2025-08-16 11:09:31 +02:00
Gustavo Iñiguez Goia
e5d1702bd3
ui: ported to PyQt6
The GUI has been ported to PyQt6.

New dependencies:
 - python3-pyqt6
 - python3-pyqt6.qtsvg (otherwise, the svg icons are not loaded)
   On Arch and other systems qt6-svg is neeeded.
 - pyqt6-dev-tools (for uic calls, .ui loading).
 - libqt6sql6

Known issues:
 - pylupdate6 not longer update .pro files.
   It doesn't affect existing translations.
 - There might be a delay closing the GUI. Reason still unknown.

Closes: #1009

Discussion: #1222
2025-08-15 21:27:04 +02:00
Gustavo Iñiguez Goia
4691fa5353
i18n: updated German translation 2025-08-13 21:01:52 +02:00
Gustavo Iñiguez Goia
b635778f67 i18n: updated ru and id translations 2025-08-07 21:51:56 +02:00
Gustavo Iñiguez Goia
4041fa3089 ui: show nodes widget only when there're multiple nodes 2025-08-06 23:35:22 +02:00
Gustavo Iñiguez Goia
3f63a0844e
bumped versions to v1.7.2 2025-08-06 20:51:27 +02:00
Gustavo Iñiguez Goia
e9319716e7
ui: avoid reconfiguring fw rules
When the daemon connects to the GUI, the firewall dialog is configured
based on the system firewall configuration (inbound/outbpund policies).

Due to an error, a fw-change notification was being triggered, causing
unnecessary firewall rules reloads.
2025-08-06 01:02:47 +02:00
Gustavo Iñiguez Goia
72fb80f206
i18n: updated translation definitions 2025-08-05 00:12:56 +02:00
Gustavo Iñiguez Goia
9bc7868586
ui: avoid crashing if notify2 pkg is not available 2025-08-01 19:10:03 +02:00
Gustavo Iñiguez Goia
2a60d17ede
ui, rules editor: hide/show regexp checks on demand 2025-07-31 01:06:08 +02:00
Gustavo Iñiguez Goia
f671aa4e68
ui, rules editor: allow to use commas
Allow to use commas to specify multiple data:

 - src/dst ip: 1.2.3.4, 5.6.7.8
 - dst host: www.a-b-c.org, www.abcd.org
 - proto: tcp, udp
 - net ifaces: eth0, eth1
 - src/dst port: 123, 456

The data will be translated to ^(..|..|..)$ when saving the rule, and
back to "..,..,.." when loading it.

Closes: #1392.
2025-07-31 00:52:15 +02:00
Gustavo Iñiguez Goia
ea13182bd3
ui: changed how cloned rules are named
Previously when cloning a rule, we added "clone-{num}-" to the rule.
Depending on the number of rules, the cloned rule might not appear next
to the original.

Now we append "-duplicated-{num}" to the end of the rule name, on the one
hand to make the new rule appear close to the cloned one, and on the other
hand, to be consistent with the menu item that triggers this action.

Closes: #1363.
2025-07-26 16:38:39 +02:00