This commit is contained in:
Omar Albeik 2026-10-20 09:15:32 +00:00 • committed by GitHub
commit f545a6bd28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -223,10 +223,11 @@ describe('OutlineSharedMetricsPublisher', () => {
publisher.startSharing();
usageMetrics.reportedUsage = [
{country: 'AA', tunnelTimeSec: 99, inboundBytes: 11},
{country: 'SY', tunnelTimeSec: 88, inboundBytes: 11},
{country: 'CU', tunnelTimeSec: 88, inboundBytes: 11},
{country: 'CC', tunnelTimeSec: 77, inboundBytes: 22},
{country: 'AA', tunnelTimeSec: 66, inboundBytes: 33},
{country: 'DD', tunnelTimeSec: 55, inboundBytes: 33},
{country: 'SY', tunnelTimeSec: 44, inboundBytes: 44},
];
clock.nowMs += 60 * 60 * 1000;
@ -240,6 +241,7 @@ describe('OutlineSharedMetricsPublisher', () => {
{bytesTransferred: 22, tunnelTimeSec: 77, countries: ['CC']},
{bytesTransferred: 33, tunnelTimeSec: 66, countries: ['AA']},
{bytesTransferred: 33, tunnelTimeSec: 55, countries: ['DD']},
{bytesTransferred: 44, tunnelTimeSec: 44, countries: ['SY']},
],
});
publisher.stopSharing();

View file

@ -24,7 +24,7 @@ import {ServerConfigJson} from './server_config';
const MS_PER_HOUR = 60 * 60 * 1000;
const MS_PER_DAY = 24 * MS_PER_HOUR;
const SANCTIONED_COUNTRIES = new Set(['CU', 'KP', 'SY']);
const SANCTIONED_COUNTRIES = new Set(['CU', 'KP']);
export interface ReportedUsage {
country: string;