Commit graph

455 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
dac78eb883 UI: improve db thread locking 2020-04-26 19:39:18 +02:00
Gustavo Iñiguez Goia
7ef2c1a755 UI: add nodes view
Display the list of nodes with its metadata.
Clicking on the IP of a node displays the stats for that node.

BUG: The original behaviour was to open a new window per node. However,
right now only one gets updated, and the others have no data.
So for now, this feature has been disabled.

Besides, if there's more than one node, only the stats of a node is
displayed on the UI, so you will see a weird blinking.
2020-04-24 02:05:31 +02:00
Gustavo Iñiguez Goia
66bc1b10e4 UI: remove unused imports and instances 2020-04-24 01:14:03 +02:00
Gustavo Iñiguez Goia
cf6d923670 UI: fixed displaying remote statistics 2020-04-20 18:19:49 +02:00
Gustavo Iñiguez Goia
2cd18f3bcb UI: add missing config fields if the don't exist
If we've added in a new release new config fields, old clients may not
have them, so we add them.

We need a better way of handling upgrades.
2020-04-20 18:04:21 +02:00
Gustavo Iñiguez Goia
c444d5f8a1 UI: fixed default duration on prompt dialog 2020-04-20 17:47:25 +02:00
Gustavo Iñiguez Goia
3b842a154e UI: allow to change daemon and UI options from the UI 2020-04-19 20:52:57 +02:00
Gustavo Iñiguez Goia
77dddcab3d UI: allow to resolve app icons from local and remote nodes
As opensnitch will run (only) on GNU/Linux, we may assume that the same
apps will exist on different machines (installed or not).

If a same app (firefox for example) is installed on different systems,
get the icon for the app.
2020-04-19 20:39:03 +02:00
Gustavo Iñiguez Goia
00bfd58510 UI: added filter by command line/args
In the future we'll filter by part of the command line.
2020-04-12 22:10:59 +02:00
Gustavo Iñiguez Goia
60005d7497 UI: added help menu
Added help menu to load the wiki.
2020-04-10 13:15:11 +02:00
Gustavo Iñiguez Goia
7c647f5782 fixed UI icons
- display correctly the connection status with the daemon whe it's
  disconnected.
- display correctly the icon (at least on gnome).
- changed "active" icon to svg, to fix a size problem displaying
  notifications on gnome.
2020-04-09 18:45:05 +02:00
Gustavo Iñiguez Goia
9d139a3f51 fixed not answered dialog alert icon
On gnome-shell,ubuntu 18.04 by using the Warning icon, it substituted
our icon by another one. So use NoIcon, since we're already setting our
own alert icon.
2020-04-09 17:07:58 +02:00
Gustavo Iñiguez Goia
6c64438256 UI: removed configparser dependency
It looks like it's part of python since 3.2, and as far as I can tell
without the pip dependency work just fine (tested on ubuntu >=14.x, mint
>= 18, debian >= 8.x).
2020-03-12 01:18:26 +01:00
Gustavo Iñiguez Goia
802c19fc0d Workaround to show up the systray icon on Cinnamon
On Linux Mint 19.3, Cinnamon 4.4, the systray icon was not showing up.
Adding a delay of ~3s solves this problem.
2020-02-26 00:55:01 +01:00
Gustavo Iñiguez Goia
4479bb5155 UI: exit cleanly if there's no QtSql driver available 2020-02-24 19:39:34 +01:00
Gustavo Iñiguez Goia
be89865cd1 fixed UI autostart on Cinnamon 2020-02-24 10:18:44 +01:00
Gustavo Iñiguez Goia
401329171a Workaround for crashes parsing .desktop files
We parse .desktop files to get the icon of a program, but sometimes we
can't parse the Name translation due to unicode encoding problems.

Besides, on some distributions there're .desktop files without Exec=
line, so we also crash.

With this workaround we miss (mainly) the icon of a program, but at
least we won't crash.

It should help with #5.
2020-02-22 00:53:10 +01:00
Gustavo Iñiguez Goia
c4a9a21afa fixed HighDpi scaling
This should fix the warning message:
"Attribute Qt::AA_EnableHighDpiScaling must be set before
QCoreApplication is created."

Which should fix the small fonts reported by some users.
We may also need AA_UseHighDpiPixmaps.
2020-02-22 00:48:19 +01:00
Gustavo Iñiguez Goia
7f2f40b64d UI, stats: display dst_port on process details view 2020-02-21 00:57:11 +01:00
Gustavo Iñiguez Goia
8d88a4c13a Fixed advanced button height on some systems
Like Ubuntu Mate 16.04
2020-02-20 00:23:32 +01:00
Gustavo Iñiguez Goia
6ae1857538 Fixed prompt dialog exception and improved backward compatibility
Improved compatibility with old regex lib versions.
Fixed exception.
2020-02-19 23:14:25 +01:00
Gustavo Iñiguez Goia
b409eca0ed Fixed UI crash when configuring high dpi scaling on some systems
On LinuxMint18 even with a compatible PyQt lib, it crashes, so just
don't set this option.
2020-02-19 01:04:58 +01:00
Gustavo Iñiguez Goia
7eb0b6da30 UI: added license, long description and distribute icons 2020-02-18 23:40:07 +01:00
Gustavo Iñiguez Goia
f696cf9141 Added option to allow/deny second level domains
Added option to allow or deny domains like 'examle.com', otherwise the
regex added a dot (.*\.example\.com) which didn't match the connection.
2020-02-17 01:31:37 +01:00
Gustavo Iñiguez Goia
7a7c1fb34b Fixed regex patterns shown in the UI combobox
Parse correctly DNS queries with the format 1.2.3.4 (x.host.com)
2020-02-15 00:33:43 +01:00
Gustavo Iñiguez Goia
1e6d2c0b67 Unified UI config files
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
2020-02-09 20:56:26 +01:00
Gustavo Iñiguez Goia
a5f8d5b25d Display an alert when a new connection is not answered
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.
2020-02-07 10:18:54 +01:00
Gustavo Iñiguez Goia
700b540432 Bump UI version to v1.0.0-rc2 2020-02-07 10:17:04 +01:00
Gustavo Iñiguez Goia
a6fa494789 Expand prompt dialog Dst IP Combo Box
It should span 2 columns
2020-02-07 00:16:14 +01:00
Gustavo Iñiguez Goia
8e6d901ae4 Added Action and Duration columns to GUI Rules tab 2020-02-07 00:15:31 +01:00
Gustavo Iñiguez Goia
36f8b27770 Allow to view details of a rule/process from General tab
Clicking on an item of the column Rule or Process open the details about
that item.
2019-11-27 00:33:22 +01:00
Gustavo Iñiguez Goia
77018a82a1 EnableHighDpiScaling only if qt version >= 5.6.0
It was addded in 5.6 version
https://doc-snapshots.qt.io/qtforpython/PySide2/QtCore/Qt.html
2019-11-25 21:41:25 +01:00
Gustavo Iñiguez Goia
39a3820ea7 Limit the number of connections on the main tab.
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.
2019-11-24 01:12:35 +01:00
Gustavo Iñiguez Goia
3e0b239d8f Display the app window when there's no system tray available
Like in some gnome-shell setups.
2019-11-23 23:56:15 +01:00
Gustavo Iñiguez Goia
911593e55a Prefer domains over IPs as default option to block/allow 2019-11-22 21:32:10 +01:00
Gustavo Iñiguez Goia
b2cc0eb164 Reset advanced rules check properly
In the future the state could be saved to the settings.
2019-11-21 22:12:28 +01:00
Gustavo Iñiguez Goia
891a3a4211 Fixed typo in tipPortsLabel 2019-11-20 18:51:49 +01:00
Gustavo Iñiguez Goia
cc27be2bae Added initial support for advanced rules (lists)
Probably not the best UI, just the one I came up with.
2019-11-20 10:27:28 +01:00
Gustavo Iñiguez Goia
925e2fe045 Removed unused import 2019-11-18 20:38:17 +01:00
Gustavo Iñiguez Goia
918433a1dd Improved performance and details view
- 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.
2019-11-17 00:57:08 +01:00
Gustavo Iñiguez Goia
d38505650c added database file 2019-11-13 01:31:07 +01:00
Gustavo Iñiguez Goia
166cf49f4c improved UI
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
2019-11-13 01:24:55 +01:00
Gustavo Iñiguez Goia
912f85f5d1 Added more timeout options (30s, 5m, 15m, 30m, 1h)
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.
2019-11-09 01:35:13 +01:00
Gustavo Iñiguez Goia
93592b6b00 Allow to see which domain a process is trying to resolve
Ideally this information should go in a different Connection field, but
for now lets use DstHost.
2019-11-08 01:38:26 +01:00
Gustavo Iñiguez Goia
21c716492a Display username on the allow/deny dialog 2019-11-05 00:40:07 +01:00
Gustavo Iñiguez Goia
58cd5e9fc9 Added icons to allow and deny actions 2019-11-02 12:06:58 +01:00
Gustavo Iñiguez Goia
7eec749498 allow to configure unknown conns interception
/etc/opensnitchd/default-config.json can now contain
"intercept_unknown": true|false
2019-11-01 01:00:10 +01:00
Gustavo Iñiguez Goia
0773f8c01e
Merge pull request #1 from Ph0rkoz/master
Master
2019-10-31 13:36:40 +01:00
Phorkoz
e04353a869
grpcio-tools==1.10.1 pulls in grpcio of the correct version, stops the error on make install
grpcio-tools==1.10.1 pulls in grpcio of the correct version, stops the error on make install
2019-10-30 20:12:09 -05:00
Phorkoz
e7b853f7a2
Make upgrading the UI possible on code changes.
UI
2019-10-30 20:11:26 -05:00