diff --git a/proxy/netifyTelemetry.js b/proxy/netifyTelemetry.js index 6b5aaea..bbf3653 100644 --- a/proxy/netifyTelemetry.js +++ b/proxy/netifyTelemetry.js @@ -111,13 +111,14 @@ async function fetchTopCountries(interval = 1440, limit = 100, agentUuid = null, const ulMap = {}; if (ulData) { for (const r of ulData) { - const cc = r.country?.code; + const cc = r.country?.code || r.country?.label; if (cc) ulMap[cc] = r.upload ?? 0; } } return dlData.map(r => { + const cc = r.country?.code || r.country?.label; return { - country_code: r.country?.code ?? 'Unknown', + country_code: cc || 'Unknown', country_name: r.country?.label ?? '', download: r.download ?? 0, upload: ulMap[r.country?.code] ?? 0,