1.1.4 -> 1.1.5 第15次更新

This commit is contained in:
Space Time 2024-12-29 22:16:58 +08:00
parent bcccb73520
commit f428de3fd7
2 changed files with 13 additions and 0 deletions

11
Utils/DnsFlusher.cs Normal file
View File

@ -0,0 +1,11 @@
using System.Runtime.InteropServices;
namespace Sheas_Cealer.Utils;
internal static partial class DnsFlusher
{
[LibraryImport("dnsapi.dll")]
private static partial void DnsFlushResolverCache();
internal static void FlushDns() => DnsFlushResolverCache();
}

View File

@ -335,6 +335,8 @@ public partial class MainWin : Window
if (sender == null)
MihomoButtonHoldTimer_Tick(null, EventArgs.Empty);
DnsFlusher.FlushDns();
}
finally
{