-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathccc-constants.js
More file actions
45 lines (37 loc) · 2.24 KB
/
ccc-constants.js
File metadata and controls
45 lines (37 loc) · 2.24 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
function init() {
global.CCC_SERVICE_DETECTION_STATUS_LABEL = {
'CDN': 'CDN',
'ERROR': 'Error',
'AWS': 'AWS',
'AZURE': 'Azure',
'OTHER': 'Other Internet Service',
'UNKNOWN': 'Unknown'
};
global.CCC_DNS = {
'REQUEST_RECORD_TYPE': 'A',
'DEFAULT_RESOLVER': '8.8.8.8'
};
global.CCC_DNS_REQUEST_RECORD_TYPE = global.CCC_DNS.REQUEST_RECORD_TYPE;
global.CCC_REQUEST = {
'WARNING_THRESHOLD': 5
};
global.CCC_HTTP_CONCURRENCY_LIMIT = 10; // Maximum number of concurrent HTTP requests
global.CCC_OUTPUT = {
'REDIRECT_INDICATOR': '\u00AE',
'PADDING_CHARACTER': '.'
};
global.CCC_SERVICE_DETECTION_DEFAULT_RESPONSE = {
fqdn: null, // The Fully Qualified Domain Name being inspected
ipAddress: null, // The IP address the FQDN resolves to (*** what if it resolves to multiple addresses?)
message: null, // The last message generated by Service Detection
messages: [], // All the messages generated by Service Detection
reason: null, // Descriptive text behind detection result shown via --verbose switch
region: null, // Cloud region string hosting the service, if applicable
regionId: 0, // Cloud region ID hosting the service, if applicable
service: null, // Service name/title/label/identifier
serviceDetected: false, // True when a service detection function has identified a service behind the domain/IP address
status: global.CCC_SERVICE_DETECTION_STATUS_LABEL.UNKNOWN, // Service Detection Status. one of CCC_SERVICE_DETECTION_STATUS_LABEL
};
global.CCC_DEFAULT_USERAGENT = 'ccc/1.0'; // The default user-agent string used in HTTP(S) requests
}
module.exports = { init };