mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-15 16:06:53 +03:00
feat: add vpn section outbound displaying
This commit is contained in:
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user