Commit Graph

150 Commits

Author SHA1 Message Date
Shreyas Zare
c7ce7077c5 DnsServer: implemented support for custom real ip header for DoH. Implemented blocking answer ttl feature. Fixed minor issue with rate limiting detection logging feature. Fixed minor issue with DoH start process. Added missing validation checks for optional protocol port properties. Code refactoring changes done. 2024-10-19 16:58:04 +05:30
Shreyas Zare
9ce324a377 DnsServer: fixed null ref issue in ProcessZoneTransferQueryAsync() by removing log entries that are not really required. 2024-09-28 16:13:43 +05:30
Shreyas Zare
418ccb9a7f DnsServer: updated forwarding code to ignore forwarder domain resolution when proxy is configured. Updated StopAsync() and StopDoHAsync() to ignore any errors while stopping. 2024-09-23 19:09:25 +05:30
Shreyas Zare
16623101ce DnsServer: Updated ProcessAuthoritativeQueryAsync() to use ProcessRecursiveQueryAsync() call for blocking support. 2024-09-21 17:47:32 +05:30
Shreyas Zare
565b6d53d0 DnsServer: updated ProcessZoneTransferQueryAsync() to check for secondary catalog properties and update notify failed list by removing current client from it. Updated validation checks in properties. Code refactoring changes done. 2024-09-21 12:51:58 +05:30
Shreyas Zare
bdda47db3f DnsServer: Updated recursion option to support access control list. Added max overall timeout for recursive resolution. Added option to enable/disable DNS-over-HTTP/3. Added option to configure resolver concurrency. Added option to enable/disable concurrent forwarding. Replaced WithTimeout() usage to new TimeoutAsync() to allow cancelling running task after timeout. Updated ProcessQueryAsync() handle timeout exception to allow debugging CPU usage issue. Updated notify and zone transfer to support new zone types. Added update support for secondary forwarder. Fixed issue in ProcessAuthoritativeQueryAsync() that caused failure to process FWD record. Updated AuthoritativeQueryAsync() to add TimeoutAsync() to allow mitigating and debuging cpu usage issue. Fixed issue in ProcessAPPAsync() to process FWD record. Fixed bug in IsAllowedAsync() when request of DS type is received. Implemented priority based conditional forwarding feature. Added feature to write client subnet rate limiting changes to log file. Updated StartAsync() to wait and retry when socket binding fails. Code refactoring changes done. 2024-09-14 19:12:46 +05:30
Shreyas Zare
a64a24ca61 DnsServer: Updated ProcessZoneTransferQueryAsync() to use IsActive property to check for active zone. Code refactoring changes done. 2024-06-22 13:55:51 +05:30
Shreyas Zare
ff8648e35b DnsServer: code refactoring changes. 2024-06-01 19:00:33 +05:30
Shreyas Zare
b679fbcab9 DnsServer: added option to specify default responsible person for zones. Updated serve stale feature implementation to make serve stale max wait time variable configurable. Code refactoring changes done. 2024-05-19 15:13:35 +05:30
Shreyas Zare
b9986f1501 DnsServer: Implemented EDNS Client Subnet override feature. Updated ProcessUpdateQueryAsync() to check for update permissions for secondary zone. Updated serve stale to wait for max 1800ms. Code refactoring done. 2024-03-16 13:59:22 +05:30
Shreyas Zare
c00a2a15a6 DnsServer: updated ProcessConnectionAsync() to read server domain name from TLS request to set it as request local EP. Updated ProcessQuicConnectionAsync() to read target hostname from the QUIC connection to set it as request local EP. 2024-02-17 18:08:04 +05:30
Shreyas Zare
ff525d7d30 DnsServer: Added notify allowed networks feature. Updated default config values for mitigating pulsing DoS attack. Added qpm bypass list feature. Updated ProcessUdpRequestAsync() to use buffer from array pool. Updated ProcessUpdateQueryAsync() to find closest zone to update and added support for forwarder zones. Updated ProcessCNAMEAsync() to prevent duplicate entries in response. Updated RecursiveResolveAsync() to simplify serve stale implementation. Updated PrepareRecursiveResolveResponse() to set correct AD flag value. Updated StartAsync() to update root servers list by priming query. Code refactoring changes done. 2024-02-04 17:59:51 +05:30
Shreyas Zare
e8c9122d0c DnsServer: moved udp socket pool init to StartAsync() to prevent it from occupying ports before web service starts. 2023-12-02 16:47:24 +05:30
Shreyas Zare
343a270292 DnsServer: fixed bug in ProcessUpdateQueryAsync() for matching network address to remote address. Fixed other minor null reference issues. 2023-10-31 20:46:04 +05:30
Shreyas Zare
f4ea842722 DnsServer: Added zone transfer allowed networks feature. Added blocking bypass list feature. Added separate logger for resolver error logs. Updated implementation to set metadata for requests with details of the local end point. Added support for ALIAS record. Implemented support for IDnsRequestBlockingHandler feature. Code refactoring changes done. 2023-10-29 19:10:33 +05:30
Shreyas Zare
3d43c9894d DnsServer: implemented FWD record no proxy type feature. 2023-09-23 18:10:39 +05:30
Shreyas Zare
db1f97c2c9 DnsServer: Implemented UDP and TCP over PROXY protocol. 2023-08-12 13:04:47 +05:30
Shreyas Zare
fee08180f9 DnsServer: updated TLS certificate implementation to allow the TLS handshake to send the cert chain for DoT, DoH, & DoQ. Updated ProcessAPPAsync() to fix issue with rcode for wildcard cases. 2023-07-29 13:30:46 +05:30
Shreyas Zare
aa0a7ef6f6 DnsServer: Updated code to write more specific error log for dynamic updates security policy. 2023-07-02 15:45:11 +05:30
Shreyas Zare
74ab6b9596 DnsServer: removed RD flag check for conditional forwarder zones. 2023-06-25 19:07:04 +05:30
Shreyas Zare
560567a79e DnsServer: updated ProcessDoHRequestAsync() to make the accept header optional. Updated RecursiveResolveAsync() to include extended dns error in response. 2023-05-27 12:34:28 +05:30
Shreyas Zare
aa950351c0 DnsServer: updated ProcessUdpRequestAsync() to remove glue for SRV, SVCB and HTTPS along with MX when response is getting truncated. Updated PostProcessQueryAsync(), RecursiveResolveAsync(), and PrepareRecursiveResolveResponse() to support ECS for all record types. 2023-05-20 18:08:18 +05:30
Shreyas Zare
78979c3a46 DnsServer: Updated ProcessAuthoritativeQueryAsync() to fix conditional forwarder recursion condition to allow conditional forwarding when recursion is denied in settings but is desired by the request. 2023-05-01 19:57:08 +05:30
Shreyas Zare
3bc39fc28a DnsServer: updated error message to include question. 2023-04-29 13:33:24 +05:30
Shreyas Zare
46d4e17856 DnsServer: Implemented socket pool feature for port randomization on windows platform. Updated AuthoritativeQueryAsync() to check the auth zone before querying DNS apps. Updated RecursiveResolveAsync() and ConditionalForwarderResolveAsync() to support conditional forwarding client subnet. Updated DoH web server to serve unknown file types for certbot webroot HTTP challenge. Fixed issue in ServerDomain property when invalid domain name was set. 2023-04-23 16:24:45 +05:30
Shreyas Zare
a462b3097a DnsServer: Updated ProcessRecursiveQueryAsync() to return rcode from blocked response. 2023-03-18 13:39:23 +05:30
Shreyas Zare
0bcb233e1c DnsServer: Updated ProcessUdpRequestAsync() to limit the response side to the configured udp payload size to limit amplification attack issue reported by Xiang Li. Updated ProcessAuthoritativeQueryAsync() to prevent conditional forwarding when request does not have RD flag set as reported by Xiang Li. 2023-03-11 15:17:59 +05:30
Shreyas Zare
bbf4a2e773 DnsServer: updated ProcessUdpRequestAsync() to handle truncation for MX response to allow trying once after removing glue records before sending a TC response due to issues with some old mail servers that do not retry over TCP when TC response is received. Updated ProcessRecursiveQueryAsync() to use EDNS request to allow relaying extended DNS error response from blocked zone to client. 2023-03-05 19:26:05 +05:30
Shreyas Zare
c1f287528b DnsServer: fixed issue in DNS-over-HTTP private IP check causing 403 with reverse proxy. 2023-02-26 17:26:55 +05:30
Shreyas Zare
fa82a737e9 DnsServer: Updated ProcessAuthoritativeQueryAsync() by moving query code into separate AuthoritativeQueryAsync() method. Updated ProcessCNAME(), ProcessANAME(), and CachePrefetchSamplingTimerCallback() to use AuthoritativeQueryAsync(). Updated "this-server" implementation to move checking code into RecursiveResolveAsync(). Code refactoring changes done. 2023-02-25 13:10:42 +05:30
Shreyas Zare
089634f1f3 DnsServer: setting default blocking type to NX domain. Implemented independent query task scheduler to handle incoming requests. Implemented new DirectQueryAsync() method. 2023-02-18 11:43:37 +05:30
Shreyas Zare
8239139015 DnsServer: removed doh-port 80 compatibility option. Updated ProcessBlockedQuery() to support extended dns error for blocked domain report. Updated ProcessRecusriveQueryAsync() to support new response types. Updated RecursiveResolveAsync() to use new ResolveDnsCache object with skip option enabled. Updated PrepareRecursiveResolveResponse() to copy dns client extended errors to get similar response as from cache. 2023-02-12 13:06:27 +05:30
Shreyas Zare
ebc6e5f1f3 DnsServer: merged doh web apps. 2023-02-05 17:21:20 +05:30
Shreyas Zare
31aa04c1c5 DnsServer: Updated ProcessConnectionAsync() to add timeout condition for AuthenticateAsServerAsync() call. Updated ProcessAPPAsync() to decide on correct RCODE to be used for response. 2023-02-05 16:37:15 +05:30
Shreyas Zare
d1ab424f57 DnsServer: Implemented IAsyncDisposable. Implemented DNS-over-QUIC optional protocol support. Replaced old DNS-over-HTTPS web server with Kestrel to support HTTP/2 and HTTP/3. Code refactoring done. 2023-01-14 14:52:00 +05:30
Shreyas Zare
1fa22609e9 DnsServer: Removed newtonsoft. Removed doh-json support. Updated ProcessNotifyQueryAsync() and ProcessUpdateQueryAsync() to add log messages. 2022-12-24 12:17:22 +05:30
Shreyas Zare
e7e0c4bed6 DnsServer: Updated PostProcessQuery() to add ECS option in response only when the request actually had it. Updated RecursiveResolveAsync() to use ECS only when the qtype is supported. Updated RecursiveResolveAsync() to add missing ECS option to the dns client for forwarders. Updated PrepareRecursiveResolveResponse() to fix ECS condition. 2022-12-04 13:11:51 +05:30
Shreyas Zare
d82293c688 DnsServer: implemented ECS support. 2022-11-20 16:28:07 +05:30
Shreyas Zare
e36fb906da DnsServer: updated PostProcessQueryAsync() to return response without EDNS when request does not have EDNS. 2022-11-12 17:19:43 +05:30
Shreyas Zare
a66531a942 DnsServer: implemented support for new IDnsPostProcessor interface in PostProcessQueryAsync(). Updated ProcessAPPAsync() implementation to allow APP record to return null response when used with Forwarder zones so that the DNS server processes FWD records in such case. Other minor code refactoring changes done. 2022-11-12 15:10:42 +05:30
Shreyas Zare
a9c4b70c23 DnsServer: Updated ProcessUpdateQueryAsync() to support dynamic updates security policy. Updated ProcessCNAMEAsync() to detect CNAME loops. Updated ProcessANAMEAsync() to detect loops. 2022-10-30 19:03:47 +05:30
Shreyas Zare
a0a904fc89 DnsServer: updated ProcessUpdateQueryAsync() to check for permissions for secondary zone case, and to use the same tsig key from the update request. 2022-10-09 15:40:51 +05:30
Shreyas Zare
20651a2328 DnsServer: implemented dynamic updates RFC 2136 support. Updated ProcessZoneTransferQueryAsync() to stop allowing zone transfer from loopback. 2022-10-05 19:09:42 +05:30
Shreyas Zare
69a10a1fb5 merged multi-user into develop 2022-09-18 19:00:54 +05:30
Shreyas Zare
f2ffc891a0 DnsServer: updated ProcessAPPAsync() to support new APP interface changes. Updated ProcessCNAMEAsync() to use the correct DO flag in new request. 2022-09-18 17:35:44 +05:30
Shreyas Zare
8e2cec124a DnsServer: updated code for stats manager related changes. 2022-08-11 13:33:15 +05:30
Shreyas Zare
814d1c2fd2 DnsServer: updated resolver retries default value to 2. Updated RecursiveResolveAsync() to enable async NS resolution feature when doing recursive resolution. 2022-07-03 15:29:35 +05:30
Shreyas Zare
afbbc57da4 DnsServer: updated ProcessDoHRequestAsunc() to remove trailing period from qname for HttpsJson transport protocol. Updated RecursiveResolveAsync() to handle IOException to show correct extended dns error. 2022-05-28 12:21:46 +05:30
Shreyas Zare
9ea77190d3 DnsServer: updated ProcessUdpRequestAsync() to add OPT to truncation response when request has OPT. 2022-05-14 18:52:21 +05:30
Shreyas Zare
17edbced83 DnsServer: updated ProcessZoneTransferQueryAsync() to implement AllowBothZoneAndSpecifiedNameServers option. 2022-05-14 13:42:14 +05:30