Commit graph

863 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
cf3205b209
ui, prefs: set pop-ups tab as the default tab 2023-06-15 01:26:13 +02:00
Gustavo Iñiguez Goia
682e6d667b
ui, prefs: reorganized Nodes options 2023-06-15 01:24:21 +02:00
Gustavo Iñiguez Goia
aa71b7d9f6
ui, prefs: fixed exception loading outdated config
Be sure that users with outdated default-config.json files can load and
save the configuration (those without LogUTC).
2023-06-15 01:07:20 +02:00
Gustavo Iñiguez Goia
77c3cf4512
fw rules: beautify rules escription
make it more nftables style:
 ip daddr 127.0.0.1 tcp dport 53 accept
instead of:
 ip daddr == 127.0.0.1 tcp dport == 53 accept

It'll be easier to translate our rules to nftables rules in this way.
2023-06-14 17:31:12 +02:00
Gustavo Iñiguez Goia
cc2b4f5824
ui,fw: don't allow empty rules 2023-06-14 01:27:40 +02:00
Gustavo Iñiguez Goia
d4bdfed1d1
ui,fw: fixed loading ct, quota, limit and meta statements 2023-06-14 01:16:06 +02:00
Gustavo Iñiguez Goia
e60b443c60
ui,fw: fixed setting dport/sport statement title 2023-06-13 15:10:28 +02:00
Gustavo Iñiguez Goia
1c90a51dbb
ui,fw: fixed adding dpotr/sport rule
When changing between dport and sport, the rule was not being added.
2023-06-13 14:02:19 +02:00
Gustavo Iñiguez Goia
5b7d2a2cbc
ui,fw: new rules creation fixes
- Fixed setting the protocol of a dport/sport statement.
- Fixed translating ports to service name, and back (/etc/service).
- Enable Save button when modifying the description of a rule.
2023-06-13 12:29:33 +02:00
Gustavo Iñiguez Goia
173e61b65a
ui: fixed displaying flatpak icons
Closes: #956
2023-06-12 00:14:40 +02:00
Gustavo Iñiguez Goia
2ad38fbf05
ui: set default rules editor button to Save
Closes #963
2023-06-09 13:16:55 +02:00
selfdenial
52c23ffd5d Introduce 2 new daemon logging options: LogUTC & LogMicro. 2023-06-05 20:46:42 -06:00
selfdenial
9a89ad98b9 Use if statements instead of match/case to set max_message_length. 2023-06-05 10:21:08 -06:00
selfdenial
f6623fad95 Add non-gui setting for gRPC server max_message_length. 2023-06-03 23:29:40 -06:00
Gustavo Iñiguez Goia
9c483b1a59
sys,fw: allow to create multiprotocol rules
Now you can add rules to allow multiple protocols.
For example you can add a rule to allow dport/sport for both TCP
and UDP.

There're two options to allow a port:

Statement {
 Name: tcp
 Values:
   Key: dport
   Value: 1234
}

Statement {
 Name: meta
 Values:
   Key: l4proto
   Value: tcp,udp

   Key: dport
   Value: 1234
}

Closes #951.
2023-05-27 22:02:14 +02:00
Gustavo Iñiguez Goia
3432c6a694
ui,fw: fixed allowing inbound services
The helper dialog to allow inbound connections to a port was adding a
rule to source port, instead of destination port.

The source port is needed to allow the traffic of a *local service"
when the inbound policy is set to Deny.
2023-05-25 17:39:17 +02:00
Gustavo Iñiguez Goia
500f5fe256
i18n: removed .qm from the repo 2023-05-23 18:01:00 +02:00
Toni Lähdekorpi
6afa7a3d0e
i18n: add Finnish translations (#948)
* i18n: initial support for Finnish

* i18n: add Finnish translations for rules

* i18n: add Finnish translations for rules

* i18n: translated using Weblate (Finnish)

Currently translated at 99.6% (516 of 518 strings)

Translation: Open Source/opensnitch

* i18n: finalize Finnish translations

* i18n: run Finnish translations through lrelease

---------

Co-authored-by: Toni Lähdekorpi <toni.lahdekorpi@neuvo.ai>
2023-05-23 17:58:18 +02:00
Gustavo Iñiguez Goia
0402bb1555
i18n: updated translations definitions 2023-05-19 18:31:26 +02:00
Gustavo Iñiguez Goia
3d99eae3ae
i18n: updated translations 2023-05-19 18:26:07 +02:00
Gustavo Iñiguez Goia
7c631376db
ui, fw: avoid unnecessary rules reloads
- When changing a policy, disable it until we receive a response.
  Maybe we should even delay it a little bit more.
- When editing a fw rule, disable the Save button if the user didn't
  change any field.
2023-05-19 01:24:56 +02:00
Gustavo Iñiguez Goia
13ef497538
Merge pull request #944 from davide125/shebang
ui: remove unnecessary shebang
2023-05-18 23:08:29 +02:00
Davide Cavalca
c6153ec661 ui: remove unnecessary shebang 2023-05-18 12:04:14 -07:00
Davide Cavalca
b3ecb69a5a ui: bump unicode_slugify to 0.1.5 2023-05-18 11:27:21 -07:00
Gustavo Iñiguez Goia
9d353102df
ui: display warning if the systray is not available
Some DEs and WMs don't support systray icons. In this situation we
display the GUI after 10s.

However many users were confused about this behaviour, thinking that
this delay displaying the GUI was a bug (#937).

Hopefully with a warning to the terminal and the desktop will help
them to know what's going on.
2023-05-13 20:47:24 +02:00
Gustavo Iñiguez Goia
2b9b9ab166
ui, ruleseditor: fixed crash on old distros
placeHolder is not supported for Combos on old PyQt versions, and we're
not using it anyway.
2023-05-13 17:50:56 +02:00
Gustavo Iñiguez Goia
fb7e84941f
ui, fw: firewll rule improvements
- Added tooltips with help messages for each rule option.
- Improved options title (ex:"limit over 1/MB/s" instead of
  "limit over units == 1/MB/s").
2023-05-13 01:31:54 +02:00
Gustavo Iñiguez Goia
de283f8430
ui,fw: disable interaction if there're no nodes 2023-05-09 22:29:01 +02:00
Gustavo Iñiguez Goia
f943c69c79
ui, config: added constant needed by ConnDetails 2023-05-08 21:31:13 +02:00
Gustavo Iñiguez Goia
1b8d1ae227
ui: added option to view details of a connection
Allow from the Events view, display the details of a connection.
The dialog allows to copy the details.

https://github.com/evilsocket/opensnitch/issues/929#issuecomment-1535530944
2023-05-08 16:51:08 +02:00
Gustavo Iñiguez Goia
8954145735
ui, sys fw: reformat how expressions are painted
instead of "== tcp dport 8888" display "tcp dport == 8888"
2023-05-04 15:23:10 +02:00
Gustavo Iñiguez Goia
1ff61a913c
ui: improved system fw rules management
- Allow to copy rules to clipboard with CTRL-c
- Added contextual menus:
  - edit to open the editor dialog.
  - Action, to change the rule verdict without opening the rule dialog.
2023-05-04 14:57:53 +02:00
Gustavo Iñiguez Goia
6121a5b987
ui, fw: allow to delete multiple rules
- Allow to delete multiple fw rules.
- Moved enable_rule() code to firewall/.
2023-05-03 17:51:37 +02:00
Gustavo Iñiguez Goia
dd7476fe52
ui: fw rules improvements
- Fixed error validating some meta expressions.
- Added option to enable/disable fw rules.
- Limit fw rules deletion to 1 rule for now, until a bug is fixed.
2023-05-03 01:29:13 +02:00
Gustavo Iñiguez Goia
d88a253d9c
ui: refresh rules list after delete a rule
Related: #921
2023-05-02 20:59:38 +02:00
Gustavo Iñiguez Goia
c6decf1bad
ui: refresh rules list when adding/editing a rule
Related: #921
2023-05-02 00:25:13 +02:00
Gustavo Iñiguez Goia
4570491523
allow to filter connections by source port
- Allow to filter connections by source port.
2023-05-01 14:48:34 +02:00
Gustavo Iñiguez Goia
57739cc974
rules: allow to filter connections by source ip/net
- Allow to filter connections by source IP/Network.
  (it also may be useful filter by source port)
- Removed AlwaysOnTop Hint from rules editor dialog.

Closes #922
2023-04-29 18:47:44 +02:00
Gustavo Iñiguez Goia
79754860de
ui, fw: validate int values when adding fw rules 2023-04-29 01:52:35 +02:00
Gustavo Iñiguez Goia
45576fe9f3
ui, fw: validate IPs when adding fw rules 2023-04-29 01:34:48 +02:00
Gustavo Iñiguez Goia
bd9d4eb4c6
ui, fw: added target parameters column
Display target parameters (reject >>with tcp reset<<) on the firewall
table.
2023-04-27 00:30:39 +02:00
Gustavo Iñiguez Goia
0f443bbea8
ui, stats: added contextual menu to fw table
Added option to delete rules by right cliking on a row.
2023-04-27 00:25:20 +02:00
Gustavo Iñiguez Goia
a1948e259a
Bump versions to 1.6.0 2023-04-22 12:32:53 +02:00
Gustavo Iñiguez Goia
e8ff8349f2
ui: improved notifications behaviour
Up until now, clicking on a system notification caused several
behaviours depending on the Desktop Environment:
 - On Gnome it executed opensnitch_ui.desktop, which as of today kills
   the running opensnitch-ui process, and relaunches it.
 - On other DEs the notifications was just dismissed.

To improve the first behaviour, the Hint "desktop-entry" has been removed.
Now clicking on a notification on Gnome will bring the main window to the
front if it's opened.

On the other hand a new button has been added to the notifications, to
open the main window if it's not opened, or bring it to the front
otherwise.
2023-04-22 01:35:58 +02:00
Gustavo Iñiguez Goia
74b6bc2c29
ui: improved DefaultAction behaviour
- On the very first install, or if the GUI's settings.conf file was not
  created, GUI's DefaultAction item was not configured properly.
- Now when the daemon is not connected to the GUI, it'll use the
  DefaultAction configured in /etc/opensnitchd/default-config.json
- When the daemon is connected to the GUI, the GUI will reconfigure
  daemon's DefaultAction value when the one defined by the GUI.
  In this case the value defined in default-config.json is not modified,
  it'll only be valid while it's connected to the GUI.

Now when opening Preferences->Nodes, it'll display daemon's
DefaultAction defined in the file default-config.json file, which is the
default action applied when the daemon is not connected to the GUI.

Related: #884 , #896
2023-04-16 00:49:51 +02:00
Gustavo Iñiguez Goia
fb27e4cbb1
ui,fw: allow to use CIDR notation to add IPs
When adding firewall rules with IPs ranges, allow to use CIDR notation
(1.2.3.4/56).
Previously only 2.2.2.3-2.2.2.100 was supported.
2023-04-15 00:41:22 +02:00
Gustavo Iñiguez Goia
05bb37e862
ui, fw: added more checks for rules creation
- Don't allow a 0 or empty statement value, except for Meta.
- snat, dnat and redirect parameters must contain ":" to specify a port
  or ip+port (192.168.1.1:8080, :8080).
- queue verdict parameter must be an integer.
2023-04-13 00:07:08 +02:00
Gustavo Iñiguez Goia
31f9f904f3
ui, fw: allow to configure verdicts parameters
- Allow to configure DNAT, SNAT, REDIRECT and QUEUE verdicts' parameters.
- Allow to add rules to FORWARD, PREROUTING and POSTROUTING chains.
2023-04-12 22:45:17 +02:00
Gustavo Iñiguez Goia
d374b4df02
ui, views: allow to copy cells' value
Allow to copy cells values when on a detailed view, by double clicking
on a cell.
2023-04-09 13:05:52 +02:00
Gustavo Iñiguez Goia
75cacf3530
ui, prefs: fixed loading nodes if no langs available
Don't fail loading nodes if there're no languages available.
2023-03-23 23:49:13 +01:00