修改dns缓存时间为10min

This commit is contained in:
陈国伟 2021-09-22 15:46:07 +08:00
parent e6517717d4
commit cc51658208

View File

@ -25,13 +25,14 @@ namespace FastGithub.PacketIntercept.Dns
private const string DNS_FILTER = "udp.DstPort == 53"; private const string DNS_FILTER = "udp.DstPort == 53";
private readonly FastGithubConfig fastGithubConfig; private readonly FastGithubConfig fastGithubConfig;
private readonly ILogger<DnsInterceptor> logger; private readonly ILogger<DnsInterceptor> logger;
private readonly TimeSpan ttl = TimeSpan.FromMinutes(2d); private readonly TimeSpan ttl = TimeSpan.FromMinutes(10d);
/// <summary> /// <summary>
/// 刷新DNS缓存 /// 刷新DNS缓存
/// </summary> /// </summary>
[DllImport("dnsapi.dll", EntryPoint = "DnsFlushResolverCache", SetLastError = true)] [DllImport("dnsapi.dll", EntryPoint = "DnsFlushResolverCache", SetLastError = true)]
private static extern void DnsFlushResolverCache(); private static extern void DnsFlushResolverCache();
/// <summary> /// <summary>
/// dns拦截器 /// dns拦截器
/// </summary> /// </summary>