Commit graph

984 commits

Author SHA1 Message Date
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
Gustavo Iñiguez Goia
1856f9f245
ui: fixed destination port label
Closes: #1365.
2025-07-25 20:00:09 +02:00
Gustavo Iñiguez Goia
1634950752
ui: fixed restoring maximized state
Maximized state of the main window was not being restored.

Closes: #1374.
2025-07-25 16:51:14 +02:00
Gustavo Iñiguez Goia
4559dd8b0a
ui: added new theme dark_white
Closes: #1372
2025-07-23 21:57:39 +02:00
Gustavo Iñiguez Goia
d88abd0f93
ui: updated themes information 2025-07-23 21:53:54 +02:00
Gustavo Iñiguez Goia
b65acadb6b
ui: improved loading custom themes
Instead of displying the whole path to the theme on the Preferences
dialog, show just the name of the theme.
2025-07-23 01:41:30 +02:00
Gustavo Iñiguez Goia
b216d50ed4
ui: updated the list of contributors 2025-07-23 01:25:20 +02:00
Gustavo Iñiguez Goia
b56ea1551d
ui: don't crash if configured theme doesn't exist 2025-07-22 22:13:37 +02:00
Gustavo Iñiguez Goia
4d268c44e2
ui,themes: fixed loading icons, class moved to its own package
- In some distros, qt-material icons have stopped loading at startup:
   qt.svg: Cannot open file '.../icon:/primary/slider.svg'

   The cause of the error is still unknown, but this fix solves it
   for now.

 - Themes() class moved to its own file.

Closes: #1373.
2025-07-21 17:04:32 +02:00
Gustavo Iñiguez Goia
3f7449362a ui,popups: updated appimages regular expression
Match random characters from 6 to 7 characters.

More details: #1377.
2025-07-20 22:12:16 +02:00
Gustavo Iñiguez Goia
7c438de082
ui,fw: fixed editing rules
Editing a fw rule by right-clicking on a rule -> edit was silently
failing.
2025-07-03 21:50:58 +02:00
Gustavo Iñiguez Goia
039a5af862
ui,fw: fixed loading ports definition
The first item was not being loaded.
2025-07-03 21:47:11 +02:00
Gustavo Iñiguez Goia
9ad6e11b14
ui,popups: fixed crash when using some languages
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
Closes: #1353.
2025-06-27 10:13:46 +02:00
Gustavo Iñiguez Goia
acd5b8886b
Bumped versions to v1.7.1 2025-06-18 01:10:23 +02:00
Gustavo Iñiguez Goia
f87c3ae655
ui,popups: improved checksums verification
Verify the checksum of complex rules. Previously we only verified rules
of type Simple.
2025-06-12 00:28:58 +02:00
Gustavo Iñiguez Goia
f230b706b7
ui: improved downloader plugin
Create the paths where the files will be downloaded.
2025-06-08 23:59:51 +02:00
munix9
6bbed9dd67
check whether dist_path exists
"dist_path" seems to be a debian thing, in openSUSE for example the path does not exist.
2025-06-05 11:31:44 +02:00
Gustavo Iñiguez Goia
856c83f84b
Merge pull request #1355 from tioguda/master
i18n: updated Brazilian Portuguese translation
2025-06-04 02:13:03 +02:00
tioguda
222fce1e93
i18n: updated Brazilian Portuguese translation 2025-06-03 20:18:53 -03:00
Gustavo Iñiguez Goia
54a8efb32f
i18n: renamed ukranian translation file 2025-05-29 00:34:56 +02:00
Gustavo Iñiguez Goia
7a3ad173e1
i18n: added ukranian translation 2025-05-29 00:24:50 +02:00
Gustavo Iñiguez Goia
2fbbf12e0a
ui: translations updated 2025-05-28 22:35:00 +02:00
Gustavo Iñiguez Goia
9009eef635
ui: added HighContrast theme icons
The HighContrast theme is part of the gnome-themes-standard [0] package
, which is not always available.

Instead of just setting the theme by code, now we distribute the icons.
This ensures that the icons are always clearly visible when using a
qt-material dark theme.

For qt-material light themes and system themes, we'll use the system
icons.

[0] https://download.gnome.org/sources/gnome-themes-standard/
2025-05-23 22:30:19 +02:00
Gustavo Iñiguez Goia
3f5b6b45a7
ui: added default terminal icon for popups
By default we try to discover the icon of an app, but if we don't find
any, we'll use a default terminal icon (from HighContrast theme).
2025-05-21 19:10:43 +02:00
Gustavo Iñiguez Goia
913a88ccd6
ui: use HighContrast icons for dark qt-material themes
By default we use the system icons theme in the GUI.
The Desktop Environment usually is responsible of switching between
dark and light styles.

However if the user selected a qt-material dark theme from the
Preferences, the icons were not updated, and sometimes they were
practically invisible.

Now if the user selects a qt-material dark theme, we set the
HighContrast icon theme, which ensures that all icons are visible
against dark backgrounds.
2025-05-19 01:22:51 +02:00
Jost Alemann
f09ae22c61 ui: remove unused imports 2025-05-18 20:40:39 +02:00
Gustavo Iñiguez Goia
582823d34a
ui: added English language to the preferences
Allow to select English language from the Preferences.

This is a static entry like "System default".

It will not load a QTranslator object, so the GUI will use the strings
defined in the code, which are in English.

Closes: #1342
2025-05-14 23:24:38 +02:00
Gustavo Iñiguez Goia
8248c2e0ed ui: better app icon discovery
On some DEs like Xfce4 (Ubuntu 24) we were not displaying icons on the
popups.
2025-04-25 17:30:14 +02:00
Gustavo Iñiguez Goia
7ca5c0905f
added network_aliases init file 2025-04-24 16:49:23 +02:00
Gustavo Iñiguez Goia
c8bec89d70
reorganized network aliases feature
- Moved to their own files/dirs.
 - Added Nolan Carouge as author and contributor.
2025-04-24 16:06:11 +02:00
Gustavo Iñiguez Goia
3ef922ef84
ui,fw: improved fw rule dialog buttons layout
Closes: #1330
2025-04-23 14:11:31 +02:00
Gustavo Iñiguez Goia
c8d96d030e
Merge pull request #1324 from petterreinholdtsen/duration-12-hours
Introduce new 12 hour duration option.
2025-04-23 13:13:50 +02:00