mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-02-24 00:37:08 +00:00
AdvancedBlocking: using HttpClientNetworkHandler that does retries as well as resolves via given dns client.
This commit is contained in:
@@ -931,7 +931,7 @@ namespace AdvancedBlocking
|
||||
handler.UseProxy = _dnsServer.Proxy is not null;
|
||||
handler.AutomaticDecompression = DecompressionMethods.All;
|
||||
|
||||
using (HttpClient http = new HttpClient(new HttpClientRetryHandler(handler)))
|
||||
using (HttpClient http = new HttpClient(new HttpClientNetworkHandler(handler, _dnsServer.PreferIPv6 ? HttpClientNetworkType.PreferIPv6 : HttpClientNetworkType.Default, _dnsServer)))
|
||||
{
|
||||
if (File.Exists(_listFilePath))
|
||||
http.DefaultRequestHeaders.IfModifiedSince = File.GetLastWriteTimeUtc(_listFilePath);
|
||||
|
||||
Reference in New Issue
Block a user