mirror of
https://github.com/2dust/v2rayN.git
synced 2026-02-28 13:13:04 +00:00
Compare commits
3 commits
bbbe18ba88
...
bfbde8268a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bfbde8268a | ||
|
|
f82eddd35f | ||
|
|
eec3bb71cb |
6 changed files with 8 additions and 18 deletions
|
|
@ -99,12 +99,7 @@ public static class CoreConfigHandler
|
|||
var nodes = await AppManager.Instance.GetProfileItemsByIndexIds(ids);
|
||||
foreach (var node in nodes)
|
||||
{
|
||||
var actNode = await FillNodeContext(context, node, true);
|
||||
if (node.IndexId == actNode.IndexId)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
context.ServerTestItemMap[node.IndexId] = actNode.IndexId;
|
||||
await FillNodeContext(context, node, false);
|
||||
}
|
||||
if (coreType == ECoreType.sing_box)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public class Hysteria2Fmt : BaseFmt
|
|||
if (!item.CertSha.IsNullOrEmpty())
|
||||
{
|
||||
var sha = item.CertSha;
|
||||
var idx = sha.IndexOf(',');
|
||||
var idx = sha.IndexOf('~');
|
||||
if (idx > 0)
|
||||
{
|
||||
sha = sha[..idx];
|
||||
|
|
|
|||
|
|
@ -10,9 +10,6 @@ public record CoreConfigContext
|
|||
public Config AppConfig { get; init; } = new();
|
||||
public FullConfigTemplateItem? FullConfigTemplate { get; init; } = new();
|
||||
|
||||
// Test ServerTestItem Map
|
||||
public Dictionary<string, string> ServerTestItemMap { get; init; } = new();
|
||||
|
||||
// TUN Compatibility
|
||||
public bool IsTunEnabled { get; init; } = false;
|
||||
public HashSet<string> ProtectDomainList { get; init; } = new();
|
||||
|
|
|
|||
|
|
@ -122,9 +122,8 @@ public partial class CoreConfigSingboxService(CoreConfigContext context)
|
|||
{
|
||||
continue;
|
||||
}
|
||||
var actIndexId = context.ServerTestItemMap.GetValueOrDefault(it.IndexId, it.IndexId);
|
||||
var item = context.AllProxiesMap.GetValueOrDefault(actIndexId);
|
||||
if (item is null || item.ConfigType is EConfigType.Custom || !item.IsValid())
|
||||
var item = context.AllProxiesMap.GetValueOrDefault(it.IndexId);
|
||||
if (item is null || item.IsComplex() || !item.IsValid())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,9 +120,8 @@ public partial class CoreConfigV2rayService(CoreConfigContext context)
|
|||
{
|
||||
continue;
|
||||
}
|
||||
var actIndexId = context.ServerTestItemMap.GetValueOrDefault(it.IndexId, it.IndexId);
|
||||
var item = context.AllProxiesMap.GetValueOrDefault(actIndexId);
|
||||
if (item is null || item.ConfigType is EConfigType.Custom || !item.IsValid())
|
||||
var item = context.AllProxiesMap.GetValueOrDefault(it.IndexId);
|
||||
if (item is null || item.IsComplex() || !item.IsValid())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ public class AddServerViewModel : MyReactiveObject
|
|||
return;
|
||||
}
|
||||
|
||||
List<string> shaList = [];
|
||||
List<string> shaList = new();
|
||||
foreach (var cert in certList)
|
||||
{
|
||||
var sha = CertPemManager.GetCertSha256Thumbprint(cert);
|
||||
|
|
@ -243,7 +243,7 @@ public class AddServerViewModel : MyReactiveObject
|
|||
}
|
||||
shaList.Add(sha);
|
||||
}
|
||||
CertSha = string.Join(',', shaList);
|
||||
CertSha = string.Join('~', shaList);
|
||||
}
|
||||
|
||||
private async Task FetchCert()
|
||||
|
|
|
|||
Loading…
Reference in a new issue