This commit is contained in:
parhelia512 2025-08-31 01:11:06 +08:00
parent 0d3763dad9
commit 34e677f8d4

View File

@ -667,6 +667,20 @@ namespace Subscription {
auto downMbps = Node2QString(proxy["down"]).split(" ")[0].toInt();
if (upMbps > 0) bean->uploadMbps = upMbps;
if (downMbps > 0) bean->downloadMbps = downMbps;
auto ports = Node2QString(proxy["ports"]);
if (!ports.isEmpty()) {
QStringList serverPorts;
ports.replace("/", ",");
for (const QString& port : ports.split(",", Qt::SkipEmptyParts)) {
if (port.isEmpty()) {
continue;
}
port.replace("-", ":");
serverPorts.append(port);
}
bean->serverPorts = serverPorts;
}
} else if (type == "hysteria2") {
auto bean = ent->QUICBean();
@ -679,6 +693,20 @@ namespace Subscription {
bean->uploadMbps = Node2QString(proxy["up"]).split(" ")[0].toInt();
bean->downloadMbps = Node2QString(proxy["down"]).split(" ")[0].toInt();
auto ports = Node2QString(proxy["ports"]);
if (!ports.isEmpty()) {
QStringList serverPorts;
ports.replace("/", ",");
for (const QString& port : ports.split(",", Qt::SkipEmptyParts)) {
if (port.isEmpty()) {
continue;
}
port.replace("-", ":");
serverPorts.append(port);
}
bean->serverPorts = serverPorts;
}
} else if (type == "tuic") {
auto bean = ent->QUICBean();