mirror of
				https://github.com/2dust/v2rayN.git
				synced 2025-10-27 02:34:41 +00:00 
			
		
		
		
	1
This commit is contained in:
		
							parent
							
								
									c3c1ced309
								
							
						
					
					
						commit
						c4906d4a1f
					
				
					 11 changed files with 49 additions and 2 deletions
				
			
		|  | @ -29,7 +29,11 @@ namespace v2rayN.Handler | ||||||
|                 } |                 } | ||||||
|                 if (type == ESysProxyType.ForcedChange) |                 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; |                     var strProxy = string.Empty; | ||||||
|                     if (Utils.IsNullOrEmpty(config.systemProxyAdvancedProtocol)) |                     if (Utils.IsNullOrEmpty(config.systemProxyAdvancedProtocol)) | ||||||
|  |  | ||||||
|  | @ -14,6 +14,7 @@ namespace v2rayN.Models | ||||||
|         public string subIndexId { get; set; } |         public string subIndexId { get; set; } | ||||||
|         public ESysProxyType sysProxyType { get; set; } |         public ESysProxyType sysProxyType { get; set; } | ||||||
|         public string systemProxyExceptions { get; set; } |         public string systemProxyExceptions { get; set; } | ||||||
|  |         public bool notProxyLocalAddress { get; set; } = true; | ||||||
|         public string systemProxyAdvancedProtocol { get; set; } |         public string systemProxyAdvancedProtocol { get; set; } | ||||||
| 
 | 
 | ||||||
|         public ECoreType runningCoreType { get; set; } |         public ECoreType runningCoreType { get; set; } | ||||||
|  |  | ||||||
							
								
								
									
										9
									
								
								v2rayN/v2rayN/Resx/ResUI.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										9
									
								
								v2rayN/v2rayN/Resx/ResUI.Designer.cs
									
									
									
										generated
									
									
									
								
							|  | @ -2959,6 +2959,15 @@ namespace v2rayN.Resx { | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         /// <summary> | ||||||
|  |         ///   查找类似 NotProxyLocalAddress 的本地化字符串。 | ||||||
|  |         /// </summary> | ||||||
|  |         public static string TbSettingsNotProxyLocalAddress { | ||||||
|  |             get { | ||||||
|  |                 return ResourceManager.GetString("TbSettingsNotProxyLocalAddress", resourceCulture); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |          | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         ///   查找类似 Set Win10 UWP Loopback 的本地化字符串。 |         ///   查找类似 Set Win10 UWP Loopback 的本地化字符串。 | ||||||
|         /// </summary> |         /// </summary> | ||||||
|  |  | ||||||
|  | @ -925,6 +925,9 @@ | ||||||
|   <data name="TbSettingsRouteOnly" xml:space="preserve"> |   <data name="TbSettingsRouteOnly" xml:space="preserve"> | ||||||
|     <value>فقط مسیر</value> |     <value>فقط مسیر</value> | ||||||
|   </data> |   </data> | ||||||
|  |   <data name="TbSettingsNotProxyLocalAddress" xml:space="preserve"> | ||||||
|  |     <value>يەرلىك (Intranet) ئادرېسلارغا ۋاكالەتچى مۇلازىمېتىر ئىشلەتمەڭ</value> | ||||||
|  |   </data> | ||||||
|   <data name="menuMixedTestServer" xml:space="preserve"> |   <data name="menuMixedTestServer" xml:space="preserve"> | ||||||
|     <value>One-click test Latency and speed (Ctrl+E)</value> |     <value>One-click test Latency and speed (Ctrl+E)</value> | ||||||
|   </data> |   </data> | ||||||
|  |  | ||||||
|  | @ -928,6 +928,9 @@ | ||||||
|   <data name="TbSettingsRouteOnly" xml:space="preserve"> |   <data name="TbSettingsRouteOnly" xml:space="preserve"> | ||||||
|     <value>RouteOnly</value> |     <value>RouteOnly</value> | ||||||
|   </data> |   </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"> |   <data name="menuMixedTestServer" xml:space="preserve"> | ||||||
|     <value>One-click multi test Latency and speed (Ctrl+E)</value> |     <value>One-click multi test Latency and speed (Ctrl+E)</value> | ||||||
|   </data> |   </data> | ||||||
|  |  | ||||||
|  | @ -934,6 +934,9 @@ | ||||||
|   <data name="TbSettingsRouteOnly" xml:space="preserve"> |   <data name="TbSettingsRouteOnly" xml:space="preserve"> | ||||||
|     <value>Только маршрут</value> |     <value>Только маршрут</value> | ||||||
|   </data> |   </data> | ||||||
|  |   <data name="TbSettingsNotProxyLocalAddress" xml:space="preserve"> | ||||||
|  |     <value>Не используйте прокси-серверы для локальных (интранет) адресов</value> | ||||||
|  |   </data> | ||||||
|   <data name="menuMixedTestServer" xml:space="preserve"> |   <data name="menuMixedTestServer" xml:space="preserve"> | ||||||
|     <value>Тест задержки и скорости всех серверов (Ctrl+E)</value> |     <value>Тест задержки и скорости всех серверов (Ctrl+E)</value> | ||||||
|   </data> |   </data> | ||||||
|  |  | ||||||
|  | @ -928,6 +928,9 @@ | ||||||
|   <data name="TbSettingsRouteOnly" xml:space="preserve"> |   <data name="TbSettingsRouteOnly" xml:space="preserve"> | ||||||
|     <value>RouteOnly</value> |     <value>RouteOnly</value> | ||||||
|   </data> |   </data> | ||||||
|  |   <data name="TbSettingsNotProxyLocalAddress" xml:space="preserve"> | ||||||
|  |     <value>请勿将代理服务器用于本地(Intranet)地址</value> | ||||||
|  |   </data> | ||||||
|   <data name="menuMixedTestServer" xml:space="preserve"> |   <data name="menuMixedTestServer" xml:space="preserve"> | ||||||
|     <value>一键多线程测试延迟和速度 (Ctrl+E)</value> |     <value>一键多线程测试延迟和速度 (Ctrl+E)</value> | ||||||
|   </data> |   </data> | ||||||
|  |  | ||||||
|  | @ -928,6 +928,9 @@ | ||||||
|   <data name="TbSettingsRouteOnly" xml:space="preserve"> |   <data name="TbSettingsRouteOnly" xml:space="preserve"> | ||||||
|     <value>RouteOnly</value> |     <value>RouteOnly</value> | ||||||
|   </data> |   </data> | ||||||
|  |   <data name="TbSettingsNotProxyLocalAddress" xml:space="preserve"> | ||||||
|  |     <value>請勿將代理伺服器用於本機(Intranet)位址</value> | ||||||
|  |   </data> | ||||||
|   <data name="menuMixedTestServer" xml:space="preserve"> |   <data name="menuMixedTestServer" xml:space="preserve"> | ||||||
|     <value>一鍵多執行緒測試延遲和速度 (Ctrl+E)</value> |     <value>一鍵多執行緒測試延遲和速度 (Ctrl+E)</value> | ||||||
|   </data> |   </data> | ||||||
|  |  | ||||||
|  | @ -80,6 +80,7 @@ namespace v2rayN.ViewModels | ||||||
| 
 | 
 | ||||||
|         #region System proxy |         #region System proxy | ||||||
| 
 | 
 | ||||||
|  |         [Reactive] public bool notProxyLocalAddress { get; set; } | ||||||
|         [Reactive] public string systemProxyAdvancedProtocol { get; set; } |         [Reactive] public string systemProxyAdvancedProtocol { get; set; } | ||||||
|         [Reactive] public string systemProxyExceptions { get; set; } |         [Reactive] public string systemProxyExceptions { get; set; } | ||||||
| 
 | 
 | ||||||
|  | @ -178,6 +179,7 @@ namespace v2rayN.ViewModels | ||||||
| 
 | 
 | ||||||
|             #region System proxy |             #region System proxy | ||||||
| 
 | 
 | ||||||
|  |             notProxyLocalAddress = _config.notProxyLocalAddress; | ||||||
|             systemProxyAdvancedProtocol = _config.systemProxyAdvancedProtocol; |             systemProxyAdvancedProtocol = _config.systemProxyAdvancedProtocol; | ||||||
|             systemProxyExceptions = _config.systemProxyExceptions; |             systemProxyExceptions = _config.systemProxyExceptions; | ||||||
| 
 | 
 | ||||||
|  | @ -339,6 +341,7 @@ namespace v2rayN.ViewModels | ||||||
| 
 | 
 | ||||||
|             //systemProxy |             //systemProxy | ||||||
|             _config.systemProxyExceptions = systemProxyExceptions; |             _config.systemProxyExceptions = systemProxyExceptions; | ||||||
|  |             _config.notProxyLocalAddress = notProxyLocalAddress; | ||||||
|             _config.systemProxyAdvancedProtocol = systemProxyAdvancedProtocol; |             _config.systemProxyAdvancedProtocol = systemProxyAdvancedProtocol; | ||||||
| 
 | 
 | ||||||
|             //tun mode |             //tun mode | ||||||
|  |  | ||||||
|  | @ -855,13 +855,27 @@ | ||||||
|                     <StackPanel DockPanel.Dock="Bottom" Orientation="Vertical"> |                     <StackPanel DockPanel.Dock="Bottom" Orientation="Vertical"> | ||||||
|                         <TextBlock |                         <TextBlock | ||||||
|                             Grid.Row="3" |                             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}" |                             Margin="{StaticResource SettingItemMargin}" | ||||||
|                             VerticalAlignment="Center" |                             VerticalAlignment="Center" | ||||||
|                             Style="{StaticResource ToolbarTextBlock}" |                             Style="{StaticResource ToolbarTextBlock}" | ||||||
|                             Text="{x:Static resx:ResUI.TbSettingsAdvancedProtocol}" /> |                             Text="{x:Static resx:ResUI.TbSettingsAdvancedProtocol}" /> | ||||||
|                         <ComboBox |                         <ComboBox | ||||||
|                             x:Name="cmbsystemProxyAdvancedProtocol" |                             x:Name="cmbsystemProxyAdvancedProtocol" | ||||||
|                             Grid.Row="4" |                             Grid.Row="5" | ||||||
|                             MinWidth="200" |                             MinWidth="200" | ||||||
|                             Margin="{StaticResource SettingItemMargin}" |                             Margin="{StaticResource SettingItemMargin}" | ||||||
|                             materialDesign:HintAssist.Hint="Protocol" |                             materialDesign:HintAssist.Hint="Protocol" | ||||||
|  |  | ||||||
|  | @ -150,6 +150,7 @@ namespace v2rayN.Views | ||||||
|                 this.Bind(ViewModel, vm => vm.SubConvertUrl, v => v.cmbSubConvertUrl.Text).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.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.systemProxyAdvancedProtocol, v => v.cmbsystemProxyAdvancedProtocol.Text).DisposeWith(disposables); | ||||||
|                 this.Bind(ViewModel, vm => vm.systemProxyExceptions, v => v.txtsystemProxyExceptions.Text).DisposeWith(disposables); |                 this.Bind(ViewModel, vm => vm.systemProxyExceptions, v => v.txtsystemProxyExceptions.Text).DisposeWith(disposables); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Jabin Kong
						Jabin Kong