mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-25 02:50:34 +00:00
AdvancedForwarding: updated code to implement new FWD record proxy type changes.
This commit is contained in:
@@ -29,7 +29,6 @@ using TechnitiumLibrary;
|
|||||||
using TechnitiumLibrary.Net;
|
using TechnitiumLibrary.Net;
|
||||||
using TechnitiumLibrary.Net.Dns;
|
using TechnitiumLibrary.Net.Dns;
|
||||||
using TechnitiumLibrary.Net.Dns.ResourceRecords;
|
using TechnitiumLibrary.Net.Dns.ResourceRecords;
|
||||||
using TechnitiumLibrary.Net.Proxy;
|
|
||||||
|
|
||||||
namespace AdvancedForwarding
|
namespace AdvancedForwarding
|
||||||
{
|
{
|
||||||
@@ -82,7 +81,7 @@ namespace AdvancedForwarding
|
|||||||
DnsForwarderRecordData forwarderRecord;
|
DnsForwarderRecordData forwarderRecord;
|
||||||
|
|
||||||
if (configProxyServer is null)
|
if (configProxyServer is null)
|
||||||
forwarderRecord = new DnsForwarderRecordData(protocol, forwarder, dnssecValidation, NetProxyType.None, null, 0, null, null);
|
forwarderRecord = new DnsForwarderRecordData(protocol, forwarder, dnssecValidation, DnsForwarderRecordProxyType.DefaultProxy, null, 0, null, null);
|
||||||
else
|
else
|
||||||
forwarderRecord = new DnsForwarderRecordData(protocol, forwarder, dnssecValidation, configProxyServer.Type, configProxyServer.ProxyAddress, configProxyServer.ProxyPort, configProxyServer.ProxyUsername, configProxyServer.ProxyPassword);
|
forwarderRecord = new DnsForwarderRecordData(protocol, forwarder, dnssecValidation, configProxyServer.Type, configProxyServer.ProxyAddress, configProxyServer.ProxyPort, configProxyServer.ProxyUsername, configProxyServer.ProxyPassword);
|
||||||
|
|
||||||
@@ -769,7 +768,7 @@ namespace AdvancedForwarding
|
|||||||
#region variables
|
#region variables
|
||||||
|
|
||||||
readonly string _name;
|
readonly string _name;
|
||||||
readonly NetProxyType _type;
|
readonly DnsForwarderRecordProxyType _type;
|
||||||
readonly string _proxyAddress;
|
readonly string _proxyAddress;
|
||||||
readonly ushort _proxyPort;
|
readonly ushort _proxyPort;
|
||||||
readonly string _proxyUsername;
|
readonly string _proxyUsername;
|
||||||
@@ -782,7 +781,7 @@ namespace AdvancedForwarding
|
|||||||
public ConfigProxyServer(JsonElement jsonProxy)
|
public ConfigProxyServer(JsonElement jsonProxy)
|
||||||
{
|
{
|
||||||
_name = jsonProxy.GetProperty("name").GetString();
|
_name = jsonProxy.GetProperty("name").GetString();
|
||||||
_type = jsonProxy.GetPropertyEnumValue("type", NetProxyType.Http);
|
_type = jsonProxy.GetPropertyEnumValue("type", DnsForwarderRecordProxyType.Http);
|
||||||
_proxyAddress = jsonProxy.GetProperty("proxyAddress").GetString();
|
_proxyAddress = jsonProxy.GetProperty("proxyAddress").GetString();
|
||||||
_proxyPort = jsonProxy.GetProperty("proxyPort").GetUInt16();
|
_proxyPort = jsonProxy.GetProperty("proxyPort").GetUInt16();
|
||||||
_proxyUsername = jsonProxy.GetPropertyValue("proxyUsername", null);
|
_proxyUsername = jsonProxy.GetPropertyValue("proxyUsername", null);
|
||||||
@@ -796,7 +795,7 @@ namespace AdvancedForwarding
|
|||||||
public string Name
|
public string Name
|
||||||
{ get { return _name; } }
|
{ get { return _name; } }
|
||||||
|
|
||||||
public NetProxyType Type
|
public DnsForwarderRecordProxyType Type
|
||||||
{ get { return _type; } }
|
{ get { return _type; } }
|
||||||
|
|
||||||
public string ProxyAddress
|
public string ProxyAddress
|
||||||
|
|||||||
Reference in New Issue
Block a user