mirror of
https://github.com/OutlineFoundation/outline-server.git
synced 2026-10-21 12:00:57 +00:00
Merge ab20043c12 into de566bfc9f
This commit is contained in:
commit
f545a6bd28
2 changed files with 4 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue