-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathconfig-example.yml
52 lines (51 loc) · 2.87 KB
/
config-example.yml
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
databases:
- name: "My IPv4 GeoIP DB"
mmdb:
ipVersion: 4 # Note: IPv4 mmdb can only hold IPv4.
recordSize: 24 # One of 24, 28, 32. Start small, increase if it fails.
types: # Best to always use the same established keys as MaxMind.
"country.iso_code": string
"autonomous_system_organization": string
"autonomous_system_number": uint32
inputs: # Source data and their mapping.
# Inputs are processed as listed. Earlier entries are overwritten by later entries.
- file: "input/iptoasn-asn-ipv4.csv"
fields: ["from", "to", "autonomous_system_number", "autonomous_system_organization"]
- file: "input/geo-whois-asn-country-ipv4.csv"
fields: ["from", "to", "country.iso_code"]
output: output/geoip-v4.mmdb
optimize:
floatDecimals: 2 # Limit floats (eg. coordinates) to decimals for smaller DB size. (0=off, set to -1 to no decimals)
forceIPVersion: true # Check IPs and discard IPs with the wrong version. (IPv4 and live in IPv6 mmdb)
maxPrefix: 0 # Remove any network prefixes greater than maxPrefix for smaller DB size. (0=off)
merge:
conditionalResets: # Reset set of top level entries if another set is changed.
# Reset the location entry when the country is changed.
# If the new entry also has a location, it is kept, but a different country without location resets the location.
- ifChanged: ["country"]
reset: ["location"]
- name: "My IPv6 GeoIP DB"
mmdb:
ipVersion: 6 # Note: IPv6 mmdb can also hold IPv4.
recordSize: 24 # One of 24, 28, 32. Start small, increase if it fails.
types: # Best to always use the same established keys as MaxMind.
"country.iso_code": string
"autonomous_system_organization": string
"autonomous_system_number": uint32
inputs: # Source data and their mapping.
# Inputs are processed as listed. Earlier entries are overwritten by later entries.
- file: "input/iptoasn-asn-ipv6.csv"
fields: ["from", "to", "autonomous_system_number", "autonomous_system_organization"]
- file: "input/geo-whois-asn-country-ipv6.csv"
fields: ["from", "to", "country.iso_code"]
output: output/geoip-v6.mmdb
optimize:
floatDecimals: 2 # Limit floats (eg. coordinates) to decimals for smaller DB size. (0=off, set to -1 to no decimals)
forceIPVersion: true # Check IPs and discard IPs with the wrong version. (IPv4 and live in IPv6 mmdb)
maxPrefix: 0 # Remove any network prefixes greater than maxPrefix for smaller DB size. (0=off)
merge:
conditionalResets: # Reset set of top level entries if another set is changed.
# Reset the location entry when the country is changed.
# If the new entry also has a location, it is kept, but a different country without location resets the location.
- ifChanged: ["country"]
reset: ["location"]