evilsocket / opensnitch

OpenSnitch is a GNU/Linux interactive application firewall inspired by Little Snitch.
GNU General Public License v3.0
10.79k stars 503 forks source link

Filter not active after logout or restart #786

Closed Danny3 closed 1 year ago

Danny3 commented 1 year ago

Hello!

Describe the bug Filter not active after logout or restart

Include the following information:

Steps to reproduce the behavior:

  1. Go to firewall's UI
  2. Click in the filter field sand filter for some program, let's say VLC or Qbittorrent
  3. Change the action for that program if you want to or do nothing, pretending that you just wanted to see the rule for that specific program, this is not important.
  4. Now close the UI window
  5. Open it again clicking the icon in the system tray and see how the input text in the filter field is still there and the view is filtered, which is quite nice.
  6. Close it again and log-out | restart the computer
  7. After yo log back in open the UI and see how the input text in the filter field you put last time is still there, but the list is not filtered so you have to delete it and enter it again to make it work.

Expected behavior (optional) I expected that as long as something is in the filter field, the Rules list to always use that filter and show only the entries that match that filter.

Basically I want the same behavior that that is when I close the firewall UI without logging-out or restarting the computer to be also after I log back in.

As one of the use cases that I had, it was with Qbittorrent:

Having to alternate between mobile hotspot with limited data traffic to Wifi with unlimited data traffic I had to be very carefull when I let Qbittorrent use the internet and when not. While some might think about that you can just close and open Qbittorrent depending on which connection you are using it's not always that simple as sometimes large or many torrents are in the process of being rechecked and you cannot close it if you don't want to start all over again from the beginning. So you have to just allow it or deny it from the firewall depending on the connection and OpenSnitch is great for that. Since this is the only program that I had to control with the firewall many times alternating between allow and deny I like that the filter is remembered, even after restarts, but I don't like that I have to retype the same thing to make it active and actually filter the list after restart.

And another use case I had where OpenSnitch was very helpful was to easily control the internet connection of virtual machines for which the filter was very nice again.

It would be great if you could make the filter work even after log-outs or restarts if something has been remembered in the filter input field, without having to retype the same thing to make it active.

Additional context BTW, a "Clear text" and a "History" button on the right side of the field, like KDE's Kate has when you Press CTRL+F in a text document to search for something would be very nice to be able to clear the filter text by mouse and to be able to quickly type something else or to put some filter from history of used filters.

Thank you!

gustavo-iniguez-goya commented 1 year ago

Fixed @Danny3 . Applying the filter text when launching the GUI was blocked on purpose, I don't remember why. Probably it interfered with others tasks, but as far as I can tell, applying it after setting up everything seems to work fine.

Danny3 commented 1 year ago

Glad to hear that now it works fine.

Thank you very much @gustavo-iniguez-goya!

This was annoying me for quite some time.