mirror of
https://github.com/2dust/v2rayN.git
synced 2026-09-27 00:52:07 +03:00
Raise speed test concurrency minimum
This commit is contained in:
@@ -92,13 +92,14 @@ public class Global
|
||||
public const string XrayLocalAsset = "XRAY_LOCATION_ASSET";
|
||||
public const string XrayLocalCert = "XRAY_LOCATION_CERT";
|
||||
public const int SpeedTestPageSize = 1000;
|
||||
public const int SpeedTestConcurrencyCountMin = 10;
|
||||
public const string LinuxBash = "/bin/bash";
|
||||
public const string StringTrue = "true";
|
||||
public const string StringFalse = "false";
|
||||
public const int SqliteMaxBatchSize = 10000;
|
||||
public static readonly TimeSpan LocalFetch = TimeSpan.FromSeconds(5);
|
||||
public static readonly TimeSpan DirectFetch = TimeSpan.FromSeconds(10);
|
||||
public static readonly TimeSpan ProxyFetch = TimeSpan.FromSeconds(30);
|
||||
public static readonly TimeSpan ProxyFetch = TimeSpan.FromSeconds(30);
|
||||
public static readonly TimeSpan DirectDownloadConnect = TimeSpan.FromSeconds(5);
|
||||
public static readonly TimeSpan ProxyDownloadConnect = TimeSpan.FromSeconds(10);
|
||||
|
||||
|
||||
@@ -136,10 +136,7 @@ public static class ConfigHandler
|
||||
{
|
||||
config.SpeedTestItem.SpeedPingTestUrl = Global.SpeedPingTestUrls.First();
|
||||
}
|
||||
if (config.SpeedTestItem.MixedConcurrencyCount < 1)
|
||||
{
|
||||
config.SpeedTestItem.MixedConcurrencyCount = 5;
|
||||
}
|
||||
config.SpeedTestItem.MixedConcurrencyCount = Math.Max(config.SpeedTestItem.MixedConcurrencyCount, Global.SpeedTestConcurrencyCountMin);
|
||||
if (config.SpeedTestItem.UdpTestTarget.IsNullOrEmpty())
|
||||
{
|
||||
config.SpeedTestItem.UdpTestTarget = Global.UdpTestTargets.First();
|
||||
|
||||
@@ -47,7 +47,7 @@ public partial class OptionSettingWindow : WindowBase<OptionSettingViewModel>
|
||||
cmbCoreType7.ItemsSource = Global.CoreTypes;
|
||||
cmbCoreType9.ItemsSource = Global.CoreTypes;
|
||||
|
||||
cmbMixedConcurrencyCount.ItemsSource = Enumerable.Range(2, 7).ToList();
|
||||
cmbMixedConcurrencyCount.ItemsSource = Enumerable.Range(Global.SpeedTestConcurrencyCountMin, 20).ToList();
|
||||
cmbSpeedTestTimeout.ItemsSource = Enumerable.Range(2, 5).Select(i => i * 5).ToList();
|
||||
cmbSpeedTestUrl.ItemsSource = Global.SpeedTestUrls;
|
||||
cmbSpeedPingTestUrl.ItemsSource = Global.SpeedPingTestUrls;
|
||||
|
||||
@@ -43,7 +43,7 @@ public partial class OptionSettingWindow
|
||||
cmbCoreType7.ItemsSource = Global.CoreTypes;
|
||||
cmbCoreType9.ItemsSource = Global.CoreTypes;
|
||||
|
||||
cmbMixedConcurrencyCount.ItemsSource = Enumerable.Range(2, 7).ToList();
|
||||
cmbMixedConcurrencyCount.ItemsSource = Enumerable.Range(Global.SpeedTestConcurrencyCountMin, 20).ToList();
|
||||
cmbSpeedTestTimeout.ItemsSource = Enumerable.Range(2, 5).Select(i => i * 5).ToList();
|
||||
cmbSpeedTestUrl.ItemsSource = Global.SpeedTestUrls;
|
||||
cmbSpeedPingTestUrl.ItemsSource = Global.SpeedPingTestUrls;
|
||||
|
||||
Reference in New Issue
Block a user