mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 13:42:24 +00:00
Fixes config generation
This commit is contained in:
parent
9d95143d85
commit
736ba9e52c
2 changed files with 4 additions and 1 deletions
|
@ -853,6 +853,7 @@ public class CoreConfigSingboxService
|
||||||
};
|
};
|
||||||
endpoints.private_key = node.Id;
|
endpoints.private_key = node.Id;
|
||||||
endpoints.mtu = node.ShortId.IsNullOrEmpty() ? Global.TunMtus.First() : node.ShortId.ToInt();
|
endpoints.mtu = node.ShortId.IsNullOrEmpty() ? Global.TunMtus.First() : node.ShortId.ToInt();
|
||||||
|
endpoints.peers = new() { peer };
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1088,6 +1089,7 @@ public class CoreConfigSingboxService
|
||||||
var nextEndpoint = JsonUtils.Deserialize<Endpoints4Sbox>(txtOutbound);
|
var nextEndpoint = JsonUtils.Deserialize<Endpoints4Sbox>(txtOutbound);
|
||||||
await GenEndpoint(nextNode, nextEndpoint);
|
await GenEndpoint(nextNode, nextEndpoint);
|
||||||
nextEndpoint.tag = Global.ProxyTag;
|
nextEndpoint.tag = Global.ProxyTag;
|
||||||
|
singboxConfig.endpoints ??= new();
|
||||||
singboxConfig.endpoints.Insert(0, nextEndpoint);
|
singboxConfig.endpoints.Insert(0, nextEndpoint);
|
||||||
|
|
||||||
nextEndpoint.detour = tag;
|
nextEndpoint.detour = tag;
|
||||||
|
@ -1097,6 +1099,7 @@ public class CoreConfigSingboxService
|
||||||
var nextOutbound = JsonUtils.Deserialize<Outbound4Sbox>(txtOutbound);
|
var nextOutbound = JsonUtils.Deserialize<Outbound4Sbox>(txtOutbound);
|
||||||
await GenOutbound(nextNode, nextOutbound);
|
await GenOutbound(nextNode, nextOutbound);
|
||||||
nextOutbound.tag = Global.ProxyTag;
|
nextOutbound.tag = Global.ProxyTag;
|
||||||
|
singboxConfig.outbounds ??= new();
|
||||||
singboxConfig.outbounds.Insert(0, nextOutbound);
|
singboxConfig.outbounds.Insert(0, nextOutbound);
|
||||||
|
|
||||||
nextOutbound.detour = tag;
|
nextOutbound.detour = tag;
|
||||||
|
|
|
@ -1311,7 +1311,7 @@ public class CoreConfigV2rayService
|
||||||
&& nextNode.ConfigType != EConfigType.Custom
|
&& nextNode.ConfigType != EConfigType.Custom
|
||||||
&& nextNode.ConfigType != EConfigType.Hysteria2
|
&& nextNode.ConfigType != EConfigType.Hysteria2
|
||||||
&& nextNode.ConfigType != EConfigType.TUIC
|
&& nextNode.ConfigType != EConfigType.TUIC
|
||||||
&& prevNode.ConfigType != EConfigType.Anytls)
|
&& nextNode.ConfigType != EConfigType.Anytls)
|
||||||
{
|
{
|
||||||
var nextOutbound = JsonUtils.Deserialize<Outbounds4Ray>(txtOutbound);
|
var nextOutbound = JsonUtils.Deserialize<Outbounds4Ray>(txtOutbound);
|
||||||
await GenOutbound(nextNode, nextOutbound);
|
await GenOutbound(nextNode, nextOutbound);
|
||||||
|
|
Loading…
Reference in a new issue