mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-13 11:59:13 +00:00
Add chain selection control to group outbounds
This commit is contained in:
parent
aa1ccdd01b
commit
e7f75010d3
2 changed files with 19 additions and 4 deletions
|
@ -204,7 +204,7 @@ public partial class CoreConfigSingboxService
|
|||
return await Task.FromResult<BaseServer4Sbox?>(null);
|
||||
}
|
||||
|
||||
private async Task<int> GenGroupOutbound(ProfileItem node, SingboxConfig singboxConfig, string baseTagName = Global.ProxyTag)
|
||||
private async Task<int> GenGroupOutbound(ProfileItem node, SingboxConfig singboxConfig, string baseTagName = Global.ProxyTag, bool ignoreOriginChain = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -239,7 +239,15 @@ public partial class CoreConfigSingboxService
|
|||
switch (node.ConfigType)
|
||||
{
|
||||
case EConfigType.PolicyGroup:
|
||||
await GenOutboundsListWithChain(childProfiles, singboxConfig, profileGroupItem.MultipleLoad, baseTagName);
|
||||
if (ignoreOriginChain)
|
||||
{
|
||||
await GenOutboundsList(childProfiles, singboxConfig, profileGroupItem.MultipleLoad, baseTagName);
|
||||
}
|
||||
else
|
||||
{
|
||||
await GenOutboundsListWithChain(childProfiles, singboxConfig, profileGroupItem.MultipleLoad, baseTagName);
|
||||
}
|
||||
|
||||
break;
|
||||
case EConfigType.ProxyChain:
|
||||
await GenChainOutboundsList(childProfiles, singboxConfig, baseTagName);
|
||||
|
|
|
@ -480,7 +480,7 @@ public partial class CoreConfigV2rayService
|
|||
return 0;
|
||||
}
|
||||
|
||||
private async Task<int> GenGroupOutbound(ProfileItem node, V2rayConfig v2rayConfig, string baseTagName = Global.ProxyTag)
|
||||
private async Task<int> GenGroupOutbound(ProfileItem node, V2rayConfig v2rayConfig, string baseTagName = Global.ProxyTag, bool ignoreOriginChain = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -515,7 +515,14 @@ public partial class CoreConfigV2rayService
|
|||
switch (node.ConfigType)
|
||||
{
|
||||
case EConfigType.PolicyGroup:
|
||||
await GenOutboundsListWithChain(childProfiles, v2rayConfig, baseTagName);
|
||||
if (ignoreOriginChain)
|
||||
{
|
||||
await GenOutboundsList(childProfiles, v2rayConfig, baseTagName);
|
||||
}
|
||||
else
|
||||
{
|
||||
await GenOutboundsListWithChain(childProfiles, v2rayConfig, baseTagName);
|
||||
}
|
||||
break;
|
||||
case EConfigType.ProxyChain:
|
||||
await GenChainOutboundsList(childProfiles, v2rayConfig, baseTagName);
|
||||
|
|
Loading…
Reference in a new issue