Commit graph

2,293 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
b2f2e44b8a
ui: improved diplaying default icons
In some DEs, like Enlightenment, some builtins icons may be empty.
The icon is not Null, but there're no available sizes, and the
pixmap is empty.

For now we'll use SP_FileIcon as the default icon, which exists
in this scenario, but we should create a new default icon, and
distribute it with the GUI.
2025-03-29 17:05:34 +01:00
Gustavo Iñiguez Goia
f2eb3fab13 ui: fixed selecting rows when in detail view
When the user double clicked on a rule to view the details, we were not
using the correct column to track selections.
2025-03-27 23:56:27 +01:00
Gustavo Iñiguez Goia
6f097091b0
Bumped packages versions to v1.7.0rc2 2025-03-26 22:52:26 +01:00
Gustavo Iñiguez Goia
b276d36786
ui: fixed deleting rules with DEL key
Adapted to the latest changes.
2025-03-26 00:13:16 +01:00
Gustavo Iñiguez Goia
a3d75476ac
Merge pull request #1298 from atriwidada/l10n-update
Update Indonesian translation
2025-03-21 13:11:26 +01:00
Gustavo Iñiguez Goia
5e91442dfc
ui: display highlighted text properly
when the cells of a table are customized.
2025-03-21 11:15:22 +01:00
Gustavo Iñiguez Goia
7db4c9a9aa
ui: added needed import to highlight rows 2025-03-21 10:13:38 +01:00
Gustavo Iñiguez Goia
12af2c3eb9
ui: fixed displaying highlighted color of cells
When the properties of a cell was customized, the background color of
the highlighted cell was not respected/restored.
2025-03-21 00:43:39 +01:00
Gustavo Iñiguez Goia
f1c8b16281
ui: restore deleted line 2025-03-21 00:04:39 +01:00
Gustavo Iñiguez Goia
0fbbbcca10
ui: improved rows selection (3)
- Pressing the Space key on a view paginates the view forward.
 - Apply rule actions both to visible selections (the ones the user
   sees), and non-visible selections (those out of the viewport).
 - Right clicking on a selection does not discard the selection.
 - Left clicking on a selection discards the selection and selects the
   clicked row.
 - Left clicking on a selected row selects/deselects the row.

ref: #1291
2025-03-20 23:50:11 +01:00
Andika Triwidada
fcd14bc0e9 Update Indonesian translation 2025-03-20 12:18:35 +00:00
Gustavo Iñiguez Goia
b113ed0960
ui: improved rows selection (2)
- Fixed the use of Ctrl + mouse dragging to select/deselect rows of
   an existing selection.
 - Misc: fixed var name, removed unused code, avoid adding non valid
   rows to the selection.

ref: #1291
2025-03-19 16:35:05 +01:00
Gustavo Iñiguez Goia
fe7300825a
ui: improved rows selection
Previously while scrolling, only one row remained selected, and using
the mouse to select rows didn't work.

Now:

 - All selected rows remain selected while scrolling.
 - The mouse can be used to select rows.

Previous functionality has not chaged:
 - Selecting a row toggles the selection.
 - ESC discard the selection.
 - CTRL + key up/down or click selects/deselects rows.
 - CTRL+c copies selected rows to the clipboard.

ref: #1291
2025-03-19 00:35:01 +01:00
Gustavo Iñiguez Goia
aab65908c7
fixed condition checking operator Data field 2025-03-18 02:09:53 +01:00
Gustavo Iñiguez Goia
5828ba861c
fixed crash compiling unknown operator rules
If a rule contained an unknown rule type or unknown operand, the daemon
crashed.

Closes: #1295
2025-03-18 01:38:31 +01:00
Gustavo Iñiguez Goia
7b66e598b6
loggers: simplify structed data conversions
- unify conversion for rfc3164 and rfc5424 formats.
2025-03-11 20:18:34 +01:00
Gustavo Iñiguez Goia
98b8b06018
remote loggers improvements
- Convert remote syslog to remote. There's no real difference between
   both, and the code was the same.
    Maybe we could limit the logging formats allowed.
 - Remote logger: Added option to reopen the connection after n errors
   trying to send messages.
2025-03-11 17:57:13 +01:00
Gustavo Iñiguez Goia
da4761f1d6
log checksums and proctree for syslog formats
- Log the checksums and process tree when using rfc3164 and rfc5424
   formats.
 - Minor performance improvements.
2025-03-11 17:06:40 +01:00
Gustavo Iñiguez Goia
ac45c4103f
nftables tests: skip TestAddInterceptionChains
tested on several distros with different kernels, as well as in a
private fork and this test doesn't fail.

So until we figure out why it's failing here, let's skip it for now.
2025-03-10 17:02:38 +01:00
Gustavo Iñiguez Goia
221923da73
improved loggers , remote logger
- Fixed issue when configuring several loggers.
 - Remote logger:
    - open as many connections with the remote server as
      specified in the Workers field.
    - open and handle every connection in each own goroutine.
    - get rid of the locks.
2025-03-10 16:42:19 +01:00
Gustavo Iñiguez Goia
f54534baca
Merge pull request #1289 from jermanuts/widget-weblate
fix Weblate widget
2025-03-05 21:20:43 +01:00
jermanuts
b6b2c1e222
fix Weblate widget 2025-03-05 21:23:37 +02:00
Gustavo Iñiguez Goia
c3183c2683
ui,popups: removed extra Allow option
Allow option was duplicated in a combobox.

Reported by @tredondo in #1269.
2025-03-04 22:46:46 +01:00
Gustavo Iñiguez Goia
f23c1635ca
minor logging improvements
- Moved Info message to Trace.
 - When applying a default action on a connection (because the daemon is
   not connected to the GUI), log the connection details. It eases the
   task of creating rules without a GUI.
2025-03-04 22:19:07 +01:00
Gustavo Iñiguez Goia
8d1a7de0cc
moved some Debug msgs to Trace 2025-03-03 21:35:31 +01:00
Gustavo Iñiguez Goia
dcb1157365
Merge pull request #1282 from NormPlum/github-templates
Update bug_report.md
2025-02-28 13:42:39 +01:00
NormPlum
1f96fb14dc
Update bug_report.md 2025-02-28 04:52:53 +00:00
Gustavo Iñiguez Goia
58cb9544e4
ui: popups layuout improvements
- Removed hardcoded sizes for buttons.
 - Buttons horizontal layout adjusted to properly show the countdown
   (#1274).

Note:
 'Maximum' vertical policy does not seem to work with qt-material
 and QToolButton, the button height is resized to 0. 'Preferred' seems
 to work as expected.
2025-02-26 21:25:48 +01:00
Gustavo Iñiguez Goia
7ea473f823 actions/upload-artifact bumped to v4
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
v1.7.0-rc.1
2025-02-25 16:23:50 +01:00
Gustavo Iñiguez Goia
d46f1562ff
ui:renamed daemon version label for better clarity
The GUI and daemon versions are displayed in 2 different locations:
 - ui: in the title of the main window.
 - daemon: in the lower right corner.

Now instead of showing the daemon version as "Version: x.y.z", we
show "Daemon version: x.y.z".

Closes: #1278
2025-02-25 13:11:50 +01:00
Gustavo Iñiguez Goia
acf7c653af
ui: replace hardcoded emoji by its code
to avoid rendering issues.
2025-02-24 23:24:13 +01:00
Gustavo Iñiguez Goia
d81374ebc7
ui,popups: fixed dest host regexp
We were not matching the end of the domain, which could lead to allow
more domains than expected.

kudos to @FWDekker for reporting this issue.

Closes: #1264
2025-02-21 00:28:22 +01:00
Gustavo Iñiguez Goia
8c1da76dff
ui: avoid restart messages when changing node options
When saving the preferences, we check if the user changed the address of
the node. Usually the current node address is the same than the one
loaded, but some gRPC versions does not report it, so we use
"unix:/local" as the address of the node.

As this address is different than the one configured, we were displaying
unnecessary restart messages to the users.
2025-02-19 00:04:39 +01:00
Gustavo Iñiguez Goia
5fdb60dccb
ui,prefs: fixed QueueBypass option. 2025-02-18 23:40:56 +01:00
Gustavo Iñiguez Goia
e25d741f76
ui: improved compatibility with python3.8
- Do not use placeholdertext with comboboxes.
 - Do not use removesuffix().
2025-02-18 15:44:51 +01:00
Gustavo Iñiguez Goia
65d6cccd63
ui: perform db updates in the main thread
we may end up with db corruptions otherwise.
2025-02-17 16:49:49 +01:00
Gustavo Iñiguez Goia
c6b42890c0
proc.readEnv() improvements
- Minimize the risk of race conditions when we're prompting the user to
   allow/deny a connection, while we're still reading proc's environ file.
   (this was actually a leak).
 - Preallocate the Env map with the expected environ vars.
2025-02-17 14:15:28 +01:00
Gustavo Iñiguez Goia
6ba7265364
tests: bumped minimum Go required version to v1.21 2025-02-14 23:28:31 +01:00
Gustavo Iñiguez Goia
ce006ee1ac
Bumped nftables lib to v0.2.0 2025-02-14 23:06:50 +01:00
Gustavo Iñiguez Goia
4c805331bb
Merge pull request #1266 from MEschenbacher/ui-stats-optimize-format
ui: dialogs: stats: optimize string format
2025-02-14 00:21:59 +01:00
Gustavo Iñiguez Goia
707a5b3c15
Merge pull request #1265 from jermanuts/donate-link
direct link to sponsoring page
2025-02-14 00:20:58 +01:00
Gustavo Iñiguez Goia
2509d21e30
daemon: allow to filter connections by parent path
Some use cases:

 - Reject connections initiated by certain paths:

   Deny all connections initiated by cron*:
        /usr/sbin/cron
            /usr/bin/curl

     "action": "reject",
     "operator: {
        "type": "list",
        "operand": "list",
        "data": "",
        "list": [
     	   {
                "type": "regexp",
                "operand": "process.parent.path",

                // /usr/bin/crond , /usr/bin/crontab, ...
                "data": "^/usr/(s|)bin/cron"
           }
        ]
     }

 - Reject or Allow connections of binaries launched by another app:

       "action": "allow",
       "operator": {
       	"type": "list",
       	"operand": "list",
       	"data": "",
       	"list": [
       	    {
                "type": "simple",
       	        "operand": "process.parent.path",
       	        "data": "/opt/spotify/bin/spotify"
       	    },
       	    {
       	        "type": "simple",
       	        "operand": "process.path",
       	        "data": "/usr/bin/wget"
       	    }
       	  ]
       }

You can also combine multiple parent paths, to allow a command launched
from a specific chain of processes:

    /usr/lib/systemd/systemd
        /usr/sbin/cron
             /bin/sh
                 /usr/bin/curl

The order is checked from the newest process to the oldest (curl -> sh
-> cron -> systemd)

The operand can be used with any of the existing types (simple, regexp,
etc).

Related: #406
2025-02-13 01:23:31 +01:00
Gustavo Iñiguez Goia
deba3e2252
Bumped packaging versions to v1.7.0rc1 2025-02-11 01:24:03 +01:00
Gustavo Iñiguez Goia
5eebaf40fc improved the process tree retrieval 2025-02-11 01:21:06 +01:00
Gustavo Iñiguez Goia
740465a447
ui: improved search in detail views
Allow to filter by more fields.
2025-02-10 00:58:40 +01:00
Gustavo Iñiguez Goia
4afa22c5b5
ui: fixed displaying icons
In some distros like Ubuntu 25, we were not displaying the fw button
icon, which made the button practically hidden to the user.

We assumed that if 'document-new' or 'emblem' icons were available,
the rest of the icons would be available as well, so we wouldn't need
to fallback to Qt's builtin icons.

However on Ubuntu 25 for example, despite of 'document-new' being
available, the icon 'security-high' was not being displayed when it was
loaded from the stats.ui file.

Loading it from code with QIcon.fromTheme() works fine, and even if
it's not found (which sometimes happens), we'd fallback to Qt's builtin
icons.

Other icons may be optional, but icons without text need to have an
icon always.

 - minor formatting change.
 - removed unused code.
2025-02-10 00:20:16 +01:00
Gustavo Iñiguez Goia
2a68561557
exclude disabled rules from the active rules
Disabled rules were part of the active rules. The fields were not
evaluated, but we still went through the entire list.

Not adding them to the list of active rules improves matching time,
especially when there're a lot of disabled rules.

It mainly affected when matching rules that were non-priority or
ordered alphabetically, with action Allow.
2025-02-08 15:12:11 +01:00
Gustavo Iñiguez Goia
07a4077a6a
schedule temp rules only if enabled
Avoid scheduling temporary rules if they're not enabled.
2025-02-08 00:37:04 +01:00
Maximilian Eschenbacher
4ea11a1ca7
ui: dialogs: stats: optimize string format
This commit does not change behaviour but reduces the multitude text
arguments of format() down to one.

Ref: c5e24c04f1 ("ui,netstat: allow to filter listed connections")
2025-02-07 19:23:31 +01:00
Gustavo Iñiguez Goia
4a37c88db6
ui: fixed typo 2025-02-07 00:02:23 +01:00