From 817da2ce96cbe1e88e95eda6726dc49d7b884aa5 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sun, 4 Feb 2024 17:02:17 +0530 Subject: [PATCH] DropRequests: code refactoring changes done. --- Apps/DropRequestsApp/App.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Apps/DropRequestsApp/App.cs b/Apps/DropRequestsApp/App.cs index a542f27e..a5d74d4a 100644 --- a/Apps/DropRequestsApp/App.cs +++ b/Apps/DropRequestsApp/App.cs @@ -1,6 +1,6 @@ /* Technitium DNS Server -Copyright (C) 2022 Shreyas Zare (shreyas@technitium.com) +Copyright (C) 2024 Shreyas Zare (shreyas@technitium.com) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,7 +19,6 @@ along with this program. If not, see . using DnsServerCore.ApplicationCommon; using System; -using System.Collections.Generic; using System.IO; using System.Net; using System.Text.Json; @@ -31,15 +30,15 @@ using TechnitiumLibrary.Net.Dns.ResourceRecords; namespace DropRequests { - public class App : IDnsApplication, IDnsRequestController + public sealed class App : IDnsApplication, IDnsRequestController { #region variables bool _enableBlocking; bool _dropMalformedRequests; - IReadOnlyList _allowedNetworks; - IReadOnlyList _blockedNetworks; - IReadOnlyList _blockedQuestions; + NetworkAddress[] _allowedNetworks; + NetworkAddress[] _blockedNetworks; + BlockedQuestion[] _blockedQuestions; #endregion