From fa58de2e1b33b790b636eda0df3c250080d90bda Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 5 May 2021 00:24:44 +0200 Subject: [PATCH] Remove obsoleted dnscache service check --- firewall/interception/interception_windows.go | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/firewall/interception/interception_windows.go b/firewall/interception/interception_windows.go index a123d2f6..2d343a46 100644 --- a/firewall/interception/interception_windows.go +++ b/firewall/interception/interception_windows.go @@ -3,9 +3,6 @@ package interception import ( "fmt" - "github.com/safing/portbase/log" - "github.com/safing/portbase/notifications" - "github.com/safing/portbase/utils/osdetail" "github.com/safing/portmaster/firewall/interception/windowskext" "github.com/safing/portmaster/network/packet" "github.com/safing/portmaster/updates" @@ -33,7 +30,6 @@ func start(ch chan packet.Packet) error { } go windowskext.Handler(ch) - go checkWindowsDNSCache() return nil } @@ -42,28 +38,3 @@ func start(ch chan packet.Packet) error { func stop() error { return windowskext.Stop() } - -func checkWindowsDNSCache() { - status, err := osdetail.GetServiceStatus("dnscache") - if err != nil { - log.Warningf("firewall/interception: failed to check status of Windows DNS-Client: %s", err) - } - - if status == osdetail.StatusStopped { - err := osdetail.EnableDNSCache() - if err != nil { - log.Warningf("firewall/interception: failed to enable Windows Service \"DNS Client\" (dnscache): %s", err) - } else { - log.Warningf("firewall/interception: successfully enabled the dnscache") - notifyRebootRequired() - } - } -} - -func notifyRebootRequired() { - (¬ifications.Notification{ - EventID: "interception:windows-dnscache-reboot-required", - Message: "Please restart your system to complete Portmaster integration.", - Type: notifications.Warning, - }).Save() -}