Commit graph

845 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
70e868ad8c
ui: format node addr correctly
When scheduling a temporary rule to disable it, use the correct node
address.
2025-01-31 09:36:13 +01:00
Gustavo Iñiguez Goia
85173c3553
ui,popups: mark temporary rules as inactive
Once the temporary rules expire, mark them as inactive in the DB.
2025-01-31 00:28:11 +01:00
Gustavo Iñiguez Goia
6696d1c141
ui,fw: fixed adding dst/src port rules 2025-01-25 01:46:49 +01:00
Gustavo Iñiguez Goia
0dfec48120
ui, fw: fixed adding rules when using service name
We were failing adding system fw rules when the user selected a
destination port by service name.

We allow to specify port ranges with '-' (8080-8088), and as some
service names contain '-' in the name (ftp-data, netbios-ns), it was
failing.
2025-01-25 01:09:33 +01:00
Yaroslav Chvanov
9e2ef5f491
ui: make sure 'service' variable is set
Fixes error when running `opensnitch-ui` again:
>     if service:
>        ^^^^^^^
> NameError: name 'service' is not defined. Did you mean: 'UIService'?

Fixes: cdf93c72c1 ("ui: fixed delay closing the GUI")
2025-01-13 22:04:58 +03:00
Gustavo Iñiguez Goia
c0be3d15dc
ui: fixed closing the GUI with a popup active 2025-01-06 20:22:49 +01:00
e3dio
824b5c789a
fix #1245 2025-01-03 22:19:01 -07:00
Gustavo Iñiguez Goia
337b81a89b
ui: fixed acting on selected rows
When selecting rows with CTRL we were not copying/deleting rules
correctly.

Closes #1245
2025-01-04 00:44:34 +01:00
Gustavo Iñiguez Goia
6f41dc6c3e
ui: added proto/ directory 2025-01-03 15:02:48 +01:00
Gustavo Iñiguez Goia
5dd4ef06bb
ui: allow to use multiple protobuffer versions
Protobuffers compiled with protobuf < 3.20.0 are incompatible with
protobuf >= 4.0.0:
https://github.com/evilsocket/opensnitch/wiki/GUI-known-problems#gui-does-not-show-up

This has been a source of problems for some users (#1214, #647), and
in some distributions, previous protobuffer does no longer work due to
incompatibility with the protobuf package version installed
(OpenSuse Tumbleweed).

So in order to solve this issue, we provide several protobuffers,
for old and new protobuf versions:
proto/ui_pb2* for protobuf >= 4.0.0
proto/pre3200/ui_pb2* for protobuf >= 3.6.0 and < 3.20.0

To avoid import errors, each protobuffer must be placed in its own
directory, and the name of the protobuffer files must be named with
the syntax <prefix>_pb2.py/<prefix>_pb2_grpc.py:
  ui_pb2.py and ui_pb2_grpc.py

The default compiled protobuffer will be opensnitch/proto/ui_*.py
instead of opensnitch/ui_*.py
2025-01-03 14:48:35 +01:00
Gustavo Iñiguez Goia
24a5105d77
ui,stats: fixed Events search with different languages
When a language other than English was used, the search in the Events
did not work.
2024-12-30 22:21:59 +01:00
Gustavo Iñiguez Goia
d8c3684f2b
ui,stats: improved nodes search 2024-12-26 13:27:44 +01:00
Gustavo Iñiguez Goia
37bb9742a4
ui,stats: fixed displaying proc details dialog 2024-12-24 17:10:34 +01:00
Gustavo Iñiguez Goia
6e7aaf935b
ui: netstat/events view improvements
- Clicking on a column will display the details of that item (IP,
   process, etc).
   DstIP, DstPort and UserID columns will open the details of the
   selected item.
   Clicking on the PID column will open the process monitor dialog.
   The rest of the columns will open the details of the process.

 - On the Events tab, clicking on the PID column will open the process
   monitor dialog.
2024-12-21 23:31:25 +01:00
Gustavo Iñiguez Goia
5595a69927
ui: removed hardcoded labels color
It was set to blue, and when using dark themes it didn't look good.
2024-12-21 01:25:23 +01:00
Gustavo Iñiguez Goia
8f2ba67077
ui: fixed searching in tab Users 2024-12-20 15:44:52 +01:00
Gustavo Iñiguez Goia
fcaf3b8181
ui: display all fields in the detail views 2024-12-20 15:40:06 +01:00
Gustavo Iñiguez Goia
5629e2a405
ui,stats: simplified columns configuration
There're only two points where we need to reconfigure the columns:
on showEvent() and when saving the settings.
2024-12-18 21:40:28 +01:00
Gustavo Iñiguez Goia
843f537000
ui,stats: improved restoring columns 2024-12-18 16:18:54 +01:00
Gustavo Iñiguez Goia
eab75b8a48
ui,popups: strip non-printable characters from labels
Commands with non-printable characters were misaligning the labels.

Now these characters are exclude from the labels, and texts are
displayed as a single line.
2024-12-18 00:52:10 +01:00
Gustavo Iñiguez Goia
01e1341770
ui: allow to configure QT_QPA_PLATFORM from the GUI
Under Wayland the GUI doesn't work entirely well (#733).

Setting QT_QPA_PLATFORM to 'xcb' solves some issues, like correctly
positioning popups, but users had to configure it manually.

Now it's possible to configure it from the Preferences dialog.

Setting it to "" will use the default option of the Desktop Environment.
2024-12-17 20:07:27 +01:00
Gustavo Iñiguez Goia
ed84394dfc
Merge pull request #1237 from nolancarougepro/lan_access_control
Lan access control
2024-12-17 00:15:37 +01:00
Gustavo Iñiguez Goia
dd89509b1c
ui,stats: don't allow clicking on empty hosts
In the Events tab, don't allow double clicking on the DstHost column if
the cell is empty.
2024-12-16 23:50:36 +01:00
Gustavo Iñiguez Goia
dc2c6959e9
ui,stats: fixed Events tab search
Closes #1243
2024-12-16 12:42:13 +01:00
nolancarougepro
ee0a1586ff Alias to DstIp combobox 2024-12-16 11:09:39 +01:00
Nolan CAROUGE
31da993797
Merge branch 'evilsocket:master' into lan_access_control 2024-12-16 09:46:50 +01:00
Gustavo Iñiguez Goia
80ab972203
ui,prefs: better feedback when saving options 2024-12-15 23:09:53 +01:00
Gustavo Iñiguez Goia
4e8b222bd4
ui,events: display all columns in the Events tab
Display by default all columns in the Events tab, and allow to configure
what columns to display.

Closes #1223
2024-12-15 23:04:47 +01:00
Gustavo Iñiguez Goia
7944532922
ui,prefs: allow to configure server (GUI) address
Up until now it when changing the node address, you changed the server
adress as well (i.e: the address where the GUI is listening for
connections).

This simplified configuration when you had 1 node and addresses were
changed at the same time. But in other situations, you were not able to
change the server (GUI) address from the Preferences dialog.

So now:
 - the address of each node is changed from the Nodes tab.
 - the address of the server (GUI) is changed from the UI tab.
2024-12-15 01:36:26 +01:00
Gustavo Iñiguez Goia
4264134856
ui,stats: minor adjustment to splitter widgets
- set a better size for rules' left panel.
 - hide node additional info by default.
2024-12-14 23:32:37 +01:00
Gustavo Iñiguez Goia
aa0d5f14dd
ui,fw: fixed enable/disable global button
When there were no nodes connected, we disabled the global fw button
that enables/disables the fw.

Unfortunately when a node connected to the GUI, this button was not
clickable anymore.
2024-12-13 23:38:28 +01:00
Gustavo Iñiguez Goia
d825f1e9b0
ui,fw: fixed restoring policies when disabling fw
When disabling the fw, we change the default input and output policy to
Accept, not to block connections.

Due to a problem reloading the fw in the daemon, the policy was not
changed as expected.

This problem must be fixed in the daemon, but for the time being,
sending two configuration changes solves the issue (one for changing the
policy, and another one for disabling the fw).

Closes: #1225
2024-12-13 21:11:50 +01:00
nolancarougepro
fa96aa317d remove test_range in .json 2024-12-11 11:42:53 +01:00
nolancarougepro
30c4e70f1b modify ruleseditor to edit aliases 2024-12-11 08:59:31 +01:00
nolancarougepro
ca5c5cdb43 modify prompt to add aliases 2024-12-11 08:56:16 +01:00
nolancarougepro
0addd29c51 add_network_aliases 2024-12-11 08:55:04 +01:00
Gustavo Iñiguez Goia
dd7271429e
ui,prefs: allow to configure more internal options
Allow to configure:
 - Bypass queue.
 - Firewall rules monitoring interval.

Related: 6622df9d38
2024-11-26 21:37:04 +01:00
Gustavo Iñiguez Goia
db84b551cc
ui,popups: fixed exception getting node address when adding a new rule
When a popup was displayed to the user, if they took more than 120s to
respond, the address of the node was lost.

This is because the daemon has hardcoded a max timeout of 120s. If it
fires, the call to AskRule is closed and the context is lost.

In this situation, save the address of the node at the start of AskRule,
so we can reuse it later.

Closes: #1219
2024-11-25 23:24:29 +01:00
Gustavo Iñiguez Goia
cdf93c72c1 ui: fixed delay closing the GUI
When closing the GUI we were not stopping notifications channel in all
cases, causing some issues (delays, log in/out problems, ...).

Closes #1217
2024-11-24 00:53:02 +01:00
Gustavo Iñiguez Goia
9a51e88ebc
updated/added new translations
- Updated de_DE, fr_FR, hu_HU, lt_LT, nb_NO, ru_RU, tr_TR and zh_TW
   translations.
 - Added Czech, Hindi, Indonesian, Italian and Swedish translations.
2024-11-06 23:06:04 +01:00
Gustavo Iñiguez Goia
06ffffbbe1
Merge pull request #1209 from atriwidada/minor_fix
Make example explanation consistent with regex - take #2
2024-10-23 00:51:55 +02:00
Gustavo Iñiguez Goia
7fd436a00f
ui/fw: allow to configure outbound default policy
Related: #1183, #884, #1201
2024-10-20 00:29:05 +02:00
Andika Triwidada
c53026c7b6 Quota example typo fix 2024-10-18 04:29:57 +00:00
Andika Triwidada
6d6afc4baf Make example explanation consistent with regex - take #2 2024-10-17 00:42:58 +00:00
Gustavo Iñiguez Goia
f63a48deff
calculate the ram usage of a process in the daemon
- Calculate the ram usage of a process in the daemon, using the page
   size of the system.
 - Added new functions to read some details of a process, so we can use
   them in other parts of the code.
2024-10-15 00:49:58 +02:00
Gustavo Iñiguez Goia
83fad69316
tasks: added sockets monitor task (netstat)
Added new task to monitor local sockets of nodes, similar to ss or
netstat.

More info: #1112
2024-10-07 23:40:40 +02:00
Gustavo Iñiguez Goia
61d81f7055
Merge pull request #1195 from atriwidada/master
Add Indonesian translation
2024-09-28 16:34:30 +00:00
Gustavo Iñiguez Goia
58613543e2 added new task nodemonitor
Added new task to monitor the resources of remote nodes, like
ram, swap, number of processes or load average of the system.

The task is initiated when the user selects a node, and the data
received from the node is added to the right panel of the Nodes tab.

The task is stopped when changing to another tab, or when deselecting a
node.

Particularly useful for monitoring remote nodes.
2024-09-28 10:09:19 +02:00
Gustavo Iñiguez Goia
aea751793f
ui, procdialog: added missing import 2024-09-25 21:53:18 +02:00
Gustavo Iñiguez Goia
ee225cd815
ui,procdialog: allow to filter sockets and files
Two new options has been added to filter the process open files list by
sockets and regular files (by default it display pipes, etc).
2024-09-25 21:45:38 +02:00