Commit graph

2,069 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
0c2552b7f4
Merge pull request #1327 from petterreinholdtsen/installed-kernel-headers
Changed how ebpf build find kernel headers from running to installed version.
2025-04-23 11:31:25 +02:00
Gustavo Iñiguez Goia
030b849a8c
Merge pull request #1326 from petterreinholdtsen/ebpf-armv8l
Added ebpf build rule mapping for armv8l to work with more armhf machines.
2025-04-23 11:31:07 +02:00
Gustavo Iñiguez Goia
56b456a9b6
Merge pull request #1320 from lainedfles/gui_fix_reorder_system_rules
ui,stats: handle dict-wrapped notifs in callback
2025-04-22 23:42:12 +02:00
Petter Reinholdtsen
42119c5609 Changed how ebpf build find kernel headers from running to installed version.
This get the build working when building in a chroot or when the running
kernel is different from the kernel headers installed.
2025-04-20 09:48:17 +02:00
Petter Reinholdtsen
fd66bb6cc8 Added ebpf build rule mapping for armv8l to work with more armhf machines. 2025-04-20 09:44:55 +02:00
Petter Reinholdtsen
dc3d7c7eee Introduce new 12 hour duration option.
Fixes #1286
2025-04-19 00:25:24 +02:00
Gustavo Iñiguez Goia
2a8f13d439
process path parsing improvements
- Preprend the chroot of a process to the path:
   Even if a process is executed from a chroot (or a different mount
   namespace), the kernel reports the path as it were from the host.
   For chrooted processes, now we prepend the chroot to the path:
   Instead of /usr/bin/curl -> /var/cache/pbuilder/usr/bin/curl

   Note: if the process is emulated (with qemu for example), the
   checksum will be of the emulator.

 - For proceses launched from /proc, like /proc/self/exe or
   /proc/<pid>/fd/<number>, we were replacing in the cmdline "/proc/*"
   with the absolute path of the binary:

   Path: /usr/bin/curl
   Cmdline reported: /proc/<pid>/fd/<number> -L 1.1.1.1
   Cmdline "fixed": /usr/bin/curl -L 1.1.1.1

   Now we only do that for /proc/self/exe, and leave
   /proc/<pid>/fd/<number> as is, since Path is already the absolute
   path to the binary.

   Path: /usr/bin/spotify
   Cmdline reported: /proc/self/exe
   Cmdline "fixed": /usr/bin/spotify

   Path: /usr/bin/curl
   Cmdline reported: /proc/<pid>/fd/<number> -L 1.1.1.1
   Cmdline final: /proc/<pid>/fd/<number> -L 1.1.1.1
2025-04-18 13:30:51 +02:00
Gustavo Iñiguez Goia
fb16dada09 pkgs: add network-aliases.json
Needed to define net aliases in the rules.
2025-04-18 01:47:27 +02:00
Self Denial
f69d64d067
ui,stats: handle dict-wrapped notifs in callback
Modify the `_cb_notification_callback` method to properly process notifications that are wrapped in a dictionary to ensure consistent handling regardless of how they're sent from different
parts of the codebase.
2025-04-16 00:19:45 -06:00
Gustavo Iñiguez Goia
1b17fe246e
ui: better errors when saving the preferences
Don't overwrite errors if any, to avoid shadowing possible problems.
2025-04-15 12:12:56 +02:00
Gustavo Iñiguez Goia
8ec86c638c
ebpf: arm improvements
- better process interception on aarch64 and armhf.
 - on armhf getting proc arguments is ignored due to an error, but we
   were not marking the event as INCOMPLETE_ARGS, so we were not reading
   the compete cmdline.
2025-04-14 17:43:41 +02:00
Gustavo Iñiguez Goia
566f7b47cb
ebpf fixes for armhf
Change some initializations on inet_dgram_connect, to make the verifier
happy. __builtin_memset() in this particular case was causing errors.
(invalid read from stack off -16+4 size 8)
2025-04-12 00:43:38 +02:00
Gustavo Iñiguez Goia
03863a2346
ebpf fixed on 32bits archs
- fixed loading iptunnel_xmit on i686 and armhf.
 - disable inet_dgram_connect on armhf for now due to errors.
2025-04-11 23:16:56 +02:00
Gustavo Iñiguez Goia
f99700076c
ebpf dns: better error handling
- Avoid crashes if the module is malformed.
 - Better error handling.
2025-04-11 21:07:31 +02:00
Gustavo Iñiguez Goia
452233901d
avoid printing in debug possible invalid var 2025-04-10 21:26:26 +02:00
Gustavo Iñiguez Goia
a92a31de31
ebpf: use btf style maps
Instead of defining the structs with bpf_map_def, now we use BTF style
maps:

https://docs.ebpf.io/linux/concepts/maps/#btf-style-maps
2025-04-10 17:21:00 +02:00
Gustavo Iñiguez Goia
59fec2910e
Merge pull request #1313 from lainedfles/ipasn_db_update_script
feat: Add script to automatically update ipasn and asnames databases
2025-04-10 10:53:40 +02:00
Self Denial
efd87068f8
feat: Add script to automatically update ipasn and asnames databases 2025-04-09 17:56:17 -06:00
Gustavo Iñiguez Goia
feafe87604
migrated ebpf lib from gobpf to cilium
Up until now we've been using https://github.com/iovisor/gobpf/ for
intercepting events from the kernel, and it has worked very well.

Unfortunately it's deprecated since 2021 (iovisor/gobpf#304), which means
that some of the known issues and limitations won't be fixed.

After evaluating some options, I've migrated the code from gobpf to
github.com/cilium/ebpf.

More info: #1222, #1312
2025-04-09 00:15:38 +02:00
Gustavo Iñiguez Goia
297ffbbb42
Merge pull request #1306 from deenle/master
Update i18n ru_RU
2025-04-04 09:44:06 +02:00
Tim
fc7b4243ad
Update i18n ru_RU 2025-04-03 15:25:51 +02:00
Gustavo Iñiguez Goia
9d5d53d07f
ui,stats: improved rules selection
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.2
Use the Time column to select rows when in detail view, and the Name
column when listing app rules.
2025-04-01 11:57:33 +02:00
Gustavo Iñiguez Goia
320ec18b31
ui: improved rows selection (4)
discard current selection:
 - if the user right clicked on a row not part of a selection.
 - if the user clicked on a row, and there's only one row selected.
 - if the user clicked on a row already selected.
2025-03-31 14:51:12 +02:00
Gustavo Iñiguez Goia
fe715a5cf1
ui: fixed crash selecting rows on old PyQt versions
In PyQt < 5.15 isRowSelected() requires two arguments (row and parent).
Since 5.15, the parent argument is optional, and the default value is an
empty QModelIndex().

In order to support old PyQt versions (Ubuntu 20.x), we add always
the second argument.

- Misc: headers reorganization.
2025-03-30 19:21:20 +02:00
Gustavo Iñiguez Goia
e6bd14e816 ui,stats: fixed copying selected rows 2025-03-30 19:06:35 +02:00
Gustavo Iñiguez Goia
56eddafca8
loggers: handle errors properly
RemoteLogger: don't create the logger if we can't connect with the
server.
2025-03-29 17:21:19 +01:00
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