mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-16 12:35:46 +00:00
Compare commits
1 commit
a74dc383b7
...
ec5a9d5b09
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec5a9d5b09 |
27 changed files with 53 additions and 213 deletions
|
|
@ -675,14 +675,5 @@ public class Global
|
|||
""
|
||||
];
|
||||
|
||||
public static readonly List<string> TunIcmpRoutingPolicies =
|
||||
[
|
||||
"rule",
|
||||
"direct",
|
||||
"unreachable",
|
||||
"drop",
|
||||
"reply",
|
||||
];
|
||||
|
||||
#endregion const
|
||||
}
|
||||
|
|
|
|||
|
|
@ -322,7 +322,6 @@ public class CoreConfigContextBuilder
|
|||
context.ProtectDomainList.Add(address);
|
||||
}
|
||||
|
||||
// ech query server name protect
|
||||
if (!node.EchConfigList.IsNullOrEmpty())
|
||||
{
|
||||
var echQuerySni = node.Sni;
|
||||
|
|
@ -339,20 +338,6 @@ public class CoreConfigContextBuilder
|
|||
}
|
||||
}
|
||||
|
||||
// xhttp downloadSettings address protect
|
||||
if (!string.IsNullOrEmpty(node.Extra)
|
||||
&& JsonUtils.ParseJson(node.Extra) is JsonObject extra
|
||||
&& extra.TryGetPropertyValue("downloadSettings", out var dsNode)
|
||||
&& dsNode is JsonObject downloadSettings
|
||||
&& downloadSettings.TryGetPropertyValue("address", out var dAddrNode)
|
||||
&& dAddrNode is JsonValue dAddrValue
|
||||
&& dAddrValue.TryGetValue(out string? dAddr)
|
||||
&& !string.IsNullOrEmpty(dAddr)
|
||||
&& Utils.IsDomain(dAddr))
|
||||
{
|
||||
context.ProtectDomainList.Add(dAddr);
|
||||
}
|
||||
|
||||
return nodeValidatorResult;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -152,6 +152,12 @@ public class NodeValidator
|
|||
|
||||
private static string? ValidateSingboxTransport(EConfigType configType, string net)
|
||||
{
|
||||
// Naive support tcp and quic transports
|
||||
if (configType == EConfigType.Naive && net == "quic")
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// sing-box does not support xhttp / kcp transports
|
||||
if (SingboxUnsupportedTransports.Contains(net))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ public static class ConfigHandler
|
|||
{
|
||||
EnableTun = false,
|
||||
Mtu = 9000,
|
||||
IcmpRouting = Global.TunIcmpRoutingPolicies.First(),
|
||||
};
|
||||
config.GuiItem ??= new();
|
||||
config.MsgUIItem ??= new();
|
||||
|
|
@ -849,8 +848,7 @@ public static class ConfigHandler
|
|||
profileItem.Address = profileItem.Address.TrimEx();
|
||||
profileItem.Username = profileItem.Username.TrimEx();
|
||||
profileItem.Password = profileItem.Password.TrimEx();
|
||||
profileItem.Alpn = string.Empty;
|
||||
profileItem.Network = string.Empty;
|
||||
profileItem.Network = profileItem.Network == "quic" ? "quic" : string.Empty;
|
||||
if (profileItem.StreamSecurity.IsNullOrEmpty())
|
||||
{
|
||||
profileItem.StreamSecurity = Global.StreamSecurity;
|
||||
|
|
|
|||
|
|
@ -19,13 +19,9 @@ public class NaiveFmt : BaseFmt
|
|||
Address = parsedUrl.IdnHost,
|
||||
Port = parsedUrl.Port,
|
||||
};
|
||||
var protocolExtra = item.GetProtocolExtra();
|
||||
if (parsedUrl.Scheme.Contains("quic"))
|
||||
{
|
||||
protocolExtra = protocolExtra with
|
||||
{
|
||||
NaiveQuic = true,
|
||||
};
|
||||
item.Network = "quic";
|
||||
}
|
||||
var rawUserInfo = Utils.UrlDecode(parsedUrl.UserInfo);
|
||||
if (rawUserInfo.Contains(':'))
|
||||
|
|
@ -44,13 +40,12 @@ public class NaiveFmt : BaseFmt
|
|||
var insecureConcurrency = int.TryParse(GetQueryValue(query, "insecure-concurrency"), out var ic) ? ic : 0;
|
||||
if (insecureConcurrency > 0)
|
||||
{
|
||||
protocolExtra = protocolExtra with
|
||||
item.SetProtocolExtra(item.GetProtocolExtra() with
|
||||
{
|
||||
InsecureConcurrency = insecureConcurrency,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
item.SetProtocolExtra(protocolExtra);
|
||||
return item;
|
||||
}
|
||||
|
||||
|
|
@ -68,10 +63,9 @@ public class NaiveFmt : BaseFmt
|
|||
var userInfo = item.Username.IsNotEmpty() ? $"{Utils.UrlEncode(item.Username)}:{Utils.UrlEncode(item.Password)}" : Utils.UrlEncode(item.Password);
|
||||
var dicQuery = new Dictionary<string, string>();
|
||||
ToUriQuery(item, Global.None, ref dicQuery);
|
||||
var protocolExtra = item.GetProtocolExtra();
|
||||
if (protocolExtra.InsecureConcurrency > 0)
|
||||
if (item.GetProtocolExtra().InsecureConcurrency > 0)
|
||||
{
|
||||
dicQuery.Add("insecure-concurrency", protocolExtra?.InsecureConcurrency.ToString());
|
||||
dicQuery.Add("insecure-concurrency", item.GetProtocolExtra()?.InsecureConcurrency.ToString());
|
||||
}
|
||||
|
||||
var query = dicQuery.Count > 0
|
||||
|
|
@ -79,7 +73,7 @@ public class NaiveFmt : BaseFmt
|
|||
: string.Empty;
|
||||
var url = $"{userInfo}@{GetIpv6(item.Address)}:{item.Port}";
|
||||
|
||||
if (protocolExtra.NaiveQuic == true)
|
||||
if (item.Network == "quic")
|
||||
{
|
||||
return $"{Global.NaiveQuicProtocolShare}{url}{query}{remark}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,6 @@ public class TunModeItem
|
|||
public string Stack { get; set; }
|
||||
public int Mtu { get; set; }
|
||||
public bool EnableIPv6Address { get; set; }
|
||||
public string IcmpRouting { get; set; }
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ public record ProtocolExtraItem
|
|||
|
||||
// naiveproxy
|
||||
public int? InsecureConcurrency { get; init; }
|
||||
public bool? NaiveQuic { get; init; }
|
||||
|
||||
// group profile
|
||||
public string? GroupType { get; init; }
|
||||
|
|
|
|||
9
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
9
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
|
|
@ -3078,15 +3078,6 @@ namespace ServiceLib.Resx {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 ICMP routing policy 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TbIcmpRoutingPolicy {
|
||||
get {
|
||||
return ResourceManager.GetString("TbIcmpRoutingPolicy", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 UUID(id) 的本地化字符串。
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1692,7 +1692,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="TbUsername" xml:space="preserve">
|
||||
<value>Username</value>
|
||||
</data>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP routing policy</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1689,7 +1689,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="TbUsername" xml:space="preserve">
|
||||
<value>Username</value>
|
||||
</data>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP routing policy</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1692,7 +1692,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="TbUsername" xml:space="preserve">
|
||||
<value>Username</value>
|
||||
</data>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP routing policy</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1692,7 +1692,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
|||
<data name="TbUsername" xml:space="preserve">
|
||||
<value>Username</value>
|
||||
</data>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP routing policy</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1692,7 +1692,4 @@
|
|||
<data name="TbUsername" xml:space="preserve">
|
||||
<value>Username</value>
|
||||
</data>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP routing policy</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
|
|||
|
|
@ -1689,7 +1689,4 @@
|
|||
<data name="TbUsername" xml:space="preserve">
|
||||
<value>用户名</value>
|
||||
</data>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP 路由策略</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -1672,10 +1672,10 @@
|
|||
<value>全選</value>
|
||||
</data>
|
||||
<data name="menuEditPaste" xml:space="preserve">
|
||||
<value>貼上</value>
|
||||
<value>Paste</value>
|
||||
</data>
|
||||
<data name="menuEditFormat" xml:space="preserve">
|
||||
<value>格式化</value>
|
||||
<value>Format</value>
|
||||
</data>
|
||||
<data name="TbUot" xml:space="preserve">
|
||||
<value>UDP over TCP</value>
|
||||
|
|
@ -1684,12 +1684,9 @@
|
|||
<value>新增 [NaïveProxy] 節點</value>
|
||||
</data>
|
||||
<data name="TbInsecureConcurrency" xml:space="preserve">
|
||||
<value>不安全的並行處理</value>
|
||||
<value>Insecure Concurrency</value>
|
||||
</data>
|
||||
<data name="TbUsername" xml:space="preserve">
|
||||
<value>使用者名稱</value>
|
||||
<value>Username</value>
|
||||
</data>
|
||||
<data name="TbIcmpRoutingPolicy" xml:space="preserve">
|
||||
<value>ICMP 路由策略</value>
|
||||
</data>
|
||||
</root>
|
||||
</root>
|
||||
|
|
@ -283,7 +283,7 @@ public partial class CoreConfigSingboxService
|
|||
{
|
||||
outbound.username = _node.Username;
|
||||
outbound.password = _node.Password;
|
||||
if (protocolExtra.NaiveQuic == true)
|
||||
if (outbound.network == "quic")
|
||||
{
|
||||
outbound.quic = true;
|
||||
outbound.quic_congestion_control = protocolExtra.CongestionControl.NullIfEmpty();
|
||||
|
|
|
|||
|
|
@ -47,36 +47,6 @@ 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)
|
||||
|
|
|
|||
|
|
@ -68,10 +68,7 @@ public class AddServerViewModel : MyReactiveObject
|
|||
public string CongestionControl { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int? InsecureConcurrency { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool NaiveQuic { get; set; }
|
||||
public int InsecureConcurrency { get; set; }
|
||||
|
||||
public ReactiveCommand<Unit, Unit> FetchCertCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> FetchCertChainCmd { get; }
|
||||
|
|
@ -137,8 +134,7 @@ public class AddServerViewModel : MyReactiveObject
|
|||
WgMtu = protocolExtra?.WgMtu ?? 1280;
|
||||
Uot = protocolExtra?.Uot ?? false;
|
||||
CongestionControl = protocolExtra?.CongestionControl ?? string.Empty;
|
||||
InsecureConcurrency = protocolExtra?.InsecureConcurrency > 0 ? protocolExtra.InsecureConcurrency : null;
|
||||
NaiveQuic = protocolExtra?.NaiveQuic ?? false;
|
||||
InsecureConcurrency = protocolExtra?.InsecureConcurrency ?? 0;
|
||||
}
|
||||
|
||||
private async Task SaveServerAsync()
|
||||
|
|
@ -203,8 +199,7 @@ public class AddServerViewModel : MyReactiveObject
|
|||
WgMtu = WgMtu >= 576 ? WgMtu : null,
|
||||
Uot = Uot ? true : null,
|
||||
CongestionControl = CongestionControl.NullIfEmpty(),
|
||||
InsecureConcurrency = InsecureConcurrency > 0 ? InsecureConcurrency : null,
|
||||
NaiveQuic = NaiveQuic ? true : null,
|
||||
InsecureConcurrency = InsecureConcurrency > 0 ? InsecureConcurrency : null
|
||||
});
|
||||
|
||||
if (await ConfigHandler.AddServer(_config, SelectedSource) == 0)
|
||||
|
|
|
|||
|
|
@ -95,7 +95,6 @@ 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
|
||||
|
||||
|
|
@ -219,7 +218,6 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
TunStack = _config.TunModeItem.Stack;
|
||||
TunMtu = _config.TunModeItem.Mtu;
|
||||
TunEnableIPv6Address = _config.TunModeItem.EnableIPv6Address;
|
||||
TunIcmpRouting = _config.TunModeItem.IcmpRouting;
|
||||
|
||||
#endregion Tun mode
|
||||
|
||||
|
|
@ -378,7 +376,6 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
_config.TunModeItem.Stack = TunStack;
|
||||
_config.TunModeItem.Mtu = TunMtu;
|
||||
_config.TunModeItem.EnableIPv6Address = TunEnableIPv6Address;
|
||||
_config.TunModeItem.IcmpRouting = TunIcmpRouting;
|
||||
|
||||
//coreType
|
||||
await SaveCoreType();
|
||||
|
|
|
|||
|
|
@ -497,7 +497,7 @@
|
|||
VerticalAlignment="Center"
|
||||
Text="{x:Static resx:ResUI.TbHeaderType8}" />
|
||||
<ComboBox
|
||||
x:Name="cmbCongestionControl8"
|
||||
x:Name="cmbHeaderType8"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
|
|
@ -637,36 +637,27 @@
|
|||
Grid.Column="0"
|
||||
Margin="{StaticResource Margin4}"
|
||||
VerticalAlignment="Center"
|
||||
Text="QUIC" />
|
||||
<StackPanel
|
||||
Text="{x:Static resx:ResUI.TbInsecureConcurrency}" />
|
||||
<TextBox
|
||||
x:Name="txtInsecureConcurrency12"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<ToggleSwitch
|
||||
x:Name="togNaiveQuic12"
|
||||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Left" />
|
||||
<ComboBox
|
||||
x:Name="cmbCongestionControl12"
|
||||
Width="200"
|
||||
Margin="{StaticResource Margin4}"
|
||||
PlaceholderText="{x:Static resx:ResUI.TbHeaderType8}" />
|
||||
</StackPanel>
|
||||
Width="200"
|
||||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="4"
|
||||
Grid.Column="0"
|
||||
Margin="{StaticResource Margin4}"
|
||||
VerticalAlignment="Center"
|
||||
Text="{x:Static resx:ResUI.TbInsecureConcurrency}" />
|
||||
<TextBox
|
||||
x:Name="txtInsecureConcurrency12"
|
||||
Text="{x:Static resx:ResUI.TbHeaderType8}" />
|
||||
<ComboBox
|
||||
x:Name="cmbHeaderType12"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Left" />
|
||||
Margin="{StaticResource Margin4}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="5"
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public partial class AddServerWindow : WindowBase<AddServerViewModel>
|
|||
cmbFingerprint.SelectedValue = string.Empty;
|
||||
gridFinalmask.IsVisible = false;
|
||||
|
||||
cmbCongestionControl8.ItemsSource = Global.TuicCongestionControls;
|
||||
cmbHeaderType8.ItemsSource = Global.TuicCongestionControls;
|
||||
break;
|
||||
|
||||
case EConfigType.WireGuard:
|
||||
|
|
@ -103,18 +103,14 @@ public partial class AddServerWindow : WindowBase<AddServerViewModel>
|
|||
|
||||
case EConfigType.Naive:
|
||||
gridNaive.IsVisible = true;
|
||||
sepa2.IsVisible = false;
|
||||
gridTransport.IsVisible = false;
|
||||
cmbCoreType.IsEnabled = false;
|
||||
gridFinalmask.IsVisible = false;
|
||||
cmbFingerprint.IsEnabled = false;
|
||||
cmbFingerprint.SelectedValue = string.Empty;
|
||||
cmbAlpn.IsEnabled = false;
|
||||
cmbAlpn.SelectedValue = string.Empty;
|
||||
cmbAllowInsecure.IsEnabled = false;
|
||||
cmbAllowInsecure.SelectedValue = string.Empty;
|
||||
|
||||
cmbCongestionControl12.ItemsSource = Global.NaiveCongestionControls;
|
||||
cmbHeaderType12.ItemsSource = Global.NaiveCongestionControls;
|
||||
break;
|
||||
}
|
||||
cmbStreamSecurity.ItemsSource = lstStreamSecurity;
|
||||
|
|
@ -175,7 +171,7 @@ public partial class AddServerWindow : WindowBase<AddServerViewModel>
|
|||
case EConfigType.TUIC:
|
||||
this.Bind(ViewModel, vm => vm.SelectedSource.Username, v => v.txtId8.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.SelectedSource.Password, v => v.txtSecurity8.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CongestionControl, v => v.cmbCongestionControl8.SelectedValue).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CongestionControl, v => v.cmbHeaderType8.SelectedValue).DisposeWith(disposables);
|
||||
break;
|
||||
|
||||
case EConfigType.WireGuard:
|
||||
|
|
@ -193,10 +189,8 @@ public partial class AddServerWindow : WindowBase<AddServerViewModel>
|
|||
case EConfigType.Naive:
|
||||
this.Bind(ViewModel, vm => vm.SelectedSource.Username, v => v.txtId12.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.SelectedSource.Password, v => v.txtSecurity12.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.NaiveQuic, v => v.togNaiveQuic12.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.NaiveQuic, v => v.cmbCongestionControl12.IsEnabled).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CongestionControl, v => v.cmbCongestionControl12.SelectedValue).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.InsecureConcurrency, v => v.txtInsecureConcurrency12.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CongestionControl, v => v.cmbHeaderType12.SelectedValue).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.Uot, v => v.togUotEnabled12.IsChecked).DisposeWith(disposables);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -824,20 +824,6 @@
|
|||
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,7 +34,6 @@ 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,7 +114,6 @@ 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);
|
||||
|
|
|
|||
|
|
@ -660,7 +660,7 @@
|
|||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbHeaderType8}" />
|
||||
<ComboBox
|
||||
x:Name="cmbCongestionControl8"
|
||||
x:Name="cmbHeaderType8"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
|
|
@ -846,24 +846,15 @@
|
|||
Margin="{StaticResource Margin4}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="QUIC" />
|
||||
<StackPanel
|
||||
Text="{x:Static resx:ResUI.TbInsecureConcurrency}" />
|
||||
<TextBox
|
||||
x:Name="txtInsecureConcurrency12"
|
||||
Grid.Row="3"
|
||||
Grid.Column="1"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<ToggleButton
|
||||
x:Name="togNaiveQuic12"
|
||||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Left" />
|
||||
<ComboBox
|
||||
x:Name="cmbCongestionControl12"
|
||||
Width="200"
|
||||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Right"
|
||||
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.TbHeaderType8}"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
</StackPanel>
|
||||
Width="200"
|
||||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DefTextBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="4"
|
||||
|
|
@ -871,15 +862,14 @@
|
|||
Margin="{StaticResource Margin4}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbInsecureConcurrency}" />
|
||||
<TextBox
|
||||
x:Name="txtInsecureConcurrency12"
|
||||
Text="{x:Static resx:ResUI.TbHeaderType8}" />
|
||||
<ComboBox
|
||||
x:Name="cmbHeaderType12"
|
||||
Grid.Row="4"
|
||||
Grid.Column="1"
|
||||
Width="200"
|
||||
Margin="{StaticResource Margin4}"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{StaticResource DefTextBox}" />
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="5"
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public partial class AddServerWindow
|
|||
cmbFingerprint.Text = string.Empty;
|
||||
gridFinalmask.Visibility = Visibility.Collapsed;
|
||||
|
||||
cmbCongestionControl8.ItemsSource = Global.TuicCongestionControls;
|
||||
cmbHeaderType8.ItemsSource = Global.TuicCongestionControls;
|
||||
break;
|
||||
|
||||
case EConfigType.WireGuard:
|
||||
|
|
@ -98,18 +98,14 @@ public partial class AddServerWindow
|
|||
|
||||
case EConfigType.Naive:
|
||||
gridNaive.Visibility = Visibility.Visible;
|
||||
sepa2.Visibility = Visibility.Collapsed;
|
||||
gridTransport.Visibility = Visibility.Collapsed;
|
||||
cmbCoreType.IsEnabled = false;
|
||||
gridFinalmask.Visibility = Visibility.Collapsed;
|
||||
cmbFingerprint.IsEnabled = false;
|
||||
cmbFingerprint.Text = string.Empty;
|
||||
cmbAlpn.IsEnabled = false;
|
||||
cmbAlpn.Text = string.Empty;
|
||||
cmbAllowInsecure.IsEnabled = false;
|
||||
cmbAllowInsecure.Text = string.Empty;
|
||||
|
||||
cmbCongestionControl12.ItemsSource = Global.NaiveCongestionControls;
|
||||
cmbHeaderType12.ItemsSource = Global.NaiveCongestionControls;
|
||||
break;
|
||||
}
|
||||
cmbStreamSecurity.ItemsSource = lstStreamSecurity;
|
||||
|
|
@ -170,7 +166,7 @@ public partial class AddServerWindow
|
|||
case EConfigType.TUIC:
|
||||
this.Bind(ViewModel, vm => vm.SelectedSource.Username, v => v.txtId8.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.SelectedSource.Password, v => v.txtSecurity8.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CongestionControl, v => v.cmbCongestionControl8.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CongestionControl, v => v.cmbHeaderType8.Text).DisposeWith(disposables);
|
||||
break;
|
||||
|
||||
case EConfigType.WireGuard:
|
||||
|
|
@ -188,9 +184,8 @@ public partial class AddServerWindow
|
|||
case EConfigType.Naive:
|
||||
this.Bind(ViewModel, vm => vm.SelectedSource.Username, v => v.txtId12.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.SelectedSource.Password, v => v.txtSecurity12.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.NaiveQuic, v => v.togNaiveQuic12.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CongestionControl, v => v.cmbCongestionControl12.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.InsecureConcurrency, v => v.txtInsecureConcurrency12.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CongestionControl, v => v.cmbHeaderType12.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.Uot, v => v.togUotEnabled12.IsChecked).DisposeWith(disposables);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1076,22 +1076,6 @@
|
|||
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,7 +31,6 @@ 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,7 +119,6 @@ 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