Add HappyEyeballs (#9772)

* Add HappyEyeballs

* Clean up the code

* Fix
This commit is contained in:
DHR60
2026-07-17 09:12:50 +08:00
committed by GitHub
parent d9dc2d7cf5
commit 4584ecc5c9
13 changed files with 164 additions and 45 deletions
@@ -119,6 +119,7 @@ public static class ConfigHandler
config.SimpleDNSItem.BootstrapDNS ??= Global.DomainPureIPDNSAddress.FirstOrDefault();
config.SimpleDNSItem.ServeStale ??= false;
config.SimpleDNSItem.ParallelQuery ??= false;
config.SimpleDNSItem.EnableHappyEyeballs ??= false;
config.SpeedTestItem ??= new();
if (config.SpeedTestItem.SpeedTestTimeout < 10)
@@ -170,6 +171,14 @@ public static class ConfigHandler
Packets = "tlshello",
};
config.Fragment4RayItem.MaxSplit ??= "0";
config.HappyEyeballs4RayItem ??= new()
{
TryDelayMs = 250,
PrioritizeIPv6 = false,
Interleave = 1,
MaxConcurrentTry = 4,
};
if ((config.Fragment4RayItem.Lengths ?? []).Count == 0)
{
config.Fragment4RayItem.Lengths = [config.Fragment4RayItem.Length ?? "50-100"];