pull/5550/head
Jabin Kong 2024-07-23 20:41:00 +08:00 committed by GitHub
parent ff5203a561
commit 35f3b5a50e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 49 additions and 2 deletions

View File

@ -29,7 +29,11 @@ namespace v2rayN.Handler
}
if (type == ESysProxyType.ForcedChange)
{
var strExceptions = $"<local>;{config.constItem.defIEProxyExceptions};{config.systemProxyExceptions}";
var strExceptions = "";
if (config.notProxyLocalAddress)
{
strExceptions = $"<local>;{config.constItem.defIEProxyExceptions};{config.systemProxyExceptions}";
}
var strProxy = string.Empty;
if (Utils.IsNullOrEmpty(config.systemProxyAdvancedProtocol))

View File

@ -14,6 +14,7 @@ namespace v2rayN.Models
public string subIndexId { get; set; }
public ESysProxyType sysProxyType { get; set; }
public string systemProxyExceptions { get; set; }
public bool notProxyLocalAddress { get; set; } = true;
public string systemProxyAdvancedProtocol { get; set; }
public ECoreType runningCoreType { get; set; }

View File

@ -2958,6 +2958,15 @@ namespace v2rayN.Resx {
return ResourceManager.GetString("TbSettingsRouteOnly", resourceCulture);
}
}
/// <summary>
/// 查找类似 NotProxyLocalAddress 的本地化字符串。
/// </summary>
public static string TbSettingsNotProxyLocalAddress {
get {
return ResourceManager.GetString("TbSettingsNotProxyLocalAddress", resourceCulture);
}
}
/// <summary>
/// 查找类似 Set Win10 UWP Loopback 的本地化字符串。

View File

@ -925,6 +925,9 @@
<data name="TbSettingsRouteOnly" xml:space="preserve">
<value>فقط مسیر</value>
</data>
<data name="TbSettingsNotProxyLocalAddress" xml:space="preserve">
<value>يەرلىك (Intranet) ئادرېسلارغا ۋاكالەتچى مۇلازىمېتىر ئىشلەتمەڭ</value>
</data>
<data name="menuMixedTestServer" xml:space="preserve">
<value>One-click test Latency and speed (Ctrl+E)</value>
</data>

View File

@ -928,6 +928,9 @@
<data name="TbSettingsRouteOnly" xml:space="preserve">
<value>RouteOnly</value>
</data>
<data name="TbSettingsNotProxyLocalAddress" xml:space="preserve">
<value>Do not use proxy servers for local (intranet) addresses</value>
</data>
<data name="menuMixedTestServer" xml:space="preserve">
<value>One-click multi test Latency and speed (Ctrl+E)</value>
</data>

View File

@ -934,6 +934,9 @@
<data name="TbSettingsRouteOnly" xml:space="preserve">
<value>Только маршрут</value>
</data>
<data name="TbSettingsNotProxyLocalAddress" xml:space="preserve">
<value>Не используйте прокси-серверы для локальных (интранет) адресов</value>
</data>
<data name="menuMixedTestServer" xml:space="preserve">
<value>Тест задержки и скорости всех серверов (Ctrl+E)</value>
</data>

View File

@ -928,6 +928,9 @@
<data name="TbSettingsRouteOnly" xml:space="preserve">
<value>RouteOnly</value>
</data>
<data name="TbSettingsNotProxyLocalAddress" xml:space="preserve">
<value>请勿将代理服务器用于本地Intranet地址</value>
</data>
<data name="menuMixedTestServer" xml:space="preserve">
<value>一键多线程测试延迟和速度 (Ctrl+E)</value>
</data>

View File

@ -928,6 +928,9 @@
<data name="TbSettingsRouteOnly" xml:space="preserve">
<value>RouteOnly</value>
</data>
<data name="TbSettingsNotProxyLocalAddress" xml:space="preserve">
<value>請勿將代理伺服器用於本機Intranet位址</value>
</data>
<data name="menuMixedTestServer" xml:space="preserve">
<value>一鍵多執行緒測試延遲和速度 (Ctrl+E)</value>
</data>

View File

@ -80,6 +80,7 @@ namespace v2rayN.ViewModels
#region System proxy
[Reactive] public bool notProxyLocalAddress { get; set; }
[Reactive] public string systemProxyAdvancedProtocol { get; set; }
[Reactive] public string systemProxyExceptions { get; set; }
@ -178,6 +179,7 @@ namespace v2rayN.ViewModels
#region System proxy
notProxyLocalAddress = _config.notProxyLocalAddress;
systemProxyAdvancedProtocol = _config.systemProxyAdvancedProtocol;
systemProxyExceptions = _config.systemProxyExceptions;
@ -339,6 +341,7 @@ namespace v2rayN.ViewModels
//systemProxy
_config.systemProxyExceptions = systemProxyExceptions;
_config.notProxyLocalAddress = notProxyLocalAddress;
_config.systemProxyAdvancedProtocol = systemProxyAdvancedProtocol;
//tun mode

View File

@ -855,13 +855,27 @@
<StackPanel DockPanel.Dock="Bottom" Orientation="Vertical">
<TextBlock
Grid.Row="3"
Grid.Column="0"
Margin="{StaticResource SettingItemMargin}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbSettingsNotProxyLocalAddress}" />
<ToggleButton
x:Name="tognotProxyLocalAddress"
Grid.Row="3"
Grid.Column="1"
Margin="{StaticResource SettingItemMargin}"
HorizontalAlignment="Left" />
<TextBlock
Grid.Row="4"
Margin="{StaticResource SettingItemMargin}"
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbSettingsAdvancedProtocol}" />
<ComboBox
x:Name="cmbsystemProxyAdvancedProtocol"
Grid.Row="4"
Grid.Row="5"
MinWidth="200"
Margin="{StaticResource SettingItemMargin}"
materialDesign:HintAssist.Hint="Protocol"

View File

@ -150,6 +150,7 @@ namespace v2rayN.Views
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.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);