feat: add vpn section outbound displaying

This commit is contained in:
divocat
2025-10-06 15:13:55 +03:00
parent aad6d8c002
commit b2a473573b
2 changed files with 38 additions and 0 deletions

View File

@@ -985,6 +985,24 @@ async function getDashboardSections() {
};
}
}
if (section.mode === "vpn") {
const outbound = proxies.find(
(proxy) => proxy.code === `${section[".name"]}-out`
);
return {
code: section[".name"],
displayName: section[".name"],
outbounds: [
{
code: outbound?.code || section[".name"],
displayName: section.interface || outbound?.value?.name || "",
latency: outbound?.value?.history?.[0]?.delay || 0,
type: outbound?.value?.type || "",
selected: true
}
]
};
}
return {
code: section[".name"],
displayName: section[".name"],