Add custom config Socks port to the group

https://github.com/2dust/v2rayN/issues/5576
This commit is contained in:
2dust
2024-08-30 10:12:40 +08:00
parent c9d65e5cd9
commit d189f4b443
10 changed files with 51 additions and 5 deletions
+7 -1
View File
@@ -1282,7 +1282,10 @@ namespace ServiceLib.Handler
{
return -1;
}
var subRemarks = LazyConfig.Instance.GetSubItem(subid)?.remarks;
var subItem = LazyConfig.Instance.GetSubItem(subid);
var subRemarks = subItem?.remarks;
var preSocksPort = subItem?.preSocksPort;
List<ProfileItem>? lstProfiles = null;
//Is sing-box array configuration
@@ -1306,6 +1309,7 @@ namespace ServiceLib.Handler
{
it.subid = subid;
it.isSub = isSub;
it.preSocksPort = preSocksPort;
if (AddCustomServer(config, it, true) == 0)
{
count++;
@@ -1362,6 +1366,7 @@ namespace ServiceLib.Handler
}
profileItem.subid = subid;
profileItem.isSub = isSub;
profileItem.preSocksPort = preSocksPort;
if (AddCustomServer(config, profileItem, true) == 0)
{
return 1;
@@ -1501,6 +1506,7 @@ namespace ServiceLib.Handler
item.convertTarget = subItem.convertTarget;
item.prevProfile = subItem.prevProfile;
item.nextProfile = subItem.nextProfile;
item.preSocksPort = subItem.preSocksPort;
}
if (Utils.IsNullOrEmpty(item.id))