Up until now, clicking on a system notification caused several
behaviours depending on the Desktop Environment:
- On Gnome it executed opensnitch_ui.desktop, which as of today kills
the running opensnitch-ui process, and relaunches it.
- On other DEs the notifications was just dismissed.
To improve the first behaviour, the Hint "desktop-entry" has been removed.
Now clicking on a notification on Gnome will bring the main window to the
front if it's opened.
On the other hand a new button has been added to the notifications, to
open the main window if it's not opened, or bring it to the front
otherwise.
- On the very first install, or if the GUI's settings.conf file was not
created, GUI's DefaultAction item was not configured properly.
- Now when the daemon is not connected to the GUI, it'll use the
DefaultAction configured in /etc/opensnitchd/default-config.json
- When the daemon is connected to the GUI, the GUI will reconfigure
daemon's DefaultAction value when the one defined by the GUI.
In this case the value defined in default-config.json is not modified,
it'll only be valid while it's connected to the GUI.
Now when opening Preferences->Nodes, it'll display daemon's
DefaultAction defined in the file default-config.json file, which is the
default action applied when the daemon is not connected to the GUI.
Related: #884 , #896
- Don't allow a 0 or empty statement value, except for Meta.
- snat, dnat and redirect parameters must contain ":" to specify a port
or ip+port (192.168.1.1:8080, :8080).
- queue verdict parameter must be an integer.
On some distros (Fedora 37), on the very 1st launch of the GUI, it
crashed with the error:
"object of type QCommonStyle has been deleted"
The only way I've found of getting rid of this error is by obtaining this
object on every paint() call.
In 5b5e2714ae we added support for
in-memory cached DB, to allow delete old events from memory (#844).
Unfortunately, on some systems this URI (file::memory:?cache=shared)
creates a file on disk on user's home.
This file is in the end a DB, so if users want to delete old events,
they'll have to save events to disk.
On the other hand, when in-memory DB is selected, we now disable the
option to delete old events from memory.
Closes#857
Due to how QsqlDatabase works from different threads, a connection to
the DB can only be used from the thread that created it.
In order to access a database from different threads you create a new
QsqlDatabase connection to the DB specifying the DB name/file.
With DBs written to the disk, the database file/name is always the
same (say /tmp/file.db).
But with in-memory databases, whenever you create a new connection with
:memory:, it always create a new in-memory DB, so the DB is empty for
the Cleaner() task, and that's why it was not deleting old events.
Closes#844
Added option to create rules from events, filling up the fields of the
new rule with the properties of a connection.
By default the rules' fields are not enabled.
Closes: #843
Added more options for auto excluding/deleting temporary rules.
If the GUI was configured to store events to disk, you could end up
having thousands of temporary rules over time.
Closes: #622