Commit graph

1808 commits

Author SHA1 Message Date
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
c526907d75
reload procmon method after fw rules
There was a situation where if the ebpf modules path did not exist,
the fw rules were not added, causing the daemon to crash after
connecting to the GUI.
2024-12-17 12:33:38 +01:00
Gustavo Iñiguez Goia
7d2ca8d039
updated network_aliases.json path
- Load network_aliases.json by default from /etc/opensnitchd.
 - Don't exit if network_aliases.json doesn't exist.
 - Updated Makefile to install network aliases definitions.
2024-12-17 00:38:30 +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
Gustavo Iñiguez Goia
b1e279fb6b
get process tree when using process conector
When the Process Connector is used to intercept exec events, get and
build the process tree of a process.

PROCESS CONNECTOR feature was added here: 7a9bb17829
2024-12-13 20:14:55 +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
f4e7d38af5 modify daemon to accept aliases 2024-12-11 08:58:50 +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
353e10a638
Merge pull request #1229 from ariel-anieli/unused-vars-warns
Clear out warnings about unused variables
2024-12-09 00:52:46 +01:00
Ariel Otilibili
af7076663a Clear out warnings about unused variables
Seen while compile eBPF using `make CC=clang`.

```
opensnitch.c:330:6: warning: unused variable 'zero_key' [-Wunused-variable]
  330 |         u32 zero_key = 0;
      |             ^~~~~~~~
opensnitch.c:372:6: warning: unused variable 'zero_key' [-Wunused-variable]
  372 |         u32 zero_key = 0;
```

Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
2024-12-03 20:57:45 +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
Gustavo Iñiguez Goia
4091962770
cache of events minor fixes
- fixed storing the old proc after rebuilding the pids tree, when an
   item is replaced in cache.
 - removed not needed rlock.
2024-10-19 23:59:44 +02:00
Gustavo Iñiguez Goia
5fa561607f
daemon/ui tests updated 2024-10-19 20:43:45 +02:00
Gustavo Iñiguez Goia
6622df9d38
allow to configure nfqueue bypass flag
Nfqueue bypass option skips the enqueue of packets to userspace
if no application is listening to the queue.
https://wiki.nftables.org/wiki-nftables/index.php/Queueing_to_userspace

If this flag is not specified, and for example the daemon dies
unexpectedly, all the outbound traffic will be blocked.

Up until now we've been using this flag by default not to block network
traffic if the daemon dies or is killed for some reason. But some users
want to use precisely this behaviour (#884, #1183, #1201).

Now you can configure it, to block connections if the daemon
unexpectedly dies.

The option is on by default in the configuration (QueueBypass: true).
If this item is not present in the daemon config file, then it'll be
false.
2024-10-19 10:51:40 +02:00
Andika Triwidada
c53026c7b6 Quota example typo fix 2024-10-18 04:29:57 +00:00
Gustavo Iñiguez Goia
ebac200642
ReadEnv() minor improvement
- Improved peformance parsing the environment variables of a process.
 - Added ReadEnv() test.

For a 4kb environ file:

Benchmark-Old    58070 ns/op   19264 B/op   68 allocs/op
Benchmark-New    49174 ns/op   17488 B/op   12 allocs/op
2024-10-18 01:08:43 +02: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
609edefbb7
added cache of events tests 2024-10-15 00:15:05 +02:00
Gustavo Iñiguez Goia
c3939c7dfd
added tasks tests
added tests for TaskManager, nodeMonitor and pidmonitor.
2024-10-11 00:01:00 +02:00
Gustavo Iñiguez Goia
e20e79d686
tasks improvements 2024-10-10 23:48:56 +02:00
Gustavo Iñiguez Goia
c1c7138e37
refactored tasks notifications
moved to their own file.
2024-10-10 00:24:29 +02:00
Gustavo Iñiguez Goia
3bf429b9ca
getProcPids() minor improvement
reduce allocs a little bit.
2024-10-09 23:54:40 +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
2fc1977d32
Merge pull request #1198 from C0rn3j/patch-1
Update README.md - Fix Discord link nesting
2024-09-28 16:39:36 +00: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
Martin
c7a4a2130b
Update README.md
Fix discord link being accidentally nested, it still worked before though.
2024-09-26 13:48:23 +02:00