mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-02-05 15:33:57 +00:00
refactored app common project
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<Authors>Shreyas Zare</Authors>
|
||||
<Company>Technitium</Company>
|
||||
<Product>Technitium DNS Server</Product>
|
||||
<PackageProjectUrl>https://technitium.com/dns/</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/TechnitiumSoftware/DnsServer</RepositoryUrl>
|
||||
<RepositoryType></RepositoryType>
|
||||
<Description>.NET 5</Description>
|
||||
<PackageId>DnsServerCore.ApplicationCommon</PackageId>
|
||||
<Version>2.0</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="TechnitiumLibrary.Net">
|
||||
<HintPath>..\..\TechnitiumLibrary\bin\TechnitiumLibrary.Net.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Technitium DNS Server
|
||||
Copyright (C) 2021 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
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using TechnitiumLibrary.Net.Dns;
|
||||
|
||||
namespace DnsServerCore.ApplicationCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows a DNS App to handle incoming DNS requests for configured APP records in the DNS server zones.
|
||||
/// </summary>
|
||||
public interface IDnsAppRecordRequestHandler : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows initializing the DNS application with a config. This function is also called when the config is updated to allow reloading.
|
||||
/// </summary>
|
||||
/// <param name="dnsServer">The DNS server interface object that allows access to DNS server properties.</param>
|
||||
/// <param name="config">The DNS application config stored in the <c>dnsApp.config</c> file.</param>
|
||||
Task InitializeAsync(IDnsServer dnsServer, string config);
|
||||
|
||||
/// <summary>
|
||||
/// Allows a DNS App to respond to the incoming DNS requests for an APP record in a primary or secondary zone.
|
||||
/// </summary>
|
||||
/// <param name="request">The incoming DNS request to be processed.</param>
|
||||
/// <param name="remoteEP">The end point (IP address and port) of the client making the request.</param>
|
||||
/// <param name="protocol">The protocol using which the request was received.</param>
|
||||
/// <param name="isRecursionAllowed">Tells if the DNS server is configured to allow recursion for the client making this request.</param>
|
||||
/// <param name="zoneName">The name of the application zone that the APP record belongs to.</param>
|
||||
/// <param name="appRecordTtl">The TTL value set in the APP record.</param>
|
||||
/// <param name="appRecordData">The record data in the APP record as required for processing the request.</param>
|
||||
/// <returns>The DNS response for the DNS request or <c>null</c> to send no answer response with an SOA authority.</returns>
|
||||
Task<DnsDatagram> ProcessRequestAsync(DnsDatagram request, IPEndPoint remoteEP, DnsTransportProtocol protocol, bool isRecursionAllowed, string zoneName, uint appRecordTtl, string appRecordData);
|
||||
|
||||
/// <summary>
|
||||
/// The description about this app to be shown in the Apps section of the DNS web console.
|
||||
/// </summary>
|
||||
string Description { get; }
|
||||
|
||||
/// <summary>
|
||||
/// A template of the record data format that is required by this app. This template is populated in the UI to allow the user to edit in the expected values. The format could be JSON or any other custom text based format which the app is programmed to parse. This property is optional and can return <c>null</c> if no APP record data is required by the app.
|
||||
/// </summary>
|
||||
string ApplicationRecordDataTemplate { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
Technitium DNS Server
|
||||
Copyright (C) 2021 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
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using TechnitiumLibrary.Net.Dns;
|
||||
|
||||
namespace DnsServerCore.ApplicationCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Lets a DNS App to handle incoming requests for the DNS server's authoritative zone allowing it to act as an authoritative zone by itself and respond to any requests.
|
||||
/// </summary>
|
||||
public interface IDnsAuthoritativeRequestHandler : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows initializing the DNS application with a config. This function is also called when the config is updated to allow reloading.
|
||||
/// </summary>
|
||||
/// <param name="dnsServer">The DNS server interface object that allows access to DNS server properties.</param>
|
||||
/// <param name="config">The DNS application config stored in the <c>dnsApp.config</c> file.</param>
|
||||
Task InitializeAsync(IDnsServer dnsServer, string config);
|
||||
|
||||
/// <summary>
|
||||
/// Allows a DNS App to respond to an incoming DNS request for the DNS server's authoritative zone. This method is called by the DNS Server's authoritative zone before querying its built in zone database. Response returned may be further processed to resolve CNAME or ANAME records, or referral response.
|
||||
/// </summary>
|
||||
/// <param name="request">The incoming DNS request to be processed.</param>
|
||||
/// <param name="remoteEP">The end point (IP address and port) of the client making the request.</param>
|
||||
/// <param name="protocol">The protocol using which the request was received.</param>
|
||||
/// <param name="isRecursionAllowed">Tells if the DNS server is configured to allow recursion for the client making this request.</param>
|
||||
/// <returns>The DNS response for the DNS request or <c>null</c> to let the DNS server core process the request as usual.</returns>
|
||||
Task<DnsDatagram> ProcessRequestAsync(DnsDatagram request, IPEndPoint remoteEP, DnsTransportProtocol protocol, bool isRecursionAllowed);
|
||||
|
||||
/// <summary>
|
||||
/// The description about this app to be shown in the Apps section of the DNS web console.
|
||||
/// </summary>
|
||||
string Description { get; }
|
||||
}
|
||||
}
|
||||
245
DnsServerCore.ApplicationCommon/IDnsLogger.cs
Normal file
245
DnsServerCore.ApplicationCommon/IDnsLogger.cs
Normal file
@@ -0,0 +1,245 @@
|
||||
/*
|
||||
Technitium DNS Server
|
||||
Copyright (C) 2021 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
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using TechnitiumLibrary.Net.Dns;
|
||||
|
||||
namespace DnsServerCore.ApplicationCommon
|
||||
{
|
||||
public enum DnsServerResponseType : byte
|
||||
{
|
||||
Authoritative = 1,
|
||||
Recursive = 2,
|
||||
Cached = 3,
|
||||
Blocked = 4
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows a DNS App to log incoming DNS requests and their corresponding responses.
|
||||
/// </summary>
|
||||
public interface IDnsLogger : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows initializing the DNS application with a config. This function is also called when the config is updated to allow reloading.
|
||||
/// </summary>
|
||||
/// <param name="dnsServer">The DNS server interface object that allows access to DNS server properties.</param>
|
||||
/// <param name="config">The DNS application config stored in the <c>dnsApp.config</c> file.</param>
|
||||
Task InitializeAsync(IDnsServer dnsServer, string config);
|
||||
|
||||
/// <summary>
|
||||
/// Allows a DNS App to log incoming DNS requests and responses. This method is called by the DNS Server after an incoming request is processed and a response is sent.
|
||||
/// </summary>
|
||||
/// <param name="request">The incoming DNS request that was received.</param>
|
||||
/// <param name="remoteEP">The end point (IP address and port) of the client making the request.</param>
|
||||
/// <param name="protocol">The protocol using which the request was received.</param>
|
||||
/// <param name="response">The DNS response that was sent.</param>
|
||||
Task InsertLogAsync(DnsDatagram request, IPEndPoint remoteEP, DnsTransportProtocol protocol, DnsDatagram response);
|
||||
|
||||
/// <summary>
|
||||
/// Allows DNS Server HTTP API to query the logs recorded by the DNS App.
|
||||
/// </summary>
|
||||
/// <param name="pageNumber">The page number to be displayed to the user.</param>
|
||||
/// <param name="entriesPerPage">Total entries per page.</param>
|
||||
/// <param name="descendingOrder">Lists log entries in descending order.</param>
|
||||
/// <param name="start">Optional parameter to filter records by start date time.</param>
|
||||
/// <param name="end">Optional parameter to filter records by end date time.</param>
|
||||
/// <param name="clientIpAddress">Optional parameter to filter records by the client IP address.</param>
|
||||
/// <param name="protocol">Optional parameter to filter records by the DNS transport protocol.</param>
|
||||
/// <param name="responseType">Optional parameter to filter records by the type of response.</param>
|
||||
/// <param name="rcode">Optional parameter to filter records by the response code.</param>
|
||||
/// <param name="qname">Optional parameter to filter records by the request QNAME.</param>
|
||||
/// <param name="qtype">Optional parameter to filter records by the request QTYPE.</param>
|
||||
/// <param name="qclass">Optional parameter to filter records by the request QCLASS.</param>
|
||||
/// <returns>The <code>DnsLogPage</code> object that contains all the entries in the requested page number.</returns>
|
||||
Task<DnsLogPage> QueryLogsAsync(long pageNumber, int entriesPerPage, bool descendingOrder, DateTime? start, DateTime? end, IPAddress clientIpAddress, DnsTransportProtocol? protocol, DnsServerResponseType? responseType, DnsResponseCode? rcode, string qname, DnsResourceRecordType? qtype, DnsClass? qclass);
|
||||
|
||||
/// <summary>
|
||||
/// The description about this app to be shown in the Apps section of the DNS web console.
|
||||
/// </summary>
|
||||
string Description { get; }
|
||||
}
|
||||
|
||||
public class DnsLogPage
|
||||
{
|
||||
#region variables
|
||||
|
||||
readonly long _pageNumber;
|
||||
readonly long _totalPages;
|
||||
readonly long _totalEntries;
|
||||
readonly IReadOnlyList<DnsLogEntry> _entries;
|
||||
|
||||
#endregion
|
||||
|
||||
#region constructor
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new object initialized with all the log page parameters.
|
||||
/// </summary>
|
||||
/// <param name="pageNumber">The actual page number of the selected data set.</param>
|
||||
/// <param name="totalPages">The total pages for the selected data set.</param>
|
||||
/// <param name="totalEntries">The total number of entries in the selected data set.</param>
|
||||
/// <param name="entries">The DNS log entries in this page.</param>
|
||||
public DnsLogPage(long pageNumber, long totalPages, long totalEntries, IReadOnlyList<DnsLogEntry> entries)
|
||||
{
|
||||
_pageNumber = pageNumber;
|
||||
_totalPages = totalPages;
|
||||
_totalEntries = totalEntries;
|
||||
_entries = entries;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
/// <summary>
|
||||
/// The actual page number of the selected data set.
|
||||
/// </summary>
|
||||
public long PageNumber
|
||||
{ get { return _pageNumber; } }
|
||||
|
||||
/// <summary>
|
||||
/// The total pages for the selected data set.
|
||||
/// </summary>
|
||||
public long TotalPages
|
||||
{ get { return _totalPages; } }
|
||||
|
||||
/// <summary>
|
||||
/// The total number of entries in the selected data set.
|
||||
/// </summary>
|
||||
public long TotalEntries
|
||||
{ get { return _totalEntries; } }
|
||||
|
||||
/// <summary>
|
||||
/// The DNS log entries in this page.
|
||||
/// </summary>
|
||||
public IReadOnlyList<DnsLogEntry> Entries
|
||||
{ get { return _entries; } }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class DnsLogEntry
|
||||
{
|
||||
#region variables
|
||||
|
||||
readonly long _rowNumber;
|
||||
readonly DateTime _timestamp;
|
||||
readonly IPAddress _clientIpAddress;
|
||||
readonly DnsTransportProtocol _protocol;
|
||||
readonly DnsServerResponseType _responseType;
|
||||
readonly DnsResponseCode _rcode;
|
||||
readonly DnsQuestionRecord _question;
|
||||
readonly string _answer;
|
||||
|
||||
#endregion
|
||||
|
||||
#region constructor
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new object initialized with all the log entry parameters.
|
||||
/// </summary>
|
||||
/// <param name="rowNumber">The row number of the entry in the selected data set.</param>
|
||||
/// <param name="timestamp">The time stamp of the log entry.</param>
|
||||
/// <param name="clientIpAddress">The client IP address of the request.</param>
|
||||
/// <param name="protocol">The DNS transport protocol of the request.</param>
|
||||
/// <param name="responseType">The type of response sent by the DNS server.</param>
|
||||
/// <param name="rcode">The response code sent by the DNS server.</param>
|
||||
/// <param name="question">The question section in the request.</param>
|
||||
/// <param name="answer">The answer in text format sent by the DNS server.</param>
|
||||
public DnsLogEntry(long rowNumber, DateTime timestamp, IPAddress clientIpAddress, DnsTransportProtocol protocol, DnsServerResponseType responseType, DnsResponseCode rcode, DnsQuestionRecord question, string answer)
|
||||
{
|
||||
_rowNumber = rowNumber;
|
||||
_timestamp = timestamp;
|
||||
_clientIpAddress = clientIpAddress;
|
||||
_protocol = protocol;
|
||||
_responseType = responseType;
|
||||
_rcode = rcode;
|
||||
_question = question;
|
||||
_answer = answer;
|
||||
|
||||
switch (_timestamp.Kind)
|
||||
{
|
||||
case DateTimeKind.Local:
|
||||
_timestamp = _timestamp.ToUniversalTime();
|
||||
break;
|
||||
|
||||
case DateTimeKind.Unspecified:
|
||||
_timestamp = DateTime.SpecifyKind(_timestamp, DateTimeKind.Utc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
/// <summary>
|
||||
/// The row number of the entry in the selected data set.
|
||||
/// </summary>
|
||||
public long RowNumber
|
||||
{ get { return _rowNumber; } }
|
||||
|
||||
/// <summary>
|
||||
/// The time stamp of the log entry.
|
||||
/// </summary>
|
||||
public DateTime Timestamp
|
||||
{ get { return _timestamp; } }
|
||||
|
||||
/// <summary>
|
||||
/// The client IP address of the request.
|
||||
/// </summary>
|
||||
public IPAddress ClientIpAddress
|
||||
{ get { return _clientIpAddress; } }
|
||||
|
||||
/// <summary>
|
||||
/// The DNS transport protocol of the request.
|
||||
/// </summary>
|
||||
public DnsTransportProtocol Protocol
|
||||
{ get { return _protocol; } }
|
||||
|
||||
/// <summary>
|
||||
/// The type of response sent by the DNS server.
|
||||
/// </summary>
|
||||
public DnsServerResponseType ResponseType
|
||||
{ get { return _responseType; } }
|
||||
|
||||
/// <summary>
|
||||
/// The response code sent by the DNS server.
|
||||
/// </summary>
|
||||
public DnsResponseCode RCODE
|
||||
{ get { return _rcode; } }
|
||||
|
||||
/// <summary>
|
||||
/// The question section in the request.
|
||||
/// </summary>
|
||||
public DnsQuestionRecord Question
|
||||
{ get { return _question; } }
|
||||
|
||||
/// <summary>
|
||||
/// The answer in text format sent by the DNS server.
|
||||
/// </summary>
|
||||
public string Answer
|
||||
{ get { return _answer; } }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
71
DnsServerCore.ApplicationCommon/IDnsRequestController.cs
Normal file
71
DnsServerCore.ApplicationCommon/IDnsRequestController.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Technitium DNS Server
|
||||
Copyright (C) 2021 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
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using TechnitiumLibrary.Net.Dns;
|
||||
|
||||
namespace DnsServerCore.ApplicationCommon
|
||||
{
|
||||
public enum DnsRequestControllerAction
|
||||
{
|
||||
/// <summary>
|
||||
/// Allow the request to be processed.
|
||||
/// </summary>
|
||||
Allow = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Drop the request without any response.
|
||||
/// </summary>
|
||||
DropSilently = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Drop the request with a Refused response.
|
||||
/// </summary>
|
||||
DropWithRefused = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows a DNS App to inspect and optionally block incoming DNS requests before they are processed by the DNS Server core.
|
||||
/// </summary>
|
||||
public interface IDnsRequestController : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows initializing the DNS application with a config. This function is also called when the config is updated to allow reloading.
|
||||
/// </summary>
|
||||
/// <param name="dnsServer">The DNS server interface object that allows access to DNS server properties.</param>
|
||||
/// <param name="config">The DNS application config stored in the <c>dnsApp.config</c> file.</param>
|
||||
Task InitializeAsync(IDnsServer dnsServer, string config);
|
||||
|
||||
/// <summary>
|
||||
/// Allows a DNS App to inspect an incoming DNS request and decide whether to allow or block it. This method is called by the DNS Server before an incoming request is processed.
|
||||
/// </summary>
|
||||
/// <param name="request">The incoming DNS request.</param>
|
||||
/// <param name="remoteEP">The end point (IP address and port) of the client making the request.</param>
|
||||
/// <param name="protocol">The protocol using which the request was received.</param>
|
||||
/// <returns>The action that must be taken by the DNS server i.e. if the request must be allowed or dropped.</returns>
|
||||
Task<DnsRequestControllerAction> GetRequestActionAsync(DnsDatagram request, IPEndPoint remoteEP, DnsTransportProtocol protocol);
|
||||
|
||||
/// <summary>
|
||||
/// The description about this app to be shown in the Apps section of the DNS web console.
|
||||
/// </summary>
|
||||
string Description { get; }
|
||||
}
|
||||
}
|
||||
81
DnsServerCore.ApplicationCommon/IDnsServer.cs
Normal file
81
DnsServerCore.ApplicationCommon/IDnsServer.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
Technitium DNS Server
|
||||
Copyright (C) 2021 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
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using TechnitiumLibrary.Net.Dns;
|
||||
using TechnitiumLibrary.Net.Proxy;
|
||||
|
||||
namespace DnsServerCore.ApplicationCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides an interface to access the internal DNS Server core.
|
||||
/// </summary>
|
||||
public interface IDnsServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows querying the DNS server core directly. This call supports recursion even if its not enabled in the DNS server configuration. The request wont be routed to any of the installed DNS Apps except for processing APP records. The request and its response are not counted in any stats or logged.
|
||||
/// </summary>
|
||||
/// <param name="question">The question record containing the details to query.</param>
|
||||
/// <returns>The DNS response for the DNS query or <c>null</c> if the request timed out.</returns>
|
||||
Task<DnsDatagram> DirectQueryAsync(DnsQuestionRecord question);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a log entry to the DNS server log file.
|
||||
/// </summary>
|
||||
/// <param name="message">The message to log.</param>
|
||||
void WriteLog(string message);
|
||||
|
||||
/// <summary>
|
||||
/// Writes a log entry to the DNS server log file.
|
||||
/// </summary>
|
||||
/// <param name="ex">The exception to log.</param>
|
||||
void WriteLog(Exception ex);
|
||||
|
||||
/// <summary>
|
||||
/// The name of this installed application.
|
||||
/// </summary>
|
||||
string ApplicationName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The folder where this application is saved on the disk. Can be used to create temp files, read/write files, etc. for this application.
|
||||
/// </summary>
|
||||
string ApplicationFolder { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The primary domain name used by this DNS Server to identify itself.
|
||||
/// </summary>
|
||||
string ServerDomain { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The DNS cache object which provides direct access to the DNS server cache.
|
||||
/// </summary>
|
||||
IDnsCache DnsCache { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The proxy server setting on the DNS server to be used when required to make any outbound network connection.
|
||||
/// </summary>
|
||||
NetProxy Proxy { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Tells if the DNS server prefers using IPv6 as per the settings.
|
||||
/// </summary>
|
||||
bool PreferIPv6 { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user