If for some reason a Regex type rule can not be parsed, opensnitchd
panics and exit. We drop regex.MustCompile() in favor of
regex.Compile(), and in case of failure we just drop the packet.
In either case, the daemon should not panic but it should not received
an invalid rule either, specially from the UI.
Closes#4
Processes with active connections are the most likely to be the latest
modified ones in /proc, thus sort cache pids by time speeds up pids cache
searching. From several ms to us.
When parsing /proc/<pid>/fd/ looking for sockets, latest
modified/created descriptors are the most likely to have
generated connections.
This way we decrease the parsing time, system load and speed up process name
retrieval.
Originally UI config file was saved to ~/.opensnitch/ui-config.json
Now those values are saved to ~/.config/opensnitch/settings.conf, along
with new ones.
Closes#3
Originally UI config file was saved to ~/.opensnitch/ui-config.json
Now those values are saved to ~/.config/opensnitch/settings.conf, along
with new ones.
Closes#3
When the computer is on but you are away, you may miss some prompt
dialogs to allow or deny a connection. This way we warn the user about
something that happened, in order to review the UI.
Further work should maybe count and display the number of a connection,
and perhaps display a max of 5 different events.
It should also desirable to display a small number over the app icon.
With ~500k logged connections the app becomes unresponsive.
This way it minimizes a bit the high usage impact, but
definitely there's a limitation on this side, how many
events are we going to log?
It needs to be tested, but the same should be applied for the rest of
the tabs, and provide a search field and < > operands to navigate
records.
- Added a label to let the user know that an item in a column can be
clicked to view details about that item (process, host, user, ...).
- Improved performance by only adding the new items, or items that has
changed, instead of all the stats.
- Search General statistics by any column.
General tab:
- Allow to filter by action(deny/allow) + column.
Details tabs:
- Double clicking on a column displays detailed stats for that item.
- Sort by column and order (asc/desc).
Added Rules tab
Added 30s, 5m, 15m, 30m and 1h timeout options to deny or allow
connections.
It helps to avoid repetitive new connection dialogs, while at the same
time it allows you to deny/allow a connection for a short period of time,
and apply the default for the rest.