2019-07-01 12:52:24 +00:00
|
|
|
export const R_URL_REQUIRES_PROTOCOL = /^https?:\/\/[^/\s]+(\/.*)?$/;
|
2019-12-19 14:31:52 +00:00
|
|
|
export const R_HOST = /^(\*\.)?([\w-]+\.)+[\w-]+$/;
|
2019-12-12 18:48:17 +00:00
|
|
|
export const R_IPV4 = /^(?:(?:^|\.)(?:2(?:5[0-5]|[0-4]\d)|1?\d?\d)){4}$/;
|
|
|
|
export const R_IPV6 = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
|
|
|
|
export const R_CIDR = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/([0-9]|[1-2][0-9]|3[0-2]))$/;
|
|
|
|
export const R_MAC = /^((([a-fA-F0-9][a-fA-F0-9]+[-]){5}|([a-fA-F0-9][a-fA-F0-9]+[:]){5})([a-fA-F0-9][a-fA-F0-9])$)|(^([a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]+[.]){2}([a-fA-F0-9][a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]))$/;
|
2020-03-21 17:43:45 +00:00
|
|
|
export const R_CIDR_IPV6 = /^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(\/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))$/;
|
2020-01-21 13:57:51 +00:00
|
|
|
export const R_PATH_LAST_PART = /\/[^/]*$/;
|
2020-04-08 11:21:20 +00:00
|
|
|
// eslint-disable-next-line no-control-regex
|
|
|
|
export const R_UNIX_ABSOLUTE_PATH = /^(\/[^/\x00]+)+$/;
|
|
|
|
// eslint-disable-next-line no-control-regex
|
|
|
|
export const R_WIN_ABSOLUTE_PATH = /^([a-zA-Z]:)?(\\|\/)(?:[^\\/:*?"<>|\x00]+\\)*[^\\/:*?"<>|\x00]*$/;
|
2018-10-12 12:23:21 +00:00
|
|
|
|
|
|
|
export const STATS_NAMES = {
|
2018-11-09 06:51:28 +00:00
|
|
|
avg_processing_time: 'average_processing_time',
|
2018-10-12 12:23:21 +00:00
|
|
|
blocked_filtering: 'Blocked by filters',
|
|
|
|
dns_queries: 'DNS queries',
|
2018-11-09 06:51:28 +00:00
|
|
|
replaced_parental: 'stats_adult',
|
|
|
|
replaced_safebrowsing: 'stats_malware_phishing',
|
|
|
|
replaced_safesearch: 'enforced_save_search',
|
2018-10-12 12:23:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const STATUS_COLORS = {
|
|
|
|
blue: '#467fcf',
|
|
|
|
red: '#cd201f',
|
|
|
|
green: '#5eba00',
|
|
|
|
yellow: '#f1c40f',
|
|
|
|
};
|
2018-10-14 20:24:11 +00:00
|
|
|
|
|
|
|
export const REPOSITORY = {
|
2018-10-15 13:02:19 +00:00
|
|
|
URL: 'https://github.com/AdguardTeam/AdGuardHome',
|
2019-05-22 14:59:57 +00:00
|
|
|
TRACKERS_DB:
|
|
|
|
'https://github.com/AdguardTeam/AdGuardHome/tree/master/client/src/helpers/trackers/adguard.json',
|
2019-09-09 08:59:53 +00:00
|
|
|
ISSUES: 'https://github.com/AdguardTeam/AdGuardHome/issues/new/choose',
|
2018-10-14 20:24:11 +00:00
|
|
|
};
|
2018-11-21 08:43:55 +00:00
|
|
|
|
2019-04-17 12:03:25 +00:00
|
|
|
export const PRIVACY_POLICY_LINK = 'https://adguard.com/privacy/home.html';
|
|
|
|
|
2019-01-18 17:17:48 +00:00
|
|
|
export const INSTALL_FIRST_STEP = 1;
|
|
|
|
export const INSTALL_TOTAL_STEPS = 5;
|
2019-01-22 14:17:33 +00:00
|
|
|
|
|
|
|
export const SETTINGS_NAMES = {
|
|
|
|
filtering: 'filtering',
|
|
|
|
safebrowsing: 'safebrowsing',
|
|
|
|
parental: 'parental',
|
|
|
|
safesearch: 'safesearch',
|
|
|
|
};
|
2019-02-04 14:13:59 +00:00
|
|
|
|
|
|
|
export const STANDARD_DNS_PORT = 53;
|
2019-02-06 14:32:32 +00:00
|
|
|
export const STANDARD_WEB_PORT = 80;
|
2019-02-20 08:36:24 +00:00
|
|
|
export const STANDARD_HTTPS_PORT = 443;
|
2019-02-19 16:19:40 +00:00
|
|
|
|
2019-02-18 13:06:27 +00:00
|
|
|
export const EMPTY_DATE = '0001-01-01T00:00:00Z';
|
2019-02-19 15:56:13 +00:00
|
|
|
|
2019-02-19 16:19:40 +00:00
|
|
|
export const DEBOUNCE_TIMEOUT = 300;
|
2019-11-15 07:51:45 +00:00
|
|
|
export const DEBOUNCE_FILTER_TIMEOUT = 500;
|
2019-02-19 16:19:40 +00:00
|
|
|
export const CHECK_TIMEOUT = 1000;
|
2020-06-17 21:36:19 +00:00
|
|
|
export const SUCCESS_TOAST_TIMEOUT = 5000;
|
|
|
|
export const FAILURE_TOAST_TIMEOUT = 30000;
|
2020-06-18 19:53:02 +00:00
|
|
|
export const HIDE_TOOLTIP_DELAY = 300;
|
2020-07-06 16:58:44 +00:00
|
|
|
export const MODAL_OPEN_TIMEOUT = 150;
|
2019-02-19 16:19:40 +00:00
|
|
|
|
2019-02-19 15:56:13 +00:00
|
|
|
export const UNSAFE_PORTS = [
|
|
|
|
1,
|
|
|
|
7,
|
|
|
|
9,
|
|
|
|
11,
|
|
|
|
13,
|
|
|
|
15,
|
|
|
|
17,
|
|
|
|
19,
|
|
|
|
20,
|
|
|
|
21,
|
|
|
|
22,
|
|
|
|
23,
|
|
|
|
25,
|
|
|
|
37,
|
|
|
|
42,
|
|
|
|
43,
|
|
|
|
53,
|
|
|
|
77,
|
|
|
|
79,
|
|
|
|
87,
|
|
|
|
95,
|
|
|
|
101,
|
|
|
|
102,
|
|
|
|
103,
|
|
|
|
104,
|
|
|
|
109,
|
|
|
|
110,
|
|
|
|
111,
|
|
|
|
113,
|
|
|
|
115,
|
|
|
|
117,
|
|
|
|
119,
|
|
|
|
123,
|
|
|
|
135,
|
|
|
|
139,
|
|
|
|
143,
|
|
|
|
179,
|
|
|
|
389,
|
|
|
|
465,
|
|
|
|
512,
|
|
|
|
513,
|
|
|
|
514,
|
|
|
|
515,
|
|
|
|
526,
|
|
|
|
530,
|
|
|
|
531,
|
|
|
|
532,
|
|
|
|
540,
|
|
|
|
556,
|
|
|
|
563,
|
|
|
|
587,
|
|
|
|
601,
|
|
|
|
636,
|
|
|
|
993,
|
|
|
|
995,
|
|
|
|
2049,
|
|
|
|
3659,
|
|
|
|
4045,
|
|
|
|
6000,
|
|
|
|
6665,
|
|
|
|
6666,
|
|
|
|
6667,
|
|
|
|
6668,
|
|
|
|
6669,
|
|
|
|
];
|
2019-03-29 13:24:59 +00:00
|
|
|
|
|
|
|
export const ALL_INTERFACES_IP = '0.0.0.0';
|
2019-04-04 13:34:46 +00:00
|
|
|
|
2019-04-05 11:32:56 +00:00
|
|
|
export const DHCP_STATUS_RESPONSE = {
|
2019-04-04 13:34:46 +00:00
|
|
|
YES: 'yes',
|
|
|
|
NO: 'no',
|
|
|
|
ERROR: 'error',
|
|
|
|
};
|
2019-05-22 14:59:57 +00:00
|
|
|
|
|
|
|
export const MODAL_TYPE = {
|
2020-07-06 16:58:44 +00:00
|
|
|
SELECT_MODAL_TYPE: 'SELECT_MODAL_TYPE',
|
|
|
|
ADD_FILTERS: 'ADD_FILTERS',
|
|
|
|
EDIT_FILTERS: 'EDIT_FILTERS',
|
|
|
|
CHOOSE_FILTERING_LIST: 'CHOOSE_FILTERING_LIST',
|
2019-05-22 14:59:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const CLIENT_ID = {
|
|
|
|
MAC: 'mac',
|
|
|
|
IP: 'ip',
|
|
|
|
};
|
2019-06-03 12:41:45 +00:00
|
|
|
|
2020-02-26 16:58:25 +00:00
|
|
|
export const MENU_URLS = {
|
|
|
|
root: '/',
|
|
|
|
logs: '/logs',
|
|
|
|
guide: '/guide',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const SETTINGS_URLS = {
|
|
|
|
encryption: '/encryption',
|
|
|
|
dhcp: '/dhcp',
|
|
|
|
dns: '/dns',
|
|
|
|
settings: '/settings',
|
|
|
|
clients: '/clients',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const FILTERS_URLS = {
|
|
|
|
dns_blocklists: '/filters',
|
|
|
|
dns_allowlists: '/dns_allowlists',
|
|
|
|
dns_rewrites: '/dns_rewrites',
|
|
|
|
custom_rules: '/custom_rules',
|
2020-06-05 10:03:48 +00:00
|
|
|
blocked_services: '/blocked_services',
|
2020-02-26 16:58:25 +00:00
|
|
|
};
|
2019-07-18 11:52:47 +00:00
|
|
|
|
|
|
|
export const SERVICES = [
|
|
|
|
{
|
|
|
|
id: 'facebook',
|
|
|
|
name: 'Facebook',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'whatsapp',
|
|
|
|
name: 'WhatsApp',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'instagram',
|
|
|
|
name: 'Instagram',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'twitter',
|
|
|
|
name: 'Twitter',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'youtube',
|
|
|
|
name: 'YouTube',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'netflix',
|
|
|
|
name: 'Netflix',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'snapchat',
|
|
|
|
name: 'Snapchat',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'twitch',
|
|
|
|
name: 'Twitch',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'discord',
|
|
|
|
name: 'Discord',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'skype',
|
|
|
|
name: 'Skype',
|
|
|
|
},
|
2019-11-06 09:00:12 +00:00
|
|
|
{
|
|
|
|
id: 'amazon',
|
|
|
|
name: 'Amazon',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'ebay',
|
|
|
|
name: 'eBay',
|
|
|
|
},
|
2019-11-05 13:03:28 +00:00
|
|
|
{
|
|
|
|
id: 'origin',
|
|
|
|
name: 'Origin',
|
|
|
|
},
|
2019-11-06 12:07:28 +00:00
|
|
|
{
|
|
|
|
id: 'cloudflare',
|
|
|
|
name: 'Cloudflare',
|
|
|
|
},
|
2019-07-18 11:52:47 +00:00
|
|
|
{
|
|
|
|
id: 'steam',
|
|
|
|
name: 'Steam',
|
|
|
|
},
|
2019-10-04 13:38:04 +00:00
|
|
|
{
|
|
|
|
id: 'epic_games',
|
|
|
|
name: 'Epic Games',
|
|
|
|
},
|
2019-10-30 02:05:44 +00:00
|
|
|
{
|
|
|
|
id: 'reddit',
|
|
|
|
name: 'Reddit',
|
|
|
|
},
|
2019-07-18 11:52:47 +00:00
|
|
|
{
|
|
|
|
id: 'ok',
|
|
|
|
name: 'OK',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'vk',
|
|
|
|
name: 'VK',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'mail_ru',
|
|
|
|
name: 'mail.ru',
|
|
|
|
},
|
2019-08-29 08:40:17 +00:00
|
|
|
{
|
|
|
|
id: 'tiktok',
|
|
|
|
name: 'TikTok',
|
|
|
|
},
|
2019-07-18 11:52:47 +00:00
|
|
|
];
|
2019-08-28 15:55:53 +00:00
|
|
|
|
|
|
|
export const ENCRYPTION_SOURCE = {
|
|
|
|
PATH: 'path',
|
|
|
|
CONTENT: 'content',
|
|
|
|
};
|
2019-08-30 13:03:36 +00:00
|
|
|
|
2020-01-22 14:25:50 +00:00
|
|
|
export const FILTERED = 'Filtered';
|
|
|
|
export const NOT_FILTERED = 'NotFiltered';
|
|
|
|
|
2019-08-27 13:43:58 +00:00
|
|
|
export const STATS_INTERVALS_DAYS = [1, 7, 30, 90];
|
2019-09-04 14:39:35 +00:00
|
|
|
|
|
|
|
export const QUERY_LOG_INTERVALS_DAYS = [1, 7, 30, 90];
|
2019-09-12 13:19:35 +00:00
|
|
|
|
|
|
|
export const FILTERS_INTERVALS_HOURS = [0, 1, 12, 24, 72, 168];
|
2019-09-24 12:28:59 +00:00
|
|
|
|
2019-12-04 18:52:38 +00:00
|
|
|
export const BLOCKING_MODES = {
|
2020-01-17 12:03:47 +00:00
|
|
|
default: 'default',
|
2019-12-04 18:52:38 +00:00
|
|
|
nxdomain: 'nxdomain',
|
|
|
|
null_ip: 'null_ip',
|
|
|
|
custom_ip: 'custom_ip',
|
|
|
|
};
|
|
|
|
|
2019-09-24 12:28:59 +00:00
|
|
|
export const WHOIS_ICONS = {
|
|
|
|
location: 'location',
|
|
|
|
orgname: 'network',
|
|
|
|
netname: 'network',
|
|
|
|
descr: '',
|
|
|
|
};
|
2019-09-20 12:05:10 +00:00
|
|
|
|
|
|
|
export const DNS_RECORD_TYPES = [
|
|
|
|
'A',
|
|
|
|
'AAAA',
|
|
|
|
'AFSDB',
|
|
|
|
'APL',
|
|
|
|
'CAA',
|
|
|
|
'CDNSKEY',
|
|
|
|
'CDS',
|
|
|
|
'CERT',
|
|
|
|
'CNAME',
|
|
|
|
'CSYNC',
|
|
|
|
'DHCID',
|
|
|
|
'DLV',
|
|
|
|
'DNAME',
|
|
|
|
'DNSKEY',
|
|
|
|
'DS',
|
|
|
|
'HIP',
|
|
|
|
'IPSECKEY',
|
|
|
|
'KEY',
|
|
|
|
'KX',
|
|
|
|
'LOC',
|
|
|
|
'MX',
|
|
|
|
'NAPTR',
|
|
|
|
'NS',
|
|
|
|
'NSEC',
|
|
|
|
'NSEC3',
|
|
|
|
'NSEC3PARAM',
|
|
|
|
'OPENPGPKEY',
|
|
|
|
'PTR',
|
|
|
|
'RRSIG',
|
|
|
|
'RP',
|
|
|
|
'SIG',
|
|
|
|
'SMIMEA',
|
|
|
|
'SOA',
|
|
|
|
'SRV',
|
|
|
|
'SSHFP',
|
|
|
|
'TA',
|
|
|
|
'TKEY',
|
|
|
|
'TLSA',
|
|
|
|
'TSIG',
|
|
|
|
'TXT',
|
|
|
|
'URI',
|
|
|
|
];
|
2019-09-26 08:36:02 +00:00
|
|
|
|
|
|
|
export const DEFAULT_LOGS_FILTER = {
|
2020-06-17 21:36:19 +00:00
|
|
|
search: '',
|
|
|
|
response_status: '',
|
2019-09-26 08:36:02 +00:00
|
|
|
};
|
2019-10-18 11:15:06 +00:00
|
|
|
|
|
|
|
export const DEFAULT_LANGUAGE = 'en';
|
2019-11-15 07:51:45 +00:00
|
|
|
|
2020-06-17 21:36:19 +00:00
|
|
|
export const TABLE_DEFAULT_PAGE_SIZE = 50;
|
2019-11-26 17:50:02 +00:00
|
|
|
|
2020-06-17 21:36:19 +00:00
|
|
|
export const TABLE_FIRST_PAGE = 0;
|
|
|
|
|
|
|
|
export const LEASES_TABLE_DEFAULT_PAGE_SIZE = 20;
|
2019-11-26 17:50:02 +00:00
|
|
|
|
2020-06-17 21:36:19 +00:00
|
|
|
export const FILTERED_STATUS = {
|
|
|
|
FILTERED_BLACK_LIST: 'FilteredBlackList',
|
|
|
|
NOT_FILTERED_WHITE_LIST: 'NotFilteredWhiteList',
|
|
|
|
NOT_FILTERED_NOT_FOUND: 'NotFilteredNotFound',
|
|
|
|
FILTERED_BLOCKED_SERVICE: 'FilteredBlockedService',
|
|
|
|
REWRITE: 'Rewrite',
|
|
|
|
REWRITE_HOSTS: 'RewriteEtcHosts',
|
|
|
|
FILTERED_SAFE_SEARCH: 'FilteredSafeSearch',
|
|
|
|
FILTERED_SAFE_BROWSING: 'FilteredSafeBrowsing',
|
|
|
|
FILTERED_PARENTAL: 'FilteredParental',
|
|
|
|
};
|
2019-11-26 17:50:02 +00:00
|
|
|
|
2019-11-15 07:51:45 +00:00
|
|
|
export const RESPONSE_FILTER = {
|
2020-06-17 21:36:19 +00:00
|
|
|
ALL: {
|
|
|
|
query: 'all',
|
|
|
|
label: 'show_all_responses',
|
|
|
|
},
|
|
|
|
FILTERED: {
|
|
|
|
query: 'filtered',
|
|
|
|
label: 'filtered',
|
|
|
|
},
|
|
|
|
PROCESSED: {
|
|
|
|
query: 'processed',
|
|
|
|
label: 'show_processed_responses',
|
|
|
|
},
|
|
|
|
SPACE: {
|
|
|
|
query: 'all',
|
|
|
|
label: '',
|
|
|
|
disabled: true,
|
|
|
|
},
|
|
|
|
BLOCKED: {
|
|
|
|
query: 'blocked',
|
|
|
|
label: 'show_blocked_responses',
|
|
|
|
},
|
|
|
|
BLOCKED_THREATS: {
|
|
|
|
query: 'blocked_safebrowsing',
|
|
|
|
label: 'blocked_threats',
|
|
|
|
},
|
|
|
|
BLOCKED_ADULT_WEBSITES: {
|
|
|
|
query: 'blocked_parental',
|
|
|
|
label: 'blocked_adult_websites',
|
|
|
|
},
|
|
|
|
ALLOWED: {
|
|
|
|
query: 'whitelisted',
|
|
|
|
label: 'allowed',
|
|
|
|
},
|
|
|
|
REWRITTEN: {
|
|
|
|
query: 'rewritten',
|
|
|
|
label: 'rewritten',
|
|
|
|
},
|
|
|
|
SAFE_SEARCH: {
|
|
|
|
query: 'safe_search',
|
|
|
|
label: 'safe_search',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
export const FILTERED_STATUS_TO_META_MAP = {
|
|
|
|
[FILTERED_STATUS.NOT_FILTERED_WHITE_LIST]: {
|
|
|
|
label: RESPONSE_FILTER.ALLOWED.label,
|
|
|
|
color: 'green',
|
|
|
|
},
|
|
|
|
[FILTERED_STATUS.NOT_FILTERED_NOT_FOUND]: {
|
|
|
|
label: RESPONSE_FILTER.PROCESSED.label,
|
|
|
|
color: 'white',
|
|
|
|
},
|
|
|
|
[FILTERED_STATUS.FILTERED_BLOCKED_SERVICE]: {
|
|
|
|
label: RESPONSE_FILTER.BLOCKED.label,
|
|
|
|
color: 'red',
|
|
|
|
},
|
|
|
|
[FILTERED_STATUS.FILTERED_SAFE_SEARCH]: {
|
|
|
|
label: RESPONSE_FILTER.SAFE_SEARCH.label,
|
|
|
|
color: 'yellow',
|
|
|
|
},
|
|
|
|
[FILTERED_STATUS.FILTERED_BLACK_LIST]: {
|
|
|
|
label: RESPONSE_FILTER.BLOCKED.label,
|
|
|
|
color: 'red',
|
|
|
|
},
|
|
|
|
[FILTERED_STATUS.REWRITE]: {
|
|
|
|
label: RESPONSE_FILTER.REWRITTEN.label,
|
|
|
|
color: 'blue',
|
|
|
|
},
|
|
|
|
[FILTERED_STATUS.REWRITE_HOSTS]: {
|
|
|
|
label: RESPONSE_FILTER.REWRITTEN.label,
|
|
|
|
color: 'blue',
|
|
|
|
},
|
|
|
|
[FILTERED_STATUS.FILTERED_SAFE_BROWSING]: {
|
|
|
|
label: RESPONSE_FILTER.BLOCKED_THREATS.label,
|
|
|
|
color: 'yellow',
|
|
|
|
},
|
|
|
|
[FILTERED_STATUS.FILTERED_PARENTAL]: {
|
|
|
|
label: RESPONSE_FILTER.BLOCKED_ADULT_WEBSITES.label,
|
|
|
|
color: 'yellow',
|
|
|
|
},
|
2019-11-15 07:51:45 +00:00
|
|
|
};
|
2020-01-24 15:59:38 +00:00
|
|
|
|
|
|
|
export const DEFAULT_TIME_FORMAT = 'HH:mm:ss';
|
|
|
|
|
2020-06-17 21:36:19 +00:00
|
|
|
export const LONG_TIME_FORMAT = 'HH:mm:ss.SSS';
|
|
|
|
|
|
|
|
export const DEFAULT_SHORT_DATE_FORMAT_OPTIONS = {
|
|
|
|
year: 'numeric',
|
|
|
|
month: 'numeric',
|
|
|
|
day: 'numeric',
|
|
|
|
hour12: false,
|
|
|
|
};
|
|
|
|
|
2020-01-24 15:59:38 +00:00
|
|
|
export const DEFAULT_DATE_FORMAT_OPTIONS = {
|
|
|
|
year: 'numeric',
|
|
|
|
month: 'numeric',
|
|
|
|
day: 'numeric',
|
|
|
|
hour: 'numeric',
|
|
|
|
minute: 'numeric',
|
|
|
|
hour12: false,
|
|
|
|
};
|
|
|
|
|
|
|
|
export const DETAILED_DATE_FORMAT_OPTIONS = {
|
|
|
|
...DEFAULT_DATE_FORMAT_OPTIONS,
|
|
|
|
month: 'long',
|
|
|
|
};
|
2020-01-29 12:00:37 +00:00
|
|
|
|
|
|
|
export const CUSTOM_FILTERING_RULES_ID = 0;
|
2020-01-30 10:58:54 +00:00
|
|
|
|
2020-06-17 21:36:19 +00:00
|
|
|
export const BLOCK_ACTIONS = {
|
|
|
|
BLOCK: 'block',
|
|
|
|
UNBLOCK: 'unblock',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const SCHEME_TO_PROTOCOL_MAP = {
|
|
|
|
doh: 'dns_over_https',
|
|
|
|
dot: 'dns_over_tls',
|
|
|
|
'': 'plain_dns',
|
2020-01-30 10:58:54 +00:00
|
|
|
};
|
2020-05-25 16:41:04 +00:00
|
|
|
|
|
|
|
export const DNS_REQUEST_OPTIONS = {
|
2020-06-10 16:04:19 +00:00
|
|
|
PARALLEL: 'parallel',
|
2020-05-25 16:41:04 +00:00
|
|
|
FASTEST_ADDR: 'fastest_addr',
|
2020-06-10 16:04:19 +00:00
|
|
|
LOAD_BALANCING: '',
|
2020-05-25 16:41:04 +00:00
|
|
|
};
|
2020-05-29 09:53:40 +00:00
|
|
|
|
|
|
|
export const IP_MATCH_LIST_STATUS = {
|
|
|
|
NOT_FOUND: 'NOT_FOUND', // not found in the list
|
2020-06-10 16:04:19 +00:00
|
|
|
EXACT: 'EXACT', // found exact match (including the match of short and long forms)
|
2020-05-29 09:53:40 +00:00
|
|
|
CIDR: 'CIDR', // the ip is in the specified CIDR range
|
|
|
|
};
|
2020-06-10 16:04:19 +00:00
|
|
|
|
|
|
|
export const FORM_NAME = {
|
|
|
|
UPSTREAM: 'upstream',
|
|
|
|
DOMAIN_CHECK: 'domainCheck',
|
|
|
|
FILTER: 'filter',
|
|
|
|
REWRITES: 'rewrites',
|
|
|
|
LOGS_FILTER: 'logsFilter',
|
|
|
|
CLIENT: 'client',
|
|
|
|
DHCP: 'dhcp',
|
|
|
|
LEASE: 'lease',
|
|
|
|
ACCESS: 'access',
|
|
|
|
BLOCKING_MODE: 'blockingMode',
|
|
|
|
ENCRYPTION: 'encryption',
|
|
|
|
FILTER_CONFIG: 'filterConfig',
|
|
|
|
LOG_CONFIG: 'logConfig',
|
|
|
|
SERVICES: 'services',
|
|
|
|
STATS_CONFIG: 'statsConfig',
|
|
|
|
INSTALL: 'install',
|
|
|
|
LOGIN: 'login',
|
2020-07-03 13:53:53 +00:00
|
|
|
CACHE: 'cache',
|
2020-06-10 16:04:19 +00:00
|
|
|
};
|
2020-06-17 21:36:19 +00:00
|
|
|
|
|
|
|
export const smallScreenSize = 767;
|
2020-07-03 16:10:05 +00:00
|
|
|
|
|
|
|
export const SECONDS_IN_HOUR = 60 * 60;
|