-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.ts
32 lines (29 loc) · 854 Bytes
/
config.ts
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
import { DNSConfig } from "./dns_server_config.ts";
export class ServerConfig {
/** The IP Address which should be used to listen for requests on. */
public static readonly IP = '0.0.0.0';
/** The UDP Port that the server will listen on - usually 53 for DNS. */
public static readonly PORT = 53;
/** The list of DNS records that the server will serve records for. */
public static readonly RECORDS:DNSConfig = {
'example.com': {
ttl: 3600,
class: {
'IN': {
'A': '127.0.0.1',
// TODO: Currently only A is returned as logic in dns_server shortcircuits the AAAA record.
'AAAA': '::1',
'TXT': 'This is some text.',
}
}
},
'alias.example.com': {
ttl: 3600,
class: {
'IN': {
'CNAME': 'example.com',
}
}
}
};
}