From 184a7c11b32205dc24f6ba2715f14e7b925b14d3 Mon Sep 17 00:00:00 2001
From: 2dust <31833384+2dust@users.noreply.github.com>
Date: Wed, 18 Nov 2026 16:42:35 +0800
Subject: [PATCH] Adjust settings interface
---
v2rayN/ServiceLib/Resx/ResUI.Designer.cs | 9 +
v2rayN/ServiceLib/Resx/ResUI.resx | 3 +
v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx | 3 +
v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx | 3 +
.../ViewModels/OptionSettingViewModel.cs | 50 ++-
.../Views/OptionSettingWindow.axaml | 320 +++++++-------
.../Views/OptionSettingWindow.axaml.cs | 13 +-
v2rayN/v2rayN/Views/OptionSettingWindow.xaml | 402 +++++++-----------
.../v2rayN/Views/OptionSettingWindow.xaml.cs | 13 +-
9 files changed, 374 insertions(+), 442 deletions(-)
diff --git a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
index c982e32d..f9df5662 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
+++ b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
@@ -5166,6 +5166,15 @@ namespace ServiceLib.Resx {
}
}
+ ///
+ /// 查找类似 Speedtest Settings 的本地化字符串。
+ ///
+ public static string TbSpeedtestSettings {
+ get {
+ return ResourceManager.GetString("TbSpeedtestSettings", resourceCulture);
+ }
+ }
+
///
/// 查找类似 Spider X 的本地化字符串。
///
diff --git a/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayN/ServiceLib/Resx/ResUI.resx
index 5f8b0061..cadb6595 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.resx
@@ -1971,4 +1971,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
XDRIVE remote folder
+
+ Speedtest Settings
+
\ No newline at end of file
diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx
index 17506416..6fff0a28 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx
@@ -1963,4 +1963,7 @@
XDRIVE 远端目录
+
+ 测速设置
+
\ No newline at end of file
diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx
index 02dcffab..73762b07 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx
@@ -1972,4 +1972,7 @@
XDRIVE 遠端目錄
+
+ 測速設定
+
\ No newline at end of file
diff --git a/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs b/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs
index b291b54d..2b24d1f6 100644
--- a/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs
+++ b/v2rayN/ServiceLib/ViewModels/OptionSettingViewModel.cs
@@ -1,5 +1,3 @@
-
-
namespace ServiceLib.ViewModels;
public partial class OptionSettingViewModel : MyReactiveObject, ICloseable
@@ -54,22 +52,27 @@ public partial class OptionSettingViewModel : MyReactiveObject, ICloseable
[Reactive] public partial bool DoubleClick2Activate { get; set; }
[Reactive] public partial int AutoUpdateInterval { get; set; }
[Reactive] public partial string CurrentFontFamily { get; set; }
- [Reactive] public partial int SpeedTestTimeout { get; set; }
- [Reactive] public partial string SpeedTestUrl { get; set; }
- [Reactive] public partial string SpeedPingTestUrl { get; set; }
- [Reactive] public partial string UdpTestTarget { get; set; }
- [Reactive] public partial int MixedConcurrencyCount { get; set; }
[Reactive] public partial bool EnableHWA { get; set; }
[Reactive] public partial string SubConvertUrl { get; set; }
[Reactive] public partial int MainGirdOrientation { get; set; }
[Reactive] public partial string GeoFileSourceUrl { get; set; }
[Reactive] public partial string SrsFileSourceUrl { get; set; }
[Reactive] public partial string RoutingRulesSourceUrl { get; set; }
- [Reactive] public partial string IPAPIUrl { get; set; }
[Reactive] public partial string RootCertProvider { get; set; }
#endregion UI
+ #region SpeedTest
+
+ [Reactive] public partial int SpeedTestTimeout { get; set; }
+ [Reactive] public partial string SpeedTestUrl { get; set; }
+ [Reactive] public partial string SpeedPingTestUrl { get; set; }
+ [Reactive] public partial string UdpTestTarget { get; set; }
+ [Reactive] public partial int MixedConcurrencyCount { get; set; }
+ [Reactive] public partial string IPAPIUrl { get; set; }
+
+ #endregion SpeedTest
+
#region UI visibility
[Reactive] public partial bool BlIsWindows { get; set; }
@@ -188,22 +191,27 @@ public partial class OptionSettingViewModel : MyReactiveObject, ICloseable
DoubleClick2Activate = _config.UiItem.DoubleClick2Activate;
AutoUpdateInterval = _config.GuiItem.AutoUpdateInterval;
CurrentFontFamily = _config.UiItem.CurrentFontFamily;
- SpeedTestTimeout = _config.SpeedTestItem.SpeedTestTimeout;
- SpeedTestUrl = _config.SpeedTestItem.SpeedTestUrl;
- MixedConcurrencyCount = _config.SpeedTestItem.MixedConcurrencyCount;
- SpeedPingTestUrl = _config.SpeedTestItem.SpeedPingTestUrl;
- UdpTestTarget = _config.SpeedTestItem.UdpTestTarget;
EnableHWA = _config.GuiItem.EnableHWA;
SubConvertUrl = _config.ConstItem.SubConvertUrl;
MainGirdOrientation = (int)_config.UiItem.MainGirdOrientation;
GeoFileSourceUrl = _config.ConstItem.GeoSourceUrl;
SrsFileSourceUrl = _config.ConstItem.SrsSourceUrl;
RoutingRulesSourceUrl = _config.ConstItem.RouteRulesTemplateSourceUrl;
- IPAPIUrl = _config.SpeedTestItem.IPAPIUrl;
RootCertProvider = _config.GuiItem.RootCertProvider;
#endregion UI
+ #region SpeedTest
+
+ SpeedTestTimeout = _config.SpeedTestItem.SpeedTestTimeout;
+ SpeedTestUrl = _config.SpeedTestItem.SpeedTestUrl;
+ MixedConcurrencyCount = _config.SpeedTestItem.MixedConcurrencyCount;
+ SpeedPingTestUrl = _config.SpeedTestItem.SpeedPingTestUrl;
+ UdpTestTarget = _config.SpeedTestItem.UdpTestTarget;
+ IPAPIUrl = _config.SpeedTestItem.IPAPIUrl;
+
+ #endregion SpeedTest
+
#region System proxy
NotProxyLocalAddress = _config.SystemProxyItem.NotProxyLocalAddress;
@@ -367,20 +375,22 @@ public partial class OptionSettingViewModel : MyReactiveObject, ICloseable
_config.UiItem.EnableDragDropSort = EnableDragDropSort;
_config.UiItem.DoubleClick2Activate = DoubleClick2Activate;
_config.UiItem.CurrentFontFamily = CurrentFontFamily;
- _config.SpeedTestItem.SpeedTestTimeout = SpeedTestTimeout;
- _config.SpeedTestItem.MixedConcurrencyCount = MixedConcurrencyCount;
- _config.SpeedTestItem.SpeedTestUrl = SpeedTestUrl;
- _config.SpeedTestItem.SpeedPingTestUrl = SpeedPingTestUrl;
- _config.SpeedTestItem.UdpTestTarget = UdpTestTarget;
_config.GuiItem.EnableHWA = EnableHWA;
_config.ConstItem.SubConvertUrl = SubConvertUrl;
_config.UiItem.MainGirdOrientation = (EGirdOrientation)MainGirdOrientation;
_config.ConstItem.GeoSourceUrl = GeoFileSourceUrl;
_config.ConstItem.SrsSourceUrl = SrsFileSourceUrl;
_config.ConstItem.RouteRulesTemplateSourceUrl = RoutingRulesSourceUrl;
- _config.SpeedTestItem.IPAPIUrl = IPAPIUrl;
_config.GuiItem.RootCertProvider = RootCertProvider;
+ // SpeedTest
+ _config.SpeedTestItem.SpeedTestTimeout = SpeedTestTimeout;
+ _config.SpeedTestItem.MixedConcurrencyCount = MixedConcurrencyCount;
+ _config.SpeedTestItem.SpeedTestUrl = SpeedTestUrl;
+ _config.SpeedTestItem.SpeedPingTestUrl = SpeedPingTestUrl;
+ _config.SpeedTestItem.UdpTestTarget = UdpTestTarget;
+ _config.SpeedTestItem.IPAPIUrl = IPAPIUrl;
+
//systemProxy
_config.SystemProxyItem.SystemProxyExceptions = SystemProxyExceptions;
_config.SystemProxyItem.NotProxyLocalAddress = NotProxyLocalAddress;
diff --git a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml
index 240fd4b5..c487c693 100644
--- a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml
+++ b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml
@@ -554,7 +554,7 @@
+ RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
-->
+
+
+
-
+
+
+ VerticalAlignment="Center"
+ Text="{x:Static resx:ResUI.TbRootCertificateProviderTip}"
+ TextWrapping="Wrap" />
+ Text="{x:Static resx:ResUI.TbSettingsCurrentFontFamily}" />
+ Margin="{StaticResource Margin4}"
+ IsEditable="True" />
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
this.Bind(ViewModel, vm => vm.DoubleClick2Activate, v => v.togDoubleClick2Activate.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.AutoUpdateInterval, v => v.txtautoUpdateInterval.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.CurrentFontFamily, v => v.cmbcurrentFontFamily.Text).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.SpeedTestTimeout, v => v.cmbSpeedTestTimeout.SelectedValue).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.SpeedTestUrl, v => v.cmbSpeedTestUrl.Text).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.SpeedPingTestUrl, v => v.cmbSpeedPingTestUrl.Text).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.UdpTestTarget, v => v.cmbUdpTestTarget.Text).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.MixedConcurrencyCount, v => v.cmbMixedConcurrencyCount.SelectedValue).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SubConvertUrl, v => v.cmbSubConvertUrl.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.MainGirdOrientation, view => view.cmbMainGirdOrientation.SelectedIndex).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.GeoFileSourceUrl, v => v.cmbGetFilesSourceUrl.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SrsFileSourceUrl, v => v.cmbSrsFilesSourceUrl.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.RoutingRulesSourceUrl, v => v.cmbRoutingRulesSourceUrl.Text).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.IPAPIUrl, v => v.cmbIPAPIUrl.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.RootCertProvider, v => v.cmbRootCertificateProvider.SelectedValue).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.SpeedTestTimeout, v => v.cmbSpeedTestTimeout.SelectedValue).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.SpeedTestUrl, v => v.cmbSpeedTestUrl.Text).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.SpeedPingTestUrl, v => v.cmbSpeedPingTestUrl.Text).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.UdpTestTarget, v => v.cmbUdpTestTarget.Text).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.MixedConcurrencyCount, v => v.cmbMixedConcurrencyCount.SelectedValue).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.IPAPIUrl, v => v.cmbIPAPIUrl.Text).DisposeWith(disposables);
+
this.Bind(ViewModel, vm => vm.NotProxyLocalAddress, v => v.tognotProxyLocalAddress.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SystemProxyAdvancedProtocol, v => v.cmbsystemProxyAdvancedProtocol.SelectedValue).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SystemProxyExceptions, v => v.txtsystemProxyExceptions.Text).DisposeWith(disposables);
diff --git a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml
index 697b18d7..d5e6c25b 100644
--- a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml
+++ b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml
@@ -617,126 +617,6 @@
-
-
@@ -760,15 +640,6 @@
-
-
-
-
-
-
-
-
-
@@ -935,23 +806,7 @@
TextWrapping="Wrap" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs
index 29d0ff7e..4a8a1aa9 100644
--- a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs
+++ b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs
@@ -105,20 +105,21 @@ public partial class OptionSettingWindow
this.Bind(ViewModel, vm => vm.DoubleClick2Activate, v => v.togDoubleClick2Activate.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.AutoUpdateInterval, v => v.txtautoUpdateInterval.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.CurrentFontFamily, v => v.cmbcurrentFontFamily.Text).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.SpeedTestTimeout, v => v.cmbSpeedTestTimeout.Text).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.SpeedTestUrl, v => v.cmbSpeedTestUrl.Text).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.SpeedPingTestUrl, v => v.cmbSpeedPingTestUrl.Text).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.UdpTestTarget, v => v.cmbUdpTestTarget.Text).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.MixedConcurrencyCount, v => v.cmbMixedConcurrencyCount.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.EnableHWA, v => v.togEnableHWA.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SubConvertUrl, v => v.cmbSubConvertUrl.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.MainGirdOrientation, v => v.cmbMainGirdOrientation.SelectedIndex).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.GeoFileSourceUrl, v => v.cmbGetFilesSourceUrl.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SrsFileSourceUrl, v => v.cmbSrsFilesSourceUrl.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.RoutingRulesSourceUrl, v => v.cmbRoutingRulesSourceUrl.Text).DisposeWith(disposables);
- this.Bind(ViewModel, vm => vm.IPAPIUrl, v => v.cmbIPAPIUrl.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.RootCertProvider, v => v.cmbRootCertificateProvider.Text).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.SpeedTestTimeout, v => v.cmbSpeedTestTimeout.Text).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.SpeedTestUrl, v => v.cmbSpeedTestUrl.Text).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.SpeedPingTestUrl, v => v.cmbSpeedPingTestUrl.Text).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.UdpTestTarget, v => v.cmbUdpTestTarget.Text).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.MixedConcurrencyCount, v => v.cmbMixedConcurrencyCount.Text).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.IPAPIUrl, v => v.cmbIPAPIUrl.Text).DisposeWith(disposables);
+
this.Bind(ViewModel, vm => vm.NotProxyLocalAddress, v => v.tognotProxyLocalAddress.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SystemProxyAdvancedProtocol, v => v.cmbsystemProxyAdvancedProtocol.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SystemProxyExceptions, v => v.txtsystemProxyExceptions.Text).DisposeWith(disposables);