From 5bb9a8c8ddb436a94e4f35d43bc44ca8caf5d67f Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 14 Dec 2019 17:52:56 +0530 Subject: [PATCH] DnsServer: removed draft-ietf-doh-resolver-associated-doh implementation since the draft is expired. --- DnsServerCore/Dns/DnsServer.cs | 22 ---------------------- DnsServerCore/WebService.cs | 3 --- 2 files changed, 25 deletions(-) diff --git a/DnsServerCore/Dns/DnsServer.cs b/DnsServerCore/Dns/DnsServer.cs index 825fb98c..4edcb85d 100644 --- a/DnsServerCore/Dns/DnsServer.cs +++ b/DnsServerCore/Dns/DnsServer.cs @@ -1724,22 +1724,6 @@ namespace DnsServerCore.Dns } } - if (_isDnsOverHttpsEnabled) - { - string serverDomain = _authoritativeZoneRoot.ServerDomain; - - _authoritativeZoneRoot.SetRecords("resolver-associated-doh.arpa", DnsResourceRecordType.SOA, 14400, new DnsResourceRecordData[] { new DnsSOARecord(serverDomain, "hostmaster." + serverDomain, 1, 14400, 3600, 604800, 900) }); - _authoritativeZoneRoot.SetRecords("resolver-associated-doh.arpa", DnsResourceRecordType.NS, 14400, new DnsResourceRecordData[] { new DnsNSRecord(serverDomain) }); - _authoritativeZoneRoot.SetRecords("resolver-associated-doh.arpa", DnsResourceRecordType.TXT, 60, new DnsResourceRecordData[] { new DnsTXTRecord("https://" + serverDomain + "/dns-query{?dns}") }); - - _authoritativeZoneRoot.SetRecords("resolver-addresses.arpa", DnsResourceRecordType.SOA, 14400, new DnsResourceRecordData[] { new DnsSOARecord(serverDomain, "hostmaster." + serverDomain, 1, 14400, 3600, 604800, 900) }); - _authoritativeZoneRoot.SetRecords("resolver-addresses.arpa", DnsResourceRecordType.NS, 14400, new DnsResourceRecordData[] { new DnsNSRecord(serverDomain) }); - _authoritativeZoneRoot.SetRecords("resolver-addresses.arpa", DnsResourceRecordType.CNAME, 60, new DnsResourceRecordData[] { new DnsCNAMERecord(serverDomain) }); - - _authoritativeZoneRoot.MakeZoneInternal("resolver-associated-doh.arpa"); - _authoritativeZoneRoot.MakeZoneInternal("resolver-addresses.arpa"); - } - //start reading query packets foreach (Socket udpListener in _udpListeners) { @@ -1884,12 +1868,6 @@ namespace DnsServerCore.Dns _authoritativeZoneRoot.ServerDomain = value; _allowedZoneRoot.ServerDomain = value; _blockedZoneRoot.ServerDomain = value; - - if (_isDnsOverHttpsEnabled) - { - _authoritativeZoneRoot.SetRecords("resolver-associated-doh.arpa", DnsResourceRecordType.TXT, 60, new DnsResourceRecordData[] { new DnsTXTRecord("https://" + value + "/dns-query{?dns}") }); - _authoritativeZoneRoot.SetRecords("resolver-addresses.arpa", DnsResourceRecordType.CNAME, 60, new DnsResourceRecordData[] { new DnsCNAMERecord(value) }); - } } } diff --git a/DnsServerCore/WebService.cs b/DnsServerCore/WebService.cs index 1b0feb92..feea1f08 100644 --- a/DnsServerCore/WebService.cs +++ b/DnsServerCore/WebService.cs @@ -2226,9 +2226,6 @@ namespace DnsServerCore else if (domain.EndsWith(".")) domain = domain.Substring(0, domain.Length - 1); - if (Zone.DomainEquals(domain, "resolver-associated-doh.arpa") || Zone.DomainEquals(domain, "resolver-addresses.arpa")) - throw new WebServiceException("Access was denied to manage special DNS Server zone."); - CreateZone(domain); _log.Write(GetRequestRemoteEndPoint(request), "[" + GetSession(request).Username + "] Authoritative zone was created: " + domain);