mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-22 09:29:50 +00:00
SplitHorizon: code refactoring changes done.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Technitium DNS Server
|
||||
Copyright (C) 2023 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
|
||||
@@ -32,13 +32,13 @@ using TechnitiumLibrary.Net.Dns.ResourceRecords;
|
||||
|
||||
namespace SplitHorizon
|
||||
{
|
||||
public class AddressTranslation : IDnsApplication, IDnsPostProcessor, IDnsAuthoritativeRequestHandler
|
||||
public sealed class AddressTranslation : IDnsApplication, IDnsPostProcessor, IDnsAuthoritativeRequestHandler
|
||||
{
|
||||
#region variables
|
||||
|
||||
bool _enableAddressTranslation;
|
||||
IReadOnlyDictionary<NetworkAddress, string> _networkGroupMap;
|
||||
IReadOnlyDictionary<string, Group> _groups;
|
||||
Dictionary<NetworkAddress, string> _networkGroupMap;
|
||||
Dictionary<string, Group> _groups;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -312,9 +312,9 @@ namespace SplitHorizon
|
||||
readonly string _name;
|
||||
readonly bool _enabled;
|
||||
readonly bool _translateReverseLookups;
|
||||
readonly IReadOnlyDictionary<IPAddress, IPAddress> _externalToInternalTranslation;
|
||||
readonly IReadOnlyDictionary<IPAddress, IPAddress> _internalToExternalTranslation;
|
||||
readonly IReadOnlyList<KeyValuePair<NetworkAddress, NetworkAddress>> _externalToInternalNetworkTranslation;
|
||||
readonly Dictionary<IPAddress, IPAddress> _externalToInternalTranslation;
|
||||
readonly Dictionary<IPAddress, IPAddress> _internalToExternalTranslation;
|
||||
readonly List<KeyValuePair<NetworkAddress, NetworkAddress>> _externalToInternalNetworkTranslation;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Technitium DNS Server
|
||||
Copyright (C) 2023 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
|
||||
@@ -32,11 +32,11 @@ using TechnitiumLibrary.Net.Dns.ResourceRecords;
|
||||
|
||||
namespace SplitHorizon
|
||||
{
|
||||
public class SimpleAddress : IDnsApplication, IDnsAppRecordRequestHandler
|
||||
public sealed class SimpleAddress : IDnsApplication, IDnsAppRecordRequestHandler
|
||||
{
|
||||
#region variables
|
||||
|
||||
static IReadOnlyDictionary<string, List<NetworkAddress>> _networks;
|
||||
static Dictionary<string, List<NetworkAddress>> _networks;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -239,7 +239,7 @@ namespace SplitHorizon
|
||||
|
||||
#region properties
|
||||
|
||||
internal static IReadOnlyDictionary<string, List<NetworkAddress>> Networks
|
||||
internal static Dictionary<string, List<NetworkAddress>> Networks
|
||||
{ get { return _networks; } }
|
||||
|
||||
public string Description
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Technitium DNS Server
|
||||
Copyright (C) 2023 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
|
||||
@@ -29,7 +29,7 @@ using TechnitiumLibrary.Net.Dns.ResourceRecords;
|
||||
|
||||
namespace SplitHorizon
|
||||
{
|
||||
public class SimpleCNAME : IDnsApplication, IDnsAppRecordRequestHandler
|
||||
public sealed class SimpleCNAME : IDnsApplication, IDnsAppRecordRequestHandler
|
||||
{
|
||||
#region IDisposable
|
||||
|
||||
|
||||
Reference in New Issue
Block a user