-
Notifications
You must be signed in to change notification settings - Fork 477
Expand file tree
/
Copy pathutils.ts
More file actions
57 lines (52 loc) · 1.19 KB
/
utils.ts
File metadata and controls
57 lines (52 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import * as process from 'process'
export function getBaseURL(): string {
return process.env['NODE_ENV'] === 'production' ? prodURL() : 'http://localhost:8899';
}
function prodURL(): string {
const location = window.location;
return location.protocol + "//" + location.host;
}
export interface Proxy {
id: number;
ip: string;
port: number;
is_valid: boolean;
created_at: number;
updated_at: number;
latency: number;
stability: number;
is_anonymous: boolean;
is_https: boolean;
location: string;
organization: string;
region: string;
country: string;
city: string;
asn: string;
isp: string;
state: string;
zipcode: string;
latitude: number;
longitude: number;
timezone: string;
localtime: string;
is_mobile: boolean;
is_vpn: boolean;
is_tor: boolean;
is_proxy: boolean;
is_datacenter: boolean;
risk_score: number;
}
export interface ResponseJSON {
proxies: Proxy[];
count: number;
per_page: number;
page: number;
total_page: number;
}
export interface StatsResponseJSON {
mean: number;
median: number;
total_count: number;
valid_count: number;
}