From 7def0704a113e70e677d91f3e1039945609f7f99 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 20 Oct 2021 16:11:11 +0200 Subject: [PATCH] Add primitive encryption detection for until the inspection framework is merged --- firewall/interception.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/firewall/interception.go b/firewall/interception.go index a67849c9..296a9110 100644 --- a/firewall/interception.go +++ b/firewall/interception.go @@ -382,9 +382,22 @@ func initialHandler(conn *network.Connection, pkt packet.Packet) { } } - // TODO: enable inspecting again + // TODO: Enable inspection framework again. conn.Inspecting = false + // TODO: Quick fix for the SPN. + // Use inspection framework for proper encryption detection. + switch conn.Entity.DstPort() { + case + 22, // SSH + 443, // HTTPS + 465, // SMTP-SSL + 853, // DoT + 993, // IMAP-SSL + 995: // POP3-SSL + conn.Encrypted = true + } + switch { case conn.Inspecting: log.Tracer(pkt.Ctx()).Trace("filter: start inspecting")