mirror of
https://github.com/netchx/netch.git
synced 2026-05-09 22:54:03 +08:00
fix: IsWindows10Upper not assigned caused NetTraffic won't be displayed at the first start
fix: SupportFakeDns flag lazyload
This commit is contained in:
@@ -28,17 +28,10 @@ namespace Netch
|
||||
|
||||
public static class Flags
|
||||
{
|
||||
static Flags()
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
SupportFakeDns = new TUNTAPController().TestFakeDNS();
|
||||
IsWindows10Upper = Environment.OSVersion.Version.Major >= 10;
|
||||
});
|
||||
}
|
||||
public static bool SupportFakeDns => _supportFakeDns ??= new TUNTAPController().TestFakeDNS();
|
||||
public static readonly bool IsWindows10Upper = Environment.OSVersion.Version.Major >= 10;
|
||||
|
||||
public static bool SupportFakeDns;
|
||||
public static bool IsWindows10Upper;
|
||||
private static bool? _supportFakeDns;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user