From 14747a04ad4480c4d62e7f4a7c60e5fe02469921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20I=C3=B1iguez=20Goia?= Date: Tue, 17 Sep 2024 00:24:48 +0200 Subject: [PATCH] ui,plugins: added configuration examples --- .../downloader/example/downloaders.json | 71 +++++++++++++++++ .../example/commonActionsDelegate.json | 77 +++++++++++++++++++ .../example/rulesActionsDelegate.json | 54 +++++++++++++ .../virustotal/example/virustotal.json | 20 +++++ 4 files changed, 222 insertions(+) create mode 100644 ui/opensnitch/plugins/downloader/example/downloaders.json create mode 100644 ui/opensnitch/plugins/highlight/example/commonActionsDelegate.json create mode 100644 ui/opensnitch/plugins/highlight/example/rulesActionsDelegate.json create mode 100644 ui/opensnitch/plugins/virustotal/example/virustotal.json diff --git a/ui/opensnitch/plugins/downloader/example/downloaders.json b/ui/opensnitch/plugins/downloader/example/downloaders.json new file mode 100644 index 0000000000..cc933661f7 --- /dev/null +++ b/ui/opensnitch/plugins/downloader/example/downloaders.json @@ -0,0 +1,71 @@ +{ + "name": "downloadersActions", + "created": "", + "updated": "", + "description": "download ads/malware lists, save them to a local directory, and create a rule to filter by lists in that directory", + "type": ["global"], + "actions": { + "downloader": { + "enabled": true, + "config": [ + { + "name": "update ads lists", + "interval": "6", + "units": "hours", + "urls": [ + { + "name": "adaway", + "enabled": true, + "remote": "https://adaway.org/hosts.txt", + "localfile": "/tmp/blocklist/ads-adaway-hosts.txt" + }, + { + "name": "developerdan", + "enabled": true, + "remote": "https://www.github.developerdan.com/hosts/lists/tracking-aggressive-extended.txt", + "localfile": "/tmp/blocklist/ads-tracking-aggressive-extended.txt" + }, + { + "name": "1hosts", + "enabled": true, + "remote": "https://raw.githubusercontent.com/badmojr/1Hosts/master/Pro/hosts.txt", + "localfile": "/tmp/blocklist/ads-1hosts.txt" + }, + { + "name": "frogeye multipary", + "enabled": true, + "remote": "https://hostfiles.frogeye.fr/multiparty-trackers-hosts.txt", + "localfile": "/tmp/blocklist/frog-multiparty.txt" + }, + { + "name": "frogeye firstpary", + "enabled": true, + "remote": "https://hostfiles.frogeye.fr/firstparty-trackers-hosts.txt", + "localfile": "/tmp/blocklist/frog-firstparty.txt" + }, + { + "name": "urlhaus", + "enabled": true, + "remote": "https://urlhaus.abuse.ch/downloads/hostfile/", + "localfile": "/tmp/blocklist/urlhaus-hosts.txt" + }, + { + "name": "pgl.yoyo.org", + "enabled": true, + "remote": "https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext", + "localfile": "/tmp/blocklist/pgl.yoyo.txt" + } + ], + "notify": { + "success": { + "desktop": "Blocklists updated" + }, + "error": { + "desktop": "Error updating blocklists" + } + } + } + ] + } + } +} diff --git a/ui/opensnitch/plugins/highlight/example/commonActionsDelegate.json b/ui/opensnitch/plugins/highlight/example/commonActionsDelegate.json new file mode 100644 index 0000000000..5d5bb7b9e5 --- /dev/null +++ b/ui/opensnitch/plugins/highlight/example/commonActionsDelegate.json @@ -0,0 +1,77 @@ +{ + "name": "commonDelegateConfig", + "created": "", + "updated": "", + "description": "customize Events tab view colors. Name of this action MUST be commonDelegateConfig for now", + "actions": { + "Highlight": { + "enabled": true, + "cells": [ + { + "text": [ + "allow", + "✓ online" + ], + "cols": [1, 2, 3], + "color": "green", + "bgcolor": "", + "alignment": [ + "center" + ] + }, + { + "text": [ + "deny", + "☓ offline" + ], + "cols": [1, 2, 3], + "color": "red", + "bgcolor": "", + "alignment": [ + "center" + ] + }, + { + "text": [ + "reject" + ], + "cols": [1, 2, 3], + "color": "purple", + "bgcolor": "", + "alignment": [ + "center" + ] + } + ], + "rows": [ + { + "text": [ + "-> 53" + ], + "cols": [3], + "color": "black", + "bgcolor": "yellow", + "alignment": [] + }, + { + "text": [ + "-> 443" + ], + "cols": [3], + "color": "white", + "bgcolor": "darkRed", + "alignment": [] + }, + { + "text": [ + "block-domains" + ], + "cols": [8], + "color": "white", + "bgcolor": "darkMagenta", + "alignment": [] + } + ] + } + } +} diff --git a/ui/opensnitch/plugins/highlight/example/rulesActionsDelegate.json b/ui/opensnitch/plugins/highlight/example/rulesActionsDelegate.json new file mode 100644 index 0000000000..cd3e40092c --- /dev/null +++ b/ui/opensnitch/plugins/highlight/example/rulesActionsDelegate.json @@ -0,0 +1,54 @@ +{ + "name": "defaultRulesDelegateConfig", + "created": "", + "updated": "", + "description": "customize rules list. The name of this action MUST be defaultRulesDelegateConfig for now.", + "actions": { + "Highlight": { + "enabled": true, + "cells": [ + { + "text": ["allow", "True"], + "cols": [3, 4], + "color": "green", + "bgcolor": "", + "alignment": ["center"] + }, + { + "text": ["deny", "False"], + "cols": [3, 4], + "color": "red", + "bgcolor": "", + "alignment": ["center"] + }, + { + "text": ["reject"], + "cols": [3, 4], + "color": "purple", + "bgcolor": "", + "alignment": ["center"] + } + ], + "rows": [ + { + "text": ["allow"], + "cols": [4], + "color": "white", + "bgcolor": "green" + }, + { + "text": ["deny"], + "cols": [4], + "color": "white", + "bgcolor": "crimson" + }, + { + "text": ["False"], + "cols": [3], + "color": "black", + "bgcolor": "darkGray" + } + ] + } + } +} diff --git a/ui/opensnitch/plugins/virustotal/example/virustotal.json b/ui/opensnitch/plugins/virustotal/example/virustotal.json new file mode 100644 index 0000000000..c6dde9722d --- /dev/null +++ b/ui/opensnitch/plugins/virustotal/example/virustotal.json @@ -0,0 +1,20 @@ +{ + "name": "virustotal", + "created": "", + "updated": "", + "description": "analyze connections with Virustotal", + "type": ["popups", "proc-dialog"], + "actions": { + "virustotal": { + "enabled": true, + "config": { + "api_timeout": 2, + "api_key": "https://virustotal.readme.io/docs/please-give-me-an-api-key", + "api_domains_url": "https://www.virustotal.com/api/v3/domains/", + "api_ips_url": "https://www.virustotal.com/api/v3/ip_addresses/", + "api_files_url": "https://www.virustotal.com/api/v3/files/" + }, + "check": ["domains", "ips", "hashes"] + } + } +}