- Added MaxConnectAttempts configuration option:
If not specified, it defaults to 0, which means that we'll try to connect
indefinitely to the remote server.
- Improved connection retry behaviour:
We were not reconnecting to the server if we failed to connect on the
first attempt. Now we'll try to connect until MaxConnectAttempts, or
indefinitely if not specified (default value 0).
- If the logger is not connected to the remote server, don't send
messages to the queue.
Closes#1350.
We were distributing locales twice, under opensnitch/i18n/ and
opensnitch/i18n/locales/.
This also caused to display an empty language in the Preferences
languages combo box.
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/
netlink.AddrSubscribeWithOptions() was causing systemd-resolved not to
obtain DNS servers, and therefore the system was unable to resolve
domain names.
This ssue started happening on Fedora 42, with systemd-resolved 257 and
kernels 6.14.x.
Using netlink.AddrSubscribe() solves this issue for now.
Closes#1343
Changed Error to Warning log level when failing to load hooks.
Except for udp_tunnel6_xmit_skb, which depends on the module
ip6_udp_tunnel to be loaded, which by default is not the case.
In order not to flood the logs with this error, log level changed to
Debug.
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.
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
In order to intercept UDP tunnels traffic, we use iptunnel_xmit for IPv4
connections. The equivalent of IPv6 would be ip6tunnel_xmit, but
unfortunately it's not public.
So instead of ip6tunnel_xmit, we'll use udp_tunnel6_xmit_skb.
This function receives two parameters besides the struct sock*, in6_addr
*saddr and in6_addr *daddr. If these addresses are not set, usually the
connection is a localhost connection.
On the other hand, this function is defined in the module
ip6_udp_tunnel. If this module is not loaded when the daemon starts,
we'll fail to intercept the connections.
Closes: #1250
- Changed the local host rule from using regexp to network operator
- Updated destination IP check from specific addresses to CIDR notation (127.0.0.0/8)
- Added new rule for IPv6 localhost connections (::1/128)
- Added nolog property to prevent logging of localhost traffic
This commit adds a new bash script that automates the synchronization of IP-to-ASN and AS names databases for OpenSnitch. The script:
1. Downloads pre-processed ASN data from a GitHub repository
2. Creates backups of existing files before updates
3. Updates ipasn_db.dat.gz and asnames.json files
4. Restores backups if downloads fail
5. Can be run via cron to keep the databases updated
The script is designed to be easily integrated into system automation tasks and includes error handling for common issues like missing dependencies (wget) or failed downloads.
- 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