-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsettings_global.py
More file actions
59 lines (46 loc) · 1.6 KB
/
settings_global.py
File metadata and controls
59 lines (46 loc) · 1.6 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
import os, string
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
WHOIS_UPSTREAMS = {
'RADB': {
"name": "RADB",
"dump_uri": "ftp://ftp.radb.net/radb/dbase/radb.db.gz",
"serial_uri": "ftp://ftp.radb.net/radb/dbase/RADB.CURRENTSERIAL",
"telnet": ("whois.radb.net", 43),
},
'RIPE': {
"name": "RIPE",
"dump_uri": "ftp://ftp.ripe.net/ripe/dbase/ripe.db.gz",
"serial_uri": "ftp://ftp.ripe.net/ripe/dbase/RIPE.CURRENTSERIAL",
"telnet": ("nrtm.db.ripe.net", 4444),
},
'LEVEL3': {
'name': "LEVEL3",
'serial_uri': 'ftp://rr.level3.net/pub/rr/LEVEL3.CURRENTSERIAL',
'dump_uri': 'ftp://rr.level3.net/pub/rr/level3.db.gz',
'telnet': ('rr.Level3.net', 43),
},
'ARIN': {
"name": "ARIN",
'serial_uri': 'ftp://ftp.arin.net/pub/rr/ARIN.CURRENTSERIAL',
'dump_uri': 'ftp://ftp.arin.net/pub/rr/arin.db',
'telnet': ('rr.arin.net', 4444),
},
'ALTDB': {
'name': "ALTDB",
'serial_uri': 'ftp://ftp.altdb.net/pub/altdb/ALTDB.CURRENTSERIAL',
'dump_uri': 'ftp://ftp.altdb.net/pub/altdb/altdb.db.gz',
'telnet': ('whois.altdb.net', 43),
}
}
# Path to the cache data directory. Must exist.
CACHE_DATA_DIRECTORY = os.path.join(BASE_DIR, 'data')
# Seconds between WHOIS update query
WHOIS_UPDATE_INTERVAL = 60
HTTP_ENDPOINT = ('0.0.0.0', 8087)
# Read server version
try:
version_file = open(os.path.join(BASE_DIR, 'VERSION'), 'r')
VERSION = string.strip(version_file.read())
version_file.close()
except:
VERSION = 'unknown'