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
|
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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -32,13 +32,13 @@ using TechnitiumLibrary.Net.Dns.ResourceRecords;
|
|||||||
|
|
||||||
namespace SplitHorizon
|
namespace SplitHorizon
|
||||||
{
|
{
|
||||||
public class AddressTranslation : IDnsApplication, IDnsPostProcessor, IDnsAuthoritativeRequestHandler
|
public sealed class AddressTranslation : IDnsApplication, IDnsPostProcessor, IDnsAuthoritativeRequestHandler
|
||||||
{
|
{
|
||||||
#region variables
|
#region variables
|
||||||
|
|
||||||
bool _enableAddressTranslation;
|
bool _enableAddressTranslation;
|
||||||
IReadOnlyDictionary<NetworkAddress, string> _networkGroupMap;
|
Dictionary<NetworkAddress, string> _networkGroupMap;
|
||||||
IReadOnlyDictionary<string, Group> _groups;
|
Dictionary<string, Group> _groups;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -312,9 +312,9 @@ namespace SplitHorizon
|
|||||||
readonly string _name;
|
readonly string _name;
|
||||||
readonly bool _enabled;
|
readonly bool _enabled;
|
||||||
readonly bool _translateReverseLookups;
|
readonly bool _translateReverseLookups;
|
||||||
readonly IReadOnlyDictionary<IPAddress, IPAddress> _externalToInternalTranslation;
|
readonly Dictionary<IPAddress, IPAddress> _externalToInternalTranslation;
|
||||||
readonly IReadOnlyDictionary<IPAddress, IPAddress> _internalToExternalTranslation;
|
readonly Dictionary<IPAddress, IPAddress> _internalToExternalTranslation;
|
||||||
readonly IReadOnlyList<KeyValuePair<NetworkAddress, NetworkAddress>> _externalToInternalNetworkTranslation;
|
readonly List<KeyValuePair<NetworkAddress, NetworkAddress>> _externalToInternalNetworkTranslation;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Technitium DNS Server
|
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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -32,11 +32,11 @@ using TechnitiumLibrary.Net.Dns.ResourceRecords;
|
|||||||
|
|
||||||
namespace SplitHorizon
|
namespace SplitHorizon
|
||||||
{
|
{
|
||||||
public class SimpleAddress : IDnsApplication, IDnsAppRecordRequestHandler
|
public sealed class SimpleAddress : IDnsApplication, IDnsAppRecordRequestHandler
|
||||||
{
|
{
|
||||||
#region variables
|
#region variables
|
||||||
|
|
||||||
static IReadOnlyDictionary<string, List<NetworkAddress>> _networks;
|
static Dictionary<string, List<NetworkAddress>> _networks;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ namespace SplitHorizon
|
|||||||
|
|
||||||
#region properties
|
#region properties
|
||||||
|
|
||||||
internal static IReadOnlyDictionary<string, List<NetworkAddress>> Networks
|
internal static Dictionary<string, List<NetworkAddress>> Networks
|
||||||
{ get { return _networks; } }
|
{ get { return _networks; } }
|
||||||
|
|
||||||
public string Description
|
public string Description
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Technitium DNS Server
|
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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -29,7 +29,7 @@ using TechnitiumLibrary.Net.Dns.ResourceRecords;
|
|||||||
|
|
||||||
namespace SplitHorizon
|
namespace SplitHorizon
|
||||||
{
|
{
|
||||||
public class SimpleCNAME : IDnsApplication, IDnsAppRecordRequestHandler
|
public sealed class SimpleCNAME : IDnsApplication, IDnsAppRecordRequestHandler
|
||||||
{
|
{
|
||||||
#region IDisposable
|
#region IDisposable
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user