Publish Zonghengjia Windows 0.3.17 client source

This commit is contained in:
2026-11-15 21:33:18 +08:00
parent 36de255318
commit ebec81ceb1
25 changed files with 3745 additions and 3412 deletions
+17
View File
@@ -0,0 +1,17 @@
using System.Text.RegularExpressions;
namespace UCVL.VPNPlus;
// These namespaces carry the control, relay and MagicDNS traffic that the
// Tailscale transport itself depends on.
internal static class TailnetDnsPolicy
{
private static readonly string[] Zones = ["tailscale.com", "ts.net"];
internal static readonly string DomainPattern = @"(?i)(^|\.)(" + string.Join("|", Zones.Select(Regex.Escape)) + @")\.?$";
private static readonly Regex ProtectedDomain = new(DomainPattern, RegexOptions.CultureInvariant);
internal static bool IsProtectedDomain(string domain) => ProtectedDomain.IsMatch(domain);
internal static bool IsProtectedSuffix(string suffix) => IsProtectedDomain(suffix)
|| Zones.Any(zone => zone.EndsWith("." + suffix.TrimEnd('.'), StringComparison.OrdinalIgnoreCase));
}