mirror of
https://github.com/2dust/v2rayN.git
synced 2026-07-26 09:52:05 +03:00
Xray precore for custom config (#9754)
* Xray precore for custom config * Fix * Custom Pre --------- Co-authored-by: 2dust <31833384+2dust@users.noreply.github.com>
This commit is contained in:
@@ -1511,7 +1511,8 @@ public static class ConfigHandler
|
||||
else if (node.ConfigType == EConfigType.Custom
|
||||
&& node.PreSocksPort is > 0 and <= 65535)
|
||||
{
|
||||
var preCoreType = config.TunModeItem.EnableTun ? ECoreType.sing_box : ECoreType.Xray;
|
||||
var customPreCoreType = AppManager.Instance.GetCoreType(null, EConfigType.Custom);
|
||||
var preCoreType = (enableLegacyProtect && config.TunModeItem.EnableTun) ? ECoreType.sing_box : customPreCoreType;
|
||||
itemSocks = new ProfileItem()
|
||||
{
|
||||
CoreType = preCoreType,
|
||||
|
||||
@@ -663,7 +663,7 @@ public sealed class AppManager
|
||||
return Global.SsSecuritiesInSingbox;
|
||||
}
|
||||
|
||||
public ECoreType GetCoreType(ProfileItem profileItem, EConfigType eConfigType)
|
||||
public ECoreType GetCoreType(ProfileItem? profileItem, EConfigType eConfigType)
|
||||
{
|
||||
if (profileItem?.CoreType != null)
|
||||
{
|
||||
|
||||
@@ -1114,7 +1114,7 @@
|
||||
Grid.Column="0"
|
||||
Margin="{StaticResource Margin4}"
|
||||
VerticalAlignment="Center"
|
||||
Text="Custom" />
|
||||
Text="Custom Pre" />
|
||||
<ComboBox
|
||||
x:Name="cmbCoreType2"
|
||||
Grid.Row="2"
|
||||
|
||||
@@ -1388,7 +1388,7 @@
|
||||
Margin="{StaticResource Margin8}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="Custom" />
|
||||
Text="Custom Pre" />
|
||||
<ComboBox
|
||||
x:Name="cmbCoreType2"
|
||||
Grid.Row="2"
|
||||
|
||||
Reference in New Issue
Block a user