修复 sing-box TUN 模式下 relay 出站的 mux 问题 (#9018)

* Fix sing-box selector generation for dynamic group tags

* 修复 TUN 模式下 DNS 失败及 Windows 提权重启后 TUN 状态丢失

* 按上游意见回滚 TUN 提权时保留启用状态的改动
This commit is contained in:
nirvanalinlei
2026-04-02 20:47:34 +08:00
committed by GitHub
parent b556adaa09
commit b3102b34b3
3 changed files with 27 additions and 2 deletions
+3 -2
View File
@@ -46,7 +46,7 @@ public static class ProcUtils
return null;
}
public static void RebootAsAdmin(bool blAdmin = true)
public static bool RebootAsAdmin(bool blAdmin = true)
{
try
{
@@ -58,11 +58,12 @@ public static class ProcUtils
FileName = Utils.GetExePath().AppendQuotes(),
Verb = blAdmin ? "runas" : null,
};
_ = Process.Start(startInfo);
return Process.Start(startInfo) != null;
}
catch (Exception ex)
{
Logging.SaveLog(_tag, ex);
return false;
}
}
}