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
587686ffce
commit
901f8101f0
2 changed files with 19 additions and 4 deletions
|
@ -204,7 +204,7 @@ public partial class CoreConfigSingboxService
|
||||||
return await Task.FromResult<BaseServer4Sbox?>(null);
|
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
|
try
|
||||||
{
|
{
|
||||||
|
@ -239,7 +239,15 @@ public partial class CoreConfigSingboxService
|
||||||
switch (node.ConfigType)
|
switch (node.ConfigType)
|
||||||
{
|
{
|
||||||
case EConfigType.PolicyGroup:
|
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;
|
break;
|
||||||
case EConfigType.ProxyChain:
|
case EConfigType.ProxyChain:
|
||||||
await GenChainOutboundsList(childProfiles, singboxConfig, baseTagName);
|
await GenChainOutboundsList(childProfiles, singboxConfig, baseTagName);
|
||||||
|
|
|
@ -480,7 +480,7 @@ public partial class CoreConfigV2rayService
|
||||||
return 0;
|
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
|
try
|
||||||
{
|
{
|
||||||
|
@ -515,7 +515,14 @@ public partial class CoreConfigV2rayService
|
||||||
switch (node.ConfigType)
|
switch (node.ConfigType)
|
||||||
{
|
{
|
||||||
case EConfigType.PolicyGroup:
|
case EConfigType.PolicyGroup:
|
||||||
await GenOutboundsListWithChain(childProfiles, v2rayConfig, baseTagName);
|
if (ignoreOriginChain)
|
||||||
|
{
|
||||||
|
await GenOutboundsList(childProfiles, v2rayConfig, baseTagName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await GenOutboundsListWithChain(childProfiles, v2rayConfig, baseTagName);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case EConfigType.ProxyChain:
|
case EConfigType.ProxyChain:
|
||||||
await GenChainOutboundsList(childProfiles, v2rayConfig, baseTagName);
|
await GenChainOutboundsList(childProfiles, v2rayConfig, baseTagName);
|
||||||
|
|
Loading…
Reference in a new issue