Allow custom port on DnsClient constructor


I'd like to request that you support an additional constructor that accepts a custom port for DnsClient. This is particularly useful when using Consul.io as the local DNS agent listens on port 8600.

public DnsClient(IEnumerable dnsServers, int queryTimeout, int port)
: base(dnsServers, queryTimeout, port)
IsUdpEnabled = true;
IsTcpEnabled = true;


AlexReinert wrote Jan 4, 2016 at 11:19 AM

Will be added in release 2.3.0, but the timeframe is not completely clear

TomaszWeps wrote Nov 6, 2016 at 6:55 PM

I had the same need, but I couldn’t wait. In the Source code’s forks, you can find a modified library code that allows to use any port.