From 732578156a620972add3180d70ffee47e92e3075 Mon Sep 17 00:00:00 2001 From: axolotle Date: Tue, 13 Aug 2024 00:29:27 +0200 Subject: [PATCH] refactor: rework async ToolFirewall --- app/src/types/core/api.ts | 13 +++ app/src/views/tool/ToolFirewall.vue | 163 +++++++++++++++------------- 2 files changed, 99 insertions(+), 77 deletions(-) diff --git a/app/src/types/core/api.ts b/app/src/types/core/api.ts index adf5a229..070984d7 100644 --- a/app/src/types/core/api.ts +++ b/app/src/types/core/api.ts @@ -229,6 +229,19 @@ export type Diagnosis = { }[] } +// FIREWALL + +type Protocols = { TCP: number[]; UDP: number[] } +export type Firewall = { + ipv4: Protocols + ipv6: Protocols + uPnP: Protocols & { + TCP_TO_CLOSE: number[] + UDP_TO_CLOSE: number[] + enabled: boolean + } +} + // DOMAINS export type DNSRecord = { diff --git a/app/src/views/tool/ToolFirewall.vue b/app/src/views/tool/ToolFirewall.vue index c435ff31..b7fe436e 100644 --- a/app/src/views/tool/ToolFirewall.vue +++ b/app/src/views/tool/ToolFirewall.vue @@ -1,21 +1,63 @@