mirror of
https://github.com/2dust/v2rayN.git
synced 2026-11-01 10:05:00 +03:00
Add Route Exclude Address setting and UI for sing-box tun
https://github.com/2dust/v2rayN/issues/9456
This commit is contained in:
@@ -148,6 +148,7 @@ public class TunModeItem
|
|||||||
public bool EnableIPv6Address { get; set; }
|
public bool EnableIPv6Address { get; set; }
|
||||||
public string IcmpRouting { get; set; }
|
public string IcmpRouting { get; set; }
|
||||||
public bool EnableLegacyProtect { get; set; }
|
public bool EnableLegacyProtect { get; set; }
|
||||||
|
public List<string>? RouteExcludeAddress { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
|||||||
@@ -110,6 +110,7 @@ public class Inbound4Sbox
|
|||||||
public bool? endpoint_independent_nat { get; set; }
|
public bool? endpoint_independent_nat { get; set; }
|
||||||
public string? stack { get; set; }
|
public string? stack { get; set; }
|
||||||
public List<User4Sbox> users { get; set; }
|
public List<User4Sbox> users { get; set; }
|
||||||
|
public List<string>? route_exclude_address { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class User4Sbox
|
public class User4Sbox
|
||||||
|
|||||||
Generated
+29
-11
@@ -1,4 +1,4 @@
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// 此代码由工具生成。
|
// 此代码由工具生成。
|
||||||
// 运行时版本:4.0.30319.42000
|
// 运行时版本:4.0.30319.42000
|
||||||
@@ -3005,16 +3005,7 @@ namespace ServiceLib.Resx {
|
|||||||
return ResourceManager.GetString("TbEchConfigList", resourceCulture);
|
return ResourceManager.GetString("TbEchConfigList", resourceCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Verify Peer Cert By Name 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string TbVerifyPeerCertByName {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("TbVerifyPeerCertByName", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Edit 的本地化字符串。
|
/// 查找类似 Edit 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -3546,6 +3537,24 @@ namespace ServiceLib.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Route Exclude Address 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string TbRouteExcludeAddress {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TbRouteExcludeAddress", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Use commas (,) to separate. 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string TbRouteExcludeAddressTip {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TbRouteExcludeAddressTip", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 tun: TUN inbound, socks: local port, socks2: second local port, socks3: LAN port 的本地化字符串。
|
/// 查找类似 tun: TUN inbound, socks: local port, socks2: second local port, socks3: LAN port 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -4716,6 +4725,15 @@ namespace ServiceLib.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Verify Peer Cert By Name 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string TbVerifyPeerCertByName {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TbVerifyPeerCertByName", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 The delay: {0} ms, {1} 的本地化字符串。
|
/// 查找类似 The delay: {0} ms, {1} 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1752,4 +1752,10 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||||||
<data name="MsgAllowInsecureDeprecated" xml:space="preserve">
|
<data name="MsgAllowInsecureDeprecated" xml:space="preserve">
|
||||||
<value>Warning: Xray will disable allowInsecure (skip certificate verification) in August 2026. Please switch to pinnedPeerCertSha256 (fixed certificate fingerprint) as soon as possible. allowInsecure will not be usable after its expiration.</value>
|
<value>Warning: Xray will disable allowInsecure (skip certificate verification) in August 2026. Please switch to pinnedPeerCertSha256 (fixed certificate fingerprint) as soon as possible. allowInsecure will not be usable after its expiration.</value>
|
||||||
</data>
|
</data>
|
||||||
</root>
|
<data name="TbRouteExcludeAddress" xml:space="preserve">
|
||||||
|
<value>Route Exclude Address</value>
|
||||||
|
</data>
|
||||||
|
<data name="TbRouteExcludeAddressTip" xml:space="preserve">
|
||||||
|
<value>Use commas (,) to separate.</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
@@ -1749,4 +1749,10 @@
|
|||||||
<data name="TbVerifyPeerCertByName" xml:space="preserve">
|
<data name="TbVerifyPeerCertByName" xml:space="preserve">
|
||||||
<value>Verify Peer Cert By Name</value>
|
<value>Verify Peer Cert By Name</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="TbRouteExcludeAddress" xml:space="preserve">
|
||||||
|
<value>路由排除地址</value>
|
||||||
|
</data>
|
||||||
|
<data name="TbRouteExcludeAddressTip" xml:space="preserve">
|
||||||
|
<value>使用逗号 (,) 分隔</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -1749,4 +1749,10 @@
|
|||||||
<data name="TbVerifyPeerCertByName" xml:space="preserve">
|
<data name="TbVerifyPeerCertByName" xml:space="preserve">
|
||||||
<value>Verify Peer Cert By Name</value>
|
<value>Verify Peer Cert By Name</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="TbRouteExcludeAddress" xml:space="preserve">
|
||||||
|
<value>路由排除位址</value>
|
||||||
|
</data>
|
||||||
|
<data name="TbRouteExcludeAddressTip" xml:space="preserve">
|
||||||
|
<value>使用逗號 (,) 分隔</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -71,6 +71,7 @@ public partial class CoreConfigSingboxService
|
|||||||
{
|
{
|
||||||
tunInbound.address = ["172.18.0.1/30"];
|
tunInbound.address = ["172.18.0.1/30"];
|
||||||
}
|
}
|
||||||
|
tunInbound.route_exclude_address = _config.TunModeItem.RouteExcludeAddress;
|
||||||
|
|
||||||
_coreConfig.inbounds.Add(tunInbound);
|
_coreConfig.inbounds.Add(tunInbound);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||||||
[Reactive] public bool TunEnableIPv6Address { get; set; }
|
[Reactive] public bool TunEnableIPv6Address { get; set; }
|
||||||
[Reactive] public string TunIcmpRouting { get; set; }
|
[Reactive] public string TunIcmpRouting { get; set; }
|
||||||
[Reactive] public bool TunEnableLegacyProtect { get; set; }
|
[Reactive] public bool TunEnableLegacyProtect { get; set; }
|
||||||
|
[Reactive] public string TunRouteExcludeAddress { get; set; }
|
||||||
|
|
||||||
#endregion Tun mode
|
#endregion Tun mode
|
||||||
|
|
||||||
@@ -228,6 +229,7 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||||||
TunEnableIPv6Address = _config.TunModeItem.EnableIPv6Address;
|
TunEnableIPv6Address = _config.TunModeItem.EnableIPv6Address;
|
||||||
TunIcmpRouting = _config.TunModeItem.IcmpRouting;
|
TunIcmpRouting = _config.TunModeItem.IcmpRouting;
|
||||||
TunEnableLegacyProtect = _config.TunModeItem.EnableLegacyProtect;
|
TunEnableLegacyProtect = _config.TunModeItem.EnableLegacyProtect;
|
||||||
|
TunRouteExcludeAddress = Utils.List2String(_config.TunModeItem.RouteExcludeAddress, true);
|
||||||
|
|
||||||
#endregion Tun mode
|
#endregion Tun mode
|
||||||
|
|
||||||
@@ -397,6 +399,7 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||||||
_config.TunModeItem.EnableIPv6Address = TunEnableIPv6Address;
|
_config.TunModeItem.EnableIPv6Address = TunEnableIPv6Address;
|
||||||
_config.TunModeItem.IcmpRouting = TunIcmpRouting;
|
_config.TunModeItem.IcmpRouting = TunIcmpRouting;
|
||||||
_config.TunModeItem.EnableLegacyProtect = TunEnableLegacyProtect;
|
_config.TunModeItem.EnableLegacyProtect = TunEnableLegacyProtect;
|
||||||
|
_config.TunModeItem.RouteExcludeAddress = Utils.String2List(TunRouteExcludeAddress);
|
||||||
|
|
||||||
//coreType
|
//coreType
|
||||||
await SaveCoreType();
|
await SaveCoreType();
|
||||||
|
|||||||
@@ -818,107 +818,132 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem Header="{x:Static resx:ResUI.TbSettingsTunMode}">
|
<TabItem Header="{x:Static resx:ResUI.TbSettingsTunMode}">
|
||||||
<Grid
|
<ScrollViewer VerticalScrollBarVisibility="Visible">
|
||||||
Margin="{StaticResource Margin4}"
|
<Grid
|
||||||
ColumnDefinitions="Auto,Auto,Auto"
|
Margin="{StaticResource Margin4}"
|
||||||
DockPanel.Dock="Top"
|
ColumnDefinitions="Auto,Auto,Auto"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
|
DockPanel.Dock="Top"
|
||||||
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsTunAutoRoute}" />
|
Text="{x:Static resx:ResUI.TbSettingsTunAutoRoute}" />
|
||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
x:Name="togAutoRoute"
|
x:Name="togAutoRoute"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsTunStrictRoute}" />
|
Text="{x:Static resx:ResUI.TbSettingsTunStrictRoute}" />
|
||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
x:Name="togStrictRoute"
|
x:Name="togStrictRoute"
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsTunStack}" />
|
Text="{x:Static resx:ResUI.TbSettingsTunStack}" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="cmbStack"
|
x:Name="cmbStack"
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="200"
|
Width="200"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="5"
|
Grid.Row="5"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{x:Static resx:ResUI.TbMtu}" />
|
Text="{x:Static resx:ResUI.TbMtu}" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="cmbMtu"
|
x:Name="cmbMtu"
|
||||||
Grid.Row="5"
|
Grid.Row="5"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="200"
|
Width="200"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
IsEditable="True" />
|
IsEditable="True" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="6"
|
Grid.Row="6"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{x:Static resx:ResUI.TbIcmpRoutingPolicy}" />
|
Text="{x:Static resx:ResUI.TbIcmpRoutingPolicy}" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="cmbIcmpRoutingPolicy"
|
x:Name="cmbIcmpRoutingPolicy"
|
||||||
Grid.Row="6"
|
Grid.Row="6"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="200"
|
Width="200"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="7"
|
Grid.Row="7"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsEnableIPv6Address}" />
|
Text="{x:Static resx:ResUI.TbSettingsEnableIPv6Address}" />
|
||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
x:Name="togEnableIPv6Address"
|
x:Name="togEnableIPv6Address"
|
||||||
Grid.Row="7"
|
Grid.Row="7"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="8"
|
Grid.Row="8"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Text="{x:Static resx:ResUI.TbLegacyProtect}" />
|
Text="{x:Static resx:ResUI.TbLegacyProtect}" />
|
||||||
<ToggleSwitch
|
<ToggleSwitch
|
||||||
x:Name="togEnableLegacyProtect"
|
x:Name="togEnableLegacyProtect"
|
||||||
Grid.Row="8"
|
Grid.Row="8"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
</Grid>
|
|
||||||
|
<TextBlock
|
||||||
|
Grid.Row="9"
|
||||||
|
Grid.Column="0"
|
||||||
|
Margin="{StaticResource Margin4}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Text="{x:Static resx:ResUI.TbRouteExcludeAddress}" />
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtRouteExcludeAddress"
|
||||||
|
Grid.Row="9"
|
||||||
|
Grid.Column="1"
|
||||||
|
Width="200"
|
||||||
|
Margin="{StaticResource Margin4}"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
Classes="TextArea"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
<TextBlock
|
||||||
|
Grid.Row="9"
|
||||||
|
Grid.Column="2"
|
||||||
|
Margin="{StaticResource Margin4}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Text="{x:Static resx:ResUI.TbRouteExcludeAddressTip}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem Header="{x:Static resx:ResUI.TbSettingsCoreType}">
|
<TabItem Header="{x:Static resx:ResUI.TbSettingsCoreType}">
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ public partial class OptionSettingWindow : WindowBase<OptionSettingViewModel>
|
|||||||
this.Bind(ViewModel, vm => vm.TunEnableIPv6Address, v => v.togEnableIPv6Address.IsChecked).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.TunEnableIPv6Address, v => v.togEnableIPv6Address.IsChecked).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.TunIcmpRouting, v => v.cmbIcmpRoutingPolicy.SelectedValue).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.TunIcmpRouting, v => v.cmbIcmpRoutingPolicy.SelectedValue).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.TunEnableLegacyProtect, v => v.togEnableLegacyProtect.IsChecked).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.TunEnableLegacyProtect, v => v.togEnableLegacyProtect.IsChecked).DisposeWith(disposables);
|
||||||
|
this.Bind(ViewModel, vm => vm.TunRouteExcludeAddress, v => v.txtRouteExcludeAddress.Text).DisposeWith(disposables);
|
||||||
|
|
||||||
this.Bind(ViewModel, vm => vm.CoreType1, v => v.cmbCoreType1.SelectedValue).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.CoreType1, v => v.cmbCoreType1.SelectedValue).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.CoreType2, v => v.cmbCoreType2.SelectedValue).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.CoreType2, v => v.cmbCoreType2.SelectedValue).DisposeWith(disposables);
|
||||||
|
|||||||
@@ -1065,129 +1065,161 @@
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem Header="{x:Static resx:ResUI.TbSettingsTunMode}">
|
<TabItem Header="{x:Static resx:ResUI.TbSettingsTunMode}">
|
||||||
<Grid Margin="{StaticResource Margin8}" DockPanel.Dock="Top">
|
<ScrollViewer VerticalScrollBarVisibility="Visible">
|
||||||
<Grid.RowDefinitions>
|
<Grid Margin="{StaticResource Margin8}" DockPanel.Dock="Top">
|
||||||
<RowDefinition Height="Auto" />
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
<RowDefinition Height="Auto" />
|
||||||
<Grid.ColumnDefinitions>
|
<RowDefinition Height="Auto" />
|
||||||
<ColumnDefinition Width="Auto" />
|
</Grid.RowDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsTunAutoRoute}" />
|
Text="{x:Static resx:ResUI.TbSettingsTunAutoRoute}" />
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="togAutoRoute"
|
x:Name="togAutoRoute"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsTunStrictRoute}" />
|
Text="{x:Static resx:ResUI.TbSettingsTunStrictRoute}" />
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="togStrictRoute"
|
x:Name="togStrictRoute"
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsTunStack}" />
|
Text="{x:Static resx:ResUI.TbSettingsTunStack}" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="cmbStack"
|
x:Name="cmbStack"
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="200"
|
Width="200"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Style="{StaticResource DefComboBox}" />
|
Style="{StaticResource DefComboBox}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="5"
|
Grid.Row="5"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbMtu}" />
|
Text="{x:Static resx:ResUI.TbMtu}" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="cmbMtu"
|
x:Name="cmbMtu"
|
||||||
Grid.Row="5"
|
Grid.Row="5"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="200"
|
Width="200"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
IsEditable="True"
|
IsEditable="True"
|
||||||
Style="{StaticResource DefComboBox}" />
|
Style="{StaticResource DefComboBox}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="6"
|
Grid.Row="6"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbIcmpRoutingPolicy}" />
|
Text="{x:Static resx:ResUI.TbIcmpRoutingPolicy}" />
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="cmbIcmpRoutingPolicy"
|
x:Name="cmbIcmpRoutingPolicy"
|
||||||
Grid.Row="6"
|
Grid.Row="6"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Width="200"
|
Width="200"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Style="{StaticResource DefComboBox}" />
|
Style="{StaticResource DefComboBox}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="7"
|
Grid.Row="7"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsEnableIPv6Address}" />
|
Text="{x:Static resx:ResUI.TbSettingsEnableIPv6Address}" />
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="togEnableIPv6Address"
|
x:Name="togEnableIPv6Address"
|
||||||
Grid.Row="7"
|
Grid.Row="7"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="8"
|
Grid.Row="8"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbLegacyProtect}" />
|
Text="{x:Static resx:ResUI.TbLegacyProtect}" />
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="togEnableLegacyProtect"
|
x:Name="togEnableLegacyProtect"
|
||||||
Grid.Row="8"
|
Grid.Row="8"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
</Grid>
|
|
||||||
|
<TextBlock
|
||||||
|
Grid.Row="9"
|
||||||
|
Grid.Column="0"
|
||||||
|
Margin="{StaticResource Margin8}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
|
Text="{x:Static resx:ResUI.TbRouteExcludeAddress}" />
|
||||||
|
|
||||||
|
<TextBox
|
||||||
|
x:Name="txtRouteExcludeAddress"
|
||||||
|
Grid.Row="9"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="{StaticResource Margin8}"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
AcceptsReturn="True"
|
||||||
|
BorderThickness="1"
|
||||||
|
MinLines="2"
|
||||||
|
Style="{StaticResource DefTextBox}"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
VerticalScrollBarVisibility="Auto" />
|
||||||
|
<TextBlock
|
||||||
|
Grid.Row="9"
|
||||||
|
Grid.Column="2"
|
||||||
|
Margin="{StaticResource Margin4}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
|
Text="{x:Static resx:ResUI.TbRouteExcludeAddressTip}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem Header="{x:Static resx:ResUI.TbSettingsCoreType}">
|
<TabItem Header="{x:Static resx:ResUI.TbSettingsCoreType}">
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ public partial class OptionSettingWindow
|
|||||||
this.Bind(ViewModel, vm => vm.TunEnableIPv6Address, v => v.togEnableIPv6Address.IsChecked).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.TunEnableIPv6Address, v => v.togEnableIPv6Address.IsChecked).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.TunIcmpRouting, v => v.cmbIcmpRoutingPolicy.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.TunIcmpRouting, v => v.cmbIcmpRoutingPolicy.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.TunEnableLegacyProtect, v => v.togEnableLegacyProtect.IsChecked).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.TunEnableLegacyProtect, v => v.togEnableLegacyProtect.IsChecked).DisposeWith(disposables);
|
||||||
|
this.Bind(ViewModel, vm => vm.TunRouteExcludeAddress, v => v.txtRouteExcludeAddress.Text).DisposeWith(disposables);
|
||||||
|
|
||||||
this.Bind(ViewModel, vm => vm.CoreType1, v => v.cmbCoreType1.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.CoreType1, v => v.cmbCoreType1.Text).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.CoreType2, v => v.cmbCoreType2.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.CoreType2, v => v.cmbCoreType2.Text).DisposeWith(disposables);
|
||||||
|
|||||||
Reference in New Issue
Block a user