mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-16 12:35:46 +00:00
Compare commits
7 commits
9caa2229af
...
99786f72b7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
99786f72b7 | ||
|
|
0c2114d2e1 | ||
|
|
4af528f8e2 | ||
|
|
588e82f0d9 | ||
|
|
0c13488410 | ||
|
|
a88396c11d | ||
|
|
4f93a83f9f |
22 changed files with 206 additions and 42 deletions
|
|
@ -660,5 +660,14 @@ public class Global
|
|||
""
|
||||
];
|
||||
|
||||
public static readonly List<string> TunIcmpRoutingPolicies =
|
||||
[
|
||||
"rule",
|
||||
"direct",
|
||||
"unreachable",
|
||||
"drop",
|
||||
"reply",
|
||||
];
|
||||
|
||||
#endregion const
|
||||
}
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ public class CoreConfigContextBuilder
|
|||
{
|
||||
var result = NodeValidatorResult.Empty();
|
||||
|
||||
if (node.Subid.IsNullOrEmpty())
|
||||
if (node.Subid.IsNullOrEmpty() || node.ConfigType == EConfigType.Custom)
|
||||
{
|
||||
return (null, result);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ public static class ConfigHandler
|
|||
{
|
||||
EnableTun = false,
|
||||
Mtu = 9000,
|
||||
IcmpRouting = Global.TunIcmpRoutingPolicies.First(),
|
||||
};
|
||||
config.GuiItem ??= new();
|
||||
config.MsgUIItem ??= new();
|
||||
|
|
@ -723,8 +724,6 @@ public static class ConfigHandler
|
|||
profileItem.SetProtocolExtra(profileItem.GetProtocolExtra() with
|
||||
{
|
||||
SalamanderPass = profileItem.GetProtocolExtra().SalamanderPass?.TrimEx(),
|
||||
UpMbps = profileItem.GetProtocolExtra().UpMbps is null or < 0 ? config.HysteriaItem.UpMbps : profileItem.GetProtocolExtra().UpMbps,
|
||||
DownMbps = profileItem.GetProtocolExtra().DownMbps is null or < 0 ? config.HysteriaItem.DownMbps : profileItem.GetProtocolExtra().DownMbps,
|
||||
HopInterval = profileItem.GetProtocolExtra().HopInterval?.TrimEx(),
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ public class TunModeItem
|
|||
public string Stack { get; set; }
|
||||
public int Mtu { get; set; }
|
||||
public bool EnableIPv6Address { get; set; }
|
||||
public string IcmpRouting { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
|
|
|||
|
|
@ -360,6 +360,7 @@ public class TlsSettings4Ray
|
|||
public bool? disableSystemRoot { get; set; }
|
||||
public string? echConfigList { get; set; }
|
||||
public string? echForceQuery { get; set; }
|
||||
public Sockopt4Ray? echSockopt { get; set; }
|
||||
}
|
||||
|
||||
public class CertificateSettings4Ray
|
||||
|
|
|
|||
9
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
9
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
|
|
@ -3033,6 +3033,15 @@ namespace ServiceLib.Resx {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 ICMP routing policy 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TbIcmpRoutingPolicy {
|
||||
get {
|
||||
return ResourceManager.GetString("TbIcmpRoutingPolicy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 UUID(id) 的本地化字符串。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1671,4 +1671,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="menuGenRegionGroup" xml:space="preserve">
|
||||
<value>Group by Region</value>
|
||||
</data>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP routing policy</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1668,4 +1668,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="menuGenRegionGroup" xml:space="preserve">
|
||||
<value>Group by Region</value>
|
||||
</data>
|
||||
</root>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP routing policy</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1671,4 +1671,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="menuGenRegionGroup" xml:space="preserve">
|
||||
<value>Group by Region</value>
|
||||
</data>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP routing policy</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1671,4 +1671,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="menuGenRegionGroup" xml:space="preserve">
|
||||
<value>Group by Region</value>
|
||||
</data>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP routing policy</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1671,4 +1671,7 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="menuGenRegionGroup" xml:space="preserve">
|
||||
<value>Group by Region</value>
|
||||
</data>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP routing policy</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1668,4 +1668,7 @@
|
|||
<data name="menuGenRegionGroup" xml:space="preserve">
|
||||
<value>按地区分组</value>
|
||||
</data>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP 路由策略</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1668,4 +1668,7 @@
|
|||
<data name="menuGenRegionGroup" xml:space="preserve">
|
||||
<value>按區域分組</value>
|
||||
</data>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP routing policy</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -47,6 +47,36 @@ public partial class CoreConfigSingboxService
|
|||
outbound = Global.DirectTag,
|
||||
process_name = lstDirectExe
|
||||
});
|
||||
|
||||
// ICMP Routing
|
||||
var icmpRouting = _config.TunModeItem.IcmpRouting ?? "";
|
||||
if (!Global.TunIcmpRoutingPolicies.Contains(icmpRouting))
|
||||
{
|
||||
icmpRouting = Global.TunIcmpRoutingPolicies.First();
|
||||
}
|
||||
if (icmpRouting == "direct")
|
||||
{
|
||||
_coreConfig.route.rules.Add(new()
|
||||
{
|
||||
network = ["icmp"],
|
||||
outbound = Global.DirectTag,
|
||||
});
|
||||
}
|
||||
else if (icmpRouting != "rule")
|
||||
{
|
||||
var rejectMethod = icmpRouting switch
|
||||
{
|
||||
"unreachable" => "default",
|
||||
"drop" => "drop",
|
||||
_ => "reply",
|
||||
};
|
||||
_coreConfig.route.rules.Add(new()
|
||||
{
|
||||
network = ["icmp"],
|
||||
action = "reject",
|
||||
method = rejectMethod,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (_config.Inbound.First().SniffingEnabled)
|
||||
|
|
|
|||
|
|
@ -316,16 +316,24 @@ public partial class CoreConfigV2rayService(CoreConfigContext context)
|
|||
SsMethod = Global.None,
|
||||
});
|
||||
|
||||
foreach (var outbound in _coreConfig.outbounds.Where(outbound => outbound.streamSettings?.sockopt?.dialerProxy?.IsNullOrEmpty() ?? true))
|
||||
foreach (var outbound in _coreConfig.outbounds
|
||||
.Where(o => o.streamSettings?.sockopt?.dialerProxy?.IsNullOrEmpty() ?? true))
|
||||
{
|
||||
outbound.streamSettings ??= new StreamSettings4Ray();
|
||||
outbound.streamSettings.sockopt ??= new Sockopt4Ray();
|
||||
outbound.streamSettings.sockopt.dialerProxy = "tun-project-ss";
|
||||
outbound.streamSettings ??= new();
|
||||
outbound.streamSettings.sockopt ??= new();
|
||||
outbound.streamSettings.sockopt.dialerProxy = "tun-protect-ss";
|
||||
}
|
||||
// ech protected
|
||||
foreach (var outbound in _coreConfig.outbounds
|
||||
.Where(outbound => outbound.streamSettings?.tlsSettings?.echConfigList?.IsNullOrEmpty() == false))
|
||||
{
|
||||
outbound.streamSettings!.tlsSettings!.echSockopt ??= new();
|
||||
outbound.streamSettings.tlsSettings.echSockopt.dialerProxy = "tun-protect-ss";
|
||||
}
|
||||
_coreConfig.outbounds.Add(new CoreConfigV2rayService(context with
|
||||
{
|
||||
Node = protectNode,
|
||||
}).BuildProxyOutbound("tun-project-ss"));
|
||||
}).BuildProxyOutbound("tun-protect-ss"));
|
||||
|
||||
_coreConfig.routing.rules ??= [];
|
||||
var hasBalancer = _coreConfig.routing.balancers is { Count: > 0 };
|
||||
|
|
|
|||
|
|
@ -363,44 +363,36 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
|||
var geoipFiles = new List<string>();
|
||||
var geoSiteFiles = new List<string>();
|
||||
|
||||
//Collect used files list
|
||||
// Collect from routing rules
|
||||
var routingItems = await AppManager.Instance.RoutingItems();
|
||||
foreach (var routing in routingItems)
|
||||
{
|
||||
var rules = JsonUtils.Deserialize<List<RulesItem>>(routing.RuleSet);
|
||||
foreach (var item in rules ?? [])
|
||||
{
|
||||
foreach (var ip in item.Ip ?? [])
|
||||
{
|
||||
var prefix = "geoip:";
|
||||
if (ip.StartsWith(prefix))
|
||||
{
|
||||
geoipFiles.Add(ip.Substring(prefix.Length));
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var domain in item.Domain ?? [])
|
||||
{
|
||||
var prefix = "geosite:";
|
||||
if (domain.StartsWith(prefix))
|
||||
{
|
||||
geoSiteFiles.Add(domain.Substring(prefix.Length));
|
||||
}
|
||||
}
|
||||
AddPrefixedItems(item.Ip, "geoip:", geoipFiles);
|
||||
AddPrefixedItems(item.Domain, "geosite:", geoSiteFiles);
|
||||
}
|
||||
}
|
||||
|
||||
//append dns items TODO
|
||||
geoSiteFiles.Add("google");
|
||||
geoSiteFiles.Add("cn");
|
||||
geoSiteFiles.Add("geolocation-cn");
|
||||
geoSiteFiles.Add("category-ads-all");
|
||||
// Collect from DNS configuration
|
||||
var dnsItem = await AppManager.Instance.GetDNSItem(ECoreType.sing_box);
|
||||
if (dnsItem != null)
|
||||
{
|
||||
ExtractDnsRuleSets(dnsItem.NormalDNS, geoipFiles, geoSiteFiles);
|
||||
ExtractDnsRuleSets(dnsItem.TunDNS, geoipFiles, geoSiteFiles);
|
||||
}
|
||||
|
||||
// Append default items
|
||||
geoSiteFiles.AddRange(["google", "cn", "geolocation-cn", "category-ads-all"]);
|
||||
|
||||
// Download files
|
||||
var path = Utils.GetBinPath("srss");
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
}
|
||||
|
||||
foreach (var item in geoipFiles.Distinct())
|
||||
{
|
||||
await UpdateSrsFile("geoip", item);
|
||||
|
|
@ -412,6 +404,63 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
|||
}
|
||||
}
|
||||
|
||||
private void AddPrefixedItems(List<string>? items, string prefix, List<string> output)
|
||||
{
|
||||
if (items == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
if (item.StartsWith(prefix))
|
||||
{
|
||||
output.Add(item.Substring(prefix.Length));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ExtractDnsRuleSets(string? dnsJson, List<string> geoipFiles, List<string> geoSiteFiles)
|
||||
{
|
||||
if (string.IsNullOrEmpty(dnsJson))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var dns = JsonUtils.Deserialize<Dns4Sbox>(dnsJson);
|
||||
if (dns?.rules != null)
|
||||
{
|
||||
foreach (var rule in dns.rules)
|
||||
{
|
||||
ExtractSrsRuleSets(rule, geoipFiles, geoSiteFiles);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void ExtractSrsRuleSets(Rule4Sbox? rule, List<string> geoipFiles, List<string> geoSiteFiles)
|
||||
{
|
||||
if (rule == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AddPrefixedItems(rule.rule_set, "geosite-", geoSiteFiles);
|
||||
AddPrefixedItems(rule.rule_set, "geoip-", geoipFiles);
|
||||
|
||||
// Handle nested rules recursively
|
||||
if (rule.rules != null)
|
||||
{
|
||||
foreach (var nestedRule in rule.rules)
|
||||
{
|
||||
ExtractSrsRuleSets(nestedRule, geoipFiles, geoSiteFiles);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async Task UpdateSrsFile(string type, string srsName)
|
||||
{
|
||||
var srsUrl = string.IsNullOrEmpty(_config.ConstItem.SrsSourceUrl)
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ public class AddServerViewModel : MyReactiveObject
|
|||
public string Ports { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int UpMbps { get; set; }
|
||||
public int? UpMbps { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int DownMbps { get; set; }
|
||||
public int? DownMbps { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string HopInterval { get; set; }
|
||||
|
|
@ -113,8 +113,8 @@ public class AddServerViewModel : MyReactiveObject
|
|||
AlterId = int.TryParse(protocolExtra?.AlterId, out var result) ? result : 0;
|
||||
Flow = protocolExtra?.Flow ?? string.Empty;
|
||||
SalamanderPass = protocolExtra?.SalamanderPass ?? string.Empty;
|
||||
UpMbps = protocolExtra?.UpMbps ?? _config.HysteriaItem.UpMbps;
|
||||
DownMbps = protocolExtra?.DownMbps ?? _config.HysteriaItem.DownMbps;
|
||||
UpMbps = protocolExtra?.UpMbps;
|
||||
DownMbps = protocolExtra?.DownMbps;
|
||||
HopInterval = protocolExtra?.HopInterval.IsNullOrEmpty() ?? true ? Global.Hysteria2DefaultHopInt.ToString() : protocolExtra.HopInterval;
|
||||
VmessSecurity = protocolExtra?.VmessSecurity?.IsNullOrEmpty() == false ? protocolExtra.VmessSecurity : Global.DefaultSecurity;
|
||||
VlessEncryption = protocolExtra?.VlessEncryption.IsNullOrEmpty() == false ? protocolExtra.VlessEncryption : Global.None;
|
||||
|
|
@ -175,8 +175,8 @@ public class AddServerViewModel : MyReactiveObject
|
|||
AlterId = AlterId > 0 ? AlterId.ToString() : null,
|
||||
Flow = Flow.NullIfEmpty(),
|
||||
SalamanderPass = SalamanderPass.NullIfEmpty(),
|
||||
UpMbps = UpMbps >= 0 ? UpMbps : null,
|
||||
DownMbps = DownMbps >= 0 ? DownMbps : null,
|
||||
UpMbps = UpMbps,
|
||||
DownMbps = DownMbps,
|
||||
HopInterval = HopInterval.NullIfEmpty(),
|
||||
VmessSecurity = VmessSecurity.NullIfEmpty(),
|
||||
VlessEncryption = VlessEncryption.NullIfEmpty(),
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
[Reactive] public string defUserAgent { get; set; }
|
||||
[Reactive] public string mux4SboxProtocol { get; set; }
|
||||
[Reactive] public bool enableCacheFile4Sbox { get; set; }
|
||||
[Reactive] public int hyUpMbps { get; set; }
|
||||
[Reactive] public int hyDownMbps { get; set; }
|
||||
[Reactive] public int? hyUpMbps { get; set; }
|
||||
[Reactive] public int? hyDownMbps { get; set; }
|
||||
[Reactive] public bool enableFragment { get; set; }
|
||||
|
||||
#endregion Core
|
||||
|
|
@ -96,6 +96,7 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
[Reactive] public string TunStack { get; set; }
|
||||
[Reactive] public int TunMtu { get; set; }
|
||||
[Reactive] public bool TunEnableIPv6Address { get; set; }
|
||||
[Reactive] public string TunIcmpRouting { get; set; }
|
||||
|
||||
#endregion Tun mode
|
||||
|
||||
|
|
@ -220,6 +221,7 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
TunStack = _config.TunModeItem.Stack;
|
||||
TunMtu = _config.TunModeItem.Mtu;
|
||||
TunEnableIPv6Address = _config.TunModeItem.EnableIPv6Address;
|
||||
TunIcmpRouting = _config.TunModeItem.IcmpRouting;
|
||||
|
||||
#endregion Tun mode
|
||||
|
||||
|
|
@ -336,8 +338,8 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
_config.CoreBasicItem.DefUserAgent = defUserAgent;
|
||||
_config.Mux4SboxItem.Protocol = mux4SboxProtocol;
|
||||
_config.CoreBasicItem.EnableCacheFile4Sbox = enableCacheFile4Sbox;
|
||||
_config.HysteriaItem.UpMbps = hyUpMbps;
|
||||
_config.HysteriaItem.DownMbps = hyDownMbps;
|
||||
_config.HysteriaItem.UpMbps = hyUpMbps ?? 0;
|
||||
_config.HysteriaItem.DownMbps = hyDownMbps ?? 0;
|
||||
_config.CoreBasicItem.EnableFragment = enableFragment;
|
||||
|
||||
_config.GuiItem.AutoRun = AutoRun;
|
||||
|
|
@ -379,6 +381,7 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
_config.TunModeItem.Stack = TunStack;
|
||||
_config.TunModeItem.Mtu = TunMtu;
|
||||
_config.TunModeItem.EnableIPv6Address = TunEnableIPv6Address;
|
||||
_config.TunModeItem.IcmpRouting = TunIcmpRouting;
|
||||
|
||||
//coreType
|
||||
await SaveCoreType();
|
||||
|
|
|
|||
|
|
@ -837,6 +837,20 @@
|
|||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="6"
|
||||
Grid.Column="0"
|
||||
Margin="{StaticResource Margin4}"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Static resx:ResUI.TbIcmpRoutingPolicy}" />
|
||||
<ComboBox
|
||||
x:Name="cmbIcmpRoutingPolicy"
|
||||
Grid.Row="6"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="7"
|
||||
Grid.Column="0"
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ public partial class OptionSettingWindow : WindowBase<OptionSettingViewModel>
|
|||
cmbmux4SboxProtocol.ItemsSource = Global.SingboxMuxs;
|
||||
cmbMtu.ItemsSource = Global.TunMtus;
|
||||
cmbStack.ItemsSource = Global.TunStacks;
|
||||
cmbIcmpRoutingPolicy.ItemsSource = Global.TunIcmpRoutingPolicies;
|
||||
|
||||
cmbCoreType1.ItemsSource = Global.CoreTypes;
|
||||
cmbCoreType2.ItemsSource = Global.CoreTypes;
|
||||
|
|
@ -115,6 +116,7 @@ public partial class OptionSettingWindow : WindowBase<OptionSettingViewModel>
|
|||
this.Bind(ViewModel, vm => vm.TunStack, v => v.cmbStack.SelectedValue).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.TunMtu, v => v.cmbMtu.SelectedValue).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.CoreType1, v => v.cmbCoreType1.SelectedValue).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CoreType2, v => v.cmbCoreType2.SelectedValue).DisposeWith(disposables);
|
||||
|
|
|
|||
|
|
@ -1090,6 +1090,22 @@
|
|||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="6"
|
||||
Grid.Column="0"
|
||||
Margin="{StaticResource Margin8}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbIcmpRoutingPolicy}" />
|
||||
<ComboBox
|
||||
x:Name="cmbIcmpRoutingPolicy"
|
||||
Grid.Row="6"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
Margin="{StaticResource Margin8}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="7"
|
||||
Grid.Column="0"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ public partial class OptionSettingWindow
|
|||
cmbmux4SboxProtocol.ItemsSource = Global.SingboxMuxs;
|
||||
cmbMtu.ItemsSource = Global.TunMtus;
|
||||
cmbStack.ItemsSource = Global.TunStacks;
|
||||
cmbIcmpRoutingPolicy.ItemsSource = Global.TunIcmpRoutingPolicies;
|
||||
|
||||
cmbCoreType1.ItemsSource = Global.CoreTypes;
|
||||
cmbCoreType2.ItemsSource = Global.CoreTypes;
|
||||
|
|
@ -120,6 +121,7 @@ public partial class OptionSettingWindow
|
|||
this.Bind(ViewModel, vm => vm.TunStack, v => v.cmbStack.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.TunMtu, v => v.cmbMtu.Text).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.CoreType1, v => v.cmbCoreType1.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CoreType2, v => v.cmbCoreType2.Text).DisposeWith(disposables);
|
||||
|
|
|
|||
Loading…
Reference in a new issue