@ip-location-db/asn 2.3.2024081818 → 2.3.2024082018

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,100 +1,47 @@
1
- # ip-location-db
1
+ # [ip-location-db](https://github.com/sapics/ip-location-db)/asn
2
2
 
3
+ ## Download
3
4
 
4
- | Database | Type | License | Update | ipv4 | ipv6 | ipv4-num | ipv6-num |
5
+ | Database | Type | License | Updated | IPv4 | IPv6 | IPv4-num | IPv6-num |
5
6
  |---|---|---|---|---|---|---|---|
6
- | ASN <br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/asn-country?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/asn-country) | Country | [CC0](https://creativecommons.org/publicdomain/zero/1.0/deed) | Daily | [asn-country-ipv4.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/asn-country/asn-country-ipv4.csv) | [asn-country-ipv6.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/asn-country/asn-country-ipv6.csv) |[asn-country-ipv4-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/asn-country/asn-country-ipv4-num.csv) | [asn-country-ipv6-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/asn-country/asn-country-ipv6-num.csv) |
7
- | GeoFeed + ASN<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/geo-asn-country?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/geo-asn-country) | Country | [CC0](https://creativecommons.org/publicdomain/zero/1.0/deed) | Daily | [geo-asn-country-ipv4.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geo-asn-country/geo-asn-country-ipv4.csv) | [geo-asn-country-ipv6.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geo-asn-country/geo-asn-country-ipv6.csv) | [geo-asn-country-ipv4-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geo-asn-country/geo-asn-country-ipv4-num.csv) | [geo-asn-country-ipv6-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geo-asn-country/geo-asn-country-ipv6-num.csv) |
8
- | GeoFeed + Whois + ASN<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/geo-whois-asn-country?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/geo-whois-asn-country)| Country | [CC0](https://creativecommons.org/publicdomain/zero/1.0/deed) | Daily | [geo-whois-asn-country-ipv4.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geo-whois-asn-country/geo-whois-asn-country-ipv4.csv) | [geo-whois-asn-country-ipv6.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geo-whois-asn-country/geo-whois-asn-country-ipv6.csv) | [geo-whois-asn-country-ipv4-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geo-whois-asn-country/geo-whois-asn-country-ipv4-num.csv) | [geo-whois-asn-country-ipv6-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geo-whois-asn-country/geo-whois-asn-country-ipv6-num.csv) |
9
- | [RouteViews](https://www.routeviews.org/routeviews/) + ASN + [DB-IP](https://db-ip.com/)<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/asn?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/asn)| ASN | [CC BY 4.0](ttps://creativecommons.org/licenses/by/4.0/) by [RouteViews](https://www.routeviews.org/routeviews/)<sup>&diams;</sup> and [DB-IP](https://db-ip.com/)<sup>&#9733;</sup> | Daily | [asn-ipv4.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/asn/asn-ipv4.csv) | [asn-ipv6.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/asn/asn-ipv6.csv) | [asn-ipv4-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/asn/asn-ipv4-num.csv) | [asn-ipv6-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/asn/asn-ipv6-num.csv) |
10
- | [IPtoASN](https://iptoasn.com/)<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/iptoasn-asn?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/iptoasn-asn)| ASN | [PDDL](https://opendatacommons.org/licenses/pddl/1.0/) by [IPtoASN](https://iptoasn.com/)<sup>&clubs;</sup> | Daily | [iptoasn-asn-ipv4.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/iptoasn-asn/iptoasn-asn-ipv4.csv) | [iptoasn-asn-ipv6.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/iptoasn-asn/iptoasn-asn-ipv6.csv) | [iptoasn-asn-ipv4-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/iptoasn-asn/iptoasn-asn-ipv4-num.csv) | [iptoasn-asn-ipv6-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/iptoasn-asn/iptoasn-asn-ipv6-num.csv) |
11
- | [IPtoASN](https://iptoasn.com/)<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/iptoasn-country?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/iptoasn-country)| Country | [PDDL](https://opendatacommons.org/licenses/pddl/1.0/) by [IPtoASN](https://iptoasn.com/)<sup>&clubs;</sup> | Daily | [iptoasn-country-ipv4.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/iptoasn-country/iptoasn-country-ipv4.csv) | [iptoasn-country-ipv6.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/iptoasn-country/iptoasn-country-ipv6.csv) | [iptoasn-country-ipv4-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/iptoasn-country/iptoasn-country-ipv4-num.csv) | [iptoasn-country-ipv6-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/iptoasn-country/iptoasn-country-ipv6-num.csv) |<!-- | [Webnet77](http://software77.net/geo-ip/)<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/webnet77-country?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/webnet77-country)| Country | [Donationware](http://en.wikipedia.org/wiki/Donationware) by [Webnet77](http://software77.net/geo-ip/)<sup>&spades;</sup> | Daily | [webnet77-country-ipv4.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/webnet77-country/webnet77-country-ipv4.csv) | [webnet77-country-ipv6.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/webnet77-country/webnet77-country-ipv6.csv) | [webnet77-country-ipv4-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/webnet77-country/webnet77-country-ipv4-num.csv) | [webnet77-country-ipv6-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/webnet77-country/webnet77-country-ipv6-num.csv) | -->
12
- | [DB-IP](https://db-ip.com/) Lite<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/dbip-asn?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/dbip-asn)| ASN | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) <br> by [DB-IP](https://db-ip.com/)<sup>&#9733;</sup> | Monthly | [dbip-asn-ipv4.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/dbip-asn/dbip-asn-ipv4.csv) | [dbip-asn-ipv6.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/dbip-asn/dbip-asn-ipv6.csv) | [dbip-asn-ipv4-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/dbip-asn/dbip-asn-ipv4-num.csv) | [dbip-asn-ipv6-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/dbip-asn/dbip-asn-ipv6-num.csv) |
13
- | [DB-IP](https://db-ip.com/) Lite<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/dbip-country?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/dbip-country)| Country | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) <br> by [DB-IP](https://db-ip.com/)<sup>&#9733;</sup> | Monthly | [dbip-country-ipv4.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/dbip-country/dbip-country-ipv4.csv) | [dbip-country-ipv6.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/dbip-country/dbip-country-ipv6.csv) | [dbip-country-ipv4-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/dbip-country/dbip-country-ipv4-num.csv) | [dbip-country-ipv6-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/dbip-country/dbip-country-ipv6-num.csv) |
14
- | [DB-IP](https://db-ip.com/) Lite<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/dbip-city?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/dbip-city)<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/dbip-city-7z?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/dbip-city-7z) | City | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) <br> by [DB-IP](https://db-ip.com/)<sup>&#9733;</sup> | Monthly | [dbip-city-ipv4.csv.gz](https://github.com/sapics/ip-location-db/raw/master/dbip-city/dbip-city-ipv4.csv.gz)<br>[dbip-city-ipv4.csv.7z](https://github.com/sapics/ip-location-db/raw/master/dbip-city-7z/dbip-city-ipv4.csv.7z) | [dbip-city-ipv6.csv.gz](https://github.com/sapics/ip-location-db/raw/master/dbip-city/dbip-city-ipv6.csv.gz)<br>[dbip-city-ipv6.csv.7z](https://github.com/sapics/ip-location-db/raw/master/dbip-city-7z/dbip-city-ipv6.csv.7z) | [dbip-city-ipv4-num.csv.gz](https://github.com/sapics/ip-location-db/raw/master/dbip-city/dbip-city-ipv4-num.csv.gz)<br>[dbip-city-ipv4-num.csv.7z](https://github.com/sapics/ip-location-db/raw/master/dbip-city-7z/dbip-city-ipv4-num.csv.7z) | [dbip-city-ipv6-num.csv.gz](https://github.com/sapics/ip-location-db/raw/master/dbip-city/dbip-city-ipv6-num.csv.gz)<br>[dbip-city-ipv6-num.csv.7z](https://github.com/sapics/ip-location-db/raw/master/dbip-city-7z/dbip-city-ipv6-num.csv.7z) |
15
- | [GeoLite2](https://dev.maxmind.com/geoip/geoip2/geolite2/)<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/geolite2-asn?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/geolite2-asn)| ASN | GeoLite2 License by [MaxMind](https://www.maxmind.com/)<sup>&hearts;</sup> | Weekly | [geolite2-asn-ipv4.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geolite2-asn/geolite2-asn-ipv4.csv) | [geolite2-asn-ipv6.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geolite2-asn/geolite2-asn-ipv6.csv) | [geolite2-asn-ipv4-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geolite2-asn/geolite2-asn-ipv4-num.csv) | [geolite2-asn-ipv6-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geolite2-asn/geolite2-asn-ipv6-num.csv) |
16
- | [GeoLite2](https://dev.maxmind.com/geoip/geoip2/geolite2/)<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/geolite2-country?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/geolite2-country)| Country | GeoLite2 License by [MaxMind](https://www.maxmind.com/)<sup>&hearts;</sup> | Weekly | [geolite2-country-ipv4.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geolite2-country/geolite2-country-ipv4.csv) | [geolite2-country-ipv6.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geolite2-country/geolite2-country-ipv6.csv) | [geolite2-country-ipv4-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geolite2-country/geolite2-country-ipv4-num.csv) | [geolite2-country-ipv6-num.csv](https://cdn.jsdelivr.net/npm/@ip-location-db/geolite2-country/geolite2-country-ipv6-num.csv) |
17
- | [GeoLite2](https://dev.maxmind.com/geoip/geoip2/geolite2/)<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/geolite2-city?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/geolite2-city)<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/geolite2-city-7z?color=success&style=flat-square&label=%20)](https://www.npmjs.com/package/@ip-location-db/geolite2-city-7z) | City | GeoLite2 License by [MaxMind](https://www.maxmind.com/)<sup>&hearts;</sup> | Weekly | [geolite2-city-ipv4.csv.gz](https://github.com/sapics/ip-location-db/raw/master/geolite2-city/geolite2-city-ipv4.csv.gz)<br>[geolite2-city-ipv4.csv.7z](https://github.com/sapics/ip-location-db/raw/master/geolite2-city-7z/geolite2-city-ipv4.csv.7z) | [geolite2-city-ipv6.csv.gz](https://github.com/sapics/ip-location-db/raw/master/geolite2-city/geolite2-city-ipv6.csv.gz)<br>[geolite2-city-ipv6.csv.7z](https://github.com/sapics/ip-location-db/raw/master/geolite2-city-7z/geolite2-city-ipv6.csv.7z) | [geolite2-city-ipv4-num.csv.gz](https://github.com/sapics/ip-location-db/raw/master/geolite2-city/geolite2-city-ipv4-num.csv.gz)<br>[geolite2-city-ipv4-num.csv.7z](https://github.com/sapics/ip-location-db/raw/master/geolite2-city-7z/geolite2-city-ipv4-num.csv.7z) | [geolite2-city-ipv6-num.csv.gz](https://github.com/sapics/ip-location-db/raw/master/geolite2-city/geolite2-city-ipv6-num.csv.gz)<br>[geolite2-city-ipv6-num.csv.7z](https://github.com/sapics/ip-location-db/raw/master/geolite2-city-7z/geolite2-city-ipv6-num.csv.7z) |
7
+ | [RouteViews + ASN + DB-IP](https://github.com/sapics/ip-location-db/tree/main/asn/)<br><br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/asn?color=success&style=flat-square&label=CSV)](https://www.npmjs.com/package/@ip-location-db/asn)<br>[![npm version](https://img.shields.io/npm/v/@ip-location-db/asn-mmdb?color=success&style=flat-square&label=MMDB)](https://www.npmjs.com/package/@ip-location-db/asn-mmdb) | ASN | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) by [RouteViews](https://www.routeviews.org/routeviews/) and [DB-IP](https://db-ip.com/) | Daily | [CSV](https://cdn.jsdelivr.net/npm/@ip-location-db/asn/asn-ipv4.csv)<br>[MMDB](https://cdn.jsdelivr.net/npm/@ip-location-db/asn-mmdb/asn-ipv4.mmdb) | [CSV](https://cdn.jsdelivr.net/npm/@ip-location-db/asn/asn-ipv6.csv)<br>[MMDB](https://cdn.jsdelivr.net/npm/@ip-location-db/asn-mmdb/asn-ipv6.mmdb) | [CSV](https://cdn.jsdelivr.net/npm/@ip-location-db/asn/asn-ipv4-num.csv) | [CSV](https://cdn.jsdelivr.net/npm/@ip-location-db/asn/asn-ipv6-num.csv) |
18
8
 
19
- ## CSV format
20
9
 
21
- This project provides ip to location database in csv format.
10
+ ## CSV Format
22
11
 
23
- #### ASN csv format
24
- `ip_range_start, ip_range_end, as_number, as_organization`
12
+ ```CSV
13
+ ip_range_start, ip_range_end, autonomous_system_number, autonomous_system_organization
14
+ ```
15
+ `ip_range_start` and `ip_range_end` are either IP addresses, or IP addresses in numeric format *(depending upon which files you choose)* and these two fields represent an **inclusive** range of IP addresses for that data row.
25
16
 
26
- #### Country csv format
27
- `ip_range_start, ip_range_end, country_code`
17
+ For example, in the `-ipv4.csv` files, the CSV line: `1.0.0.0,1.0.0.255,AU` would mean that any IP addresses between `1.0.0.0` and `1.0.0.255` *(inclusive)* are `AU`. In `-ipv4-num.csv` files, the equivalent line would be: `16777216,16777471,AU`.
28
18
 
29
- #### City csv format
30
- `ip_range_start, ip_range_end, country_code, state1, state2, city, postcode, latitude, longitude, timezone`
19
+ For example, in the `-ipv6.csv` files, the CSV line: `2001:200::,2001:200:ffff:ffff:ffff:ffff:ffff:ffff,JP` would mean that any IP addresses between `2001:200::` and `2001:200:ffff:ffff:ffff:ffff:ffff:ffff` *(inclusive)* are `JP`. In `-ipv6-num.csv` files, the equivalent line would be: `42540528726795050063891204319802818560,42540528806023212578155541913346768895,JP`.
31
20
 
32
- #### as_number
33
- `as_number` is a unique number assigned to an Autonomous System (AS) by the [IANA](https://www.iana.org/). [wiki](https://wikipedia.org/wiki/Autonomous_system_(Internet)).
21
+ Please be careful when using IPv6 and IPv6-num files in your program, the numerical value exceeds 32bit unsigned integers, and you would need to use a 128bit unsigned integer.
34
22
 
35
- ##### country_code
36
- `country_code` is the two-letter code defined in [ISO 3166-1 alpha-2](https://wikipedia.org/wiki/ISO_3166-1_alpha-2).
37
- You can get the `country name, capital, continent, currency, languages, etc.` from the `country_code` by [Countries Database](https://github.com/annexare/Countries) in JSON, CSV, SQL format.
38
23
 
39
- ##### ip address format
40
- `ip_range_start` and `ip_range_end` is ip address.
41
- - `ipv4`: The csv line `1.0.0.0,1.0.0.255,AU` means that ip addresses between `1.0.0.0` and `1.0.0.255` inclusive are `AU` country_code.
42
- - `ipv4-num`: The csv line `16777216,16777471,AU` means that ip addresses between `1.0.0.0` and `1.0.0.255` inclusive are `AU` country_code. (`16777216` is the number format of the ip address `1.0.0.0`)
43
- - `ipv6`: The csv line `2001:200::,2001:200:ffff:ffff:ffff:ffff:ffff:ffff,JP` means that ip addresses between `2001:200::` and `2001:200:ffff:ffff:ffff:ffff:ffff:ffff` inclusive are `JP` country_code.
44
- - `ipv6-num`: The csv line `42540528726795050063891204319802818560,42540528806023212578155541913346768895,JP` means that ip addresses between `2001:200::` and `2001:200:ffff:ffff:ffff:ffff:ffff:ffff` inclusive are `JP` country_code. (`42540528726795050063891204319802818560` is the number format of the ip address `2001:200::`)
24
+ ### autonomous_system_number
45
25
 
46
- Please be careful when using `ipv6` and `ipv6-num` in your program. The numerical value exceeds 32bit unsigned integer, you would need to use a 128bit unsigned integer.
26
+ `autonomous_system_number` is a unique number assigned to an Autonomous System (AS) by the [IANA](https://www.iana.org/). [wiki](https://wikipedia.org/wiki/Autonomous_system_(Internet)).
47
27
 
48
28
 
49
- ## Databases referenced in this project
29
+ ## Referenced Database and License
50
30
 
51
- When merging multiple database, set the front database above back one.
52
- (ex. geo-whois-asn-...csv is created by merging 3 database with GeoFeed > Whois > ASN.)
53
-
54
-
55
- ### ASN database [Update: Daily]
56
-
57
- Created by merging 5 RIP ([afrinic](https://afrinic.net), [apnic](https://www.apnic.net), [arin](https://www.arin.net), [lacnic](https://www.lacnic.net), [ripe ncc](https://www.ripe.net)) IP-ASN-Country database.
58
- [ASN (Autonomous System Number)](https://wikipedia.org/wiki/Autonomous_system_(Internet)) is a unique number assigned to an Autonomous System (AS) by the [IANA](https://www.iana.org/).
59
-
60
-
61
-
62
- ### GeoFeed database [Update: Daily]
63
31
 
64
- Created by merging GeoFeed database from [OpenGeoFeed](https://opengeofeed.org/).
65
-
66
-
67
-
68
- ### Whois database [Update: Daily]
69
-
70
- Created by merging 5 RIP provided WHOIS database.
71
- There are some inconsistencies between 5 RIP.
72
-
73
-
74
-
75
- ### [RouteViews](https://www.routeviews.org/routeviews/) database [Update: Daily]
32
+ ### [RouteViews](https://www.routeviews.org/routeviews/) database [Update: every 2 hours]
76
33
 
77
34
  We are using this database to get AS number from ipv4 address for [asn](https://www.npmjs.com/package/@ip-location-db/asn).
78
35
  This is licensed under a [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), so, **you must create attribution to [RouteViews](https://www.routeviews.org/routeviews/) for using asn database**.
79
36
 
80
37
 
38
+ ### ASN database [Update: Daily]
81
39
 
82
- ### [IPtoASN](https://iptoasn.com/)<sup>&clubs;</sup> database [Update: Hourly]
83
-
84
- You can download hourly updated database in tsv format from [original site](https://iptoasn.com/).
85
- This is licensed under a [Public Domain Dedication and Licence v1.0](https://opendatacommons.org/licenses/pddl/1.0/).
86
- There are some differences from above `ASN` database.
87
-
88
-
89
- <!--
90
- ### [Webnet77](https://software77.net/geo-ip/)<sup>&spades;</sup> database [Update: Daily]
91
-
92
- This database is donationware, please read [the license](https://software77.net/geo-ip/?license) carefully.<br>
93
- We **recommend donating to [webnet77](https://software77.net/geo-ip/), if you use this database especially for commercial use**.
94
- -->
40
+ Created by merging 5 RIP ([afrinic](https://afrinic.net), [apnic](https://www.apnic.net), [arin](https://www.arin.net), [lacnic](https://www.lacnic.net), [ripe ncc](https://www.ripe.net)) IP-ASN-Country database.
41
+ [ASN (Autonomous System Number)](https://wikipedia.org/wiki/Autonomous_system_(Internet)) is a unique number assigned to an Autonomous System (AS) by the [IANA](https://www.iana.org/).
95
42
 
96
43
 
97
- ### [DB-IP](https://db-ip.com/)<sup>&#9733;</sup> database [Update: Monthly]
44
+ ### [DB-IP](https://db-ip.com/) database [Update: Monthly]
98
45
 
99
46
  You could download and read the license from [ip-to-asn-lite](https://db-ip.com/db/download/ip-to-asn-lite) or [ip-to-country-lite](https://db-ip.com/db/download/ip-to-country-lite) or [ip-to-city-lite](https://db-ip.com/db/download/ip-to-city-lite).
100
47
  Most of the AS Organization name used in [asn](https://www.npmjs.com/package/@ip-location-db/asn) uses [ip-to-asn-lite](https://db-ip.com/db/download/ip-to-asn-lite) database.
@@ -104,39 +51,23 @@ These database are licensed under a [CC BY 4.0](https://creativecommons.org/lice
104
51
  In the case of a web application, you must include a link back to DB-IP.com on pages that display or use results from the database. You may do it by pasting the HTML code snippet into your code: `<a href='https://db-ip.com/'>IP Geolocation by DB-IP</a>`.<br>
105
52
  If you need better accuracy or no attribution or daily updates, please use the [Commercial Version of db-ip](https://db-ip.com/db/ip-to-country).
106
53
 
54
+ ## Merge rule for multiple database
107
55
 
108
-
109
- ### [GeoLite2](https://dev.maxmind.com/geoip/geoip2/geolite2/)<sup>&hearts;</sup> database [Update: Weekly]
110
-
111
- GeoLite2 is created by [MaxMind](https://www.maxmind.com).
112
- The license of GeoLite2 is written in GEOLITE2_LICENSE and End User License Agreement (EULA) is written in GEOLITE2_EULA.
113
- **Please carefully read the GEOLITE2_LICENSE and GEOLITE2_EULA files, if you use these database.**
114
- This package comes with certain restrictions and obligations, most notably:
115
- - You cannot prevent the library from updating the databases.
116
- - You cannot use the GeoLite2 data:
117
- - for FCRA purposes,
118
- - to identify specific households or individuals.
119
-
120
- You can read [the latest version of GeoLite2 EULA](https://www.maxmind.com/en/geolite2/eula).
121
- GeoLite2 databse is provided under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) by [MaxMind](https://www.maxmind.com), so, **you must create attribution to [MaxMind](https://www.maxmind.com) for using GeoLite2 database**.
122
- If you need better accuracy, please use the commercial version [GeoIp2](https://www.maxmind.com/en/geoip2-databases).
123
-
124
-
125
-
126
- ## Which database is recommended to use?
127
-
128
- Of course, it depends on your use case.
129
- But the above list is too long, thus, we write down the recommendation.
130
-
131
- - If you need postcode or timezone, `geolite2-city` is the one.
132
- - If you need city data with CC-BY License, `dbip-city` is the one.
133
- - If you need country database with Public Domain, we recommend `geo-whois-asn-country` database.
134
- - If you need asn database, we recommend `asn` database.
135
-
136
-
137
- ## License
138
-
139
- License depends on the database which you use. Please read carefully each database license.
140
- You can use [PDDL](https://opendatacommons.org/licenses/pddl/1.0/) (ODC Public Domain Dedication and Licence) or [CC0](https://creativecommons.org/publicdomain/zero/1.0/deed) (Creative Commons Zero) licensed database without attribution for any purpose.
141
-
142
- We are glad if you make a link to [sapics/ip-location-db](https://github.com/sapics/ip-location-db), or give us a star to [the github repository](https://github.com/sapics/ip-location-db).
56
+ When merging multiple database, set the front database above back one.
57
+ For example, geo-whois-asn-country is created by merging 3 database with GeoFeed > Whois > ASN.
58
+ In more detail, the geo-whois-asn database matches the GeoFeed results, for ip ranges not covered by GeoFeed it matches the Whois results, and for ip ranges not covered by either it matches the ASN results.
59
+ ```
60
+ GeoFeed: 1.0.0.0, 2.0.0.0, AU
61
+ 3.0.0.1, 4.0.0.0, US
62
+ Whois: 1.0.0.0, 2.2.0.0, FR
63
+ 2.5.0.1, 4.0.0.0, IN
64
+ ASN: 1.0.0.0, 4.0.0.0, JP
65
+ ```
66
+ is converted to
67
+ ```
68
+ GeoFeed-Whois-ASN: 1.0.0.0, 2.0.0.0, AU
69
+ 2.0.0.1, 2.2.0.0, FR
70
+ 2.2.0.1, 2.5.0.0, JP
71
+ 2.5.0.1, 3.0.0.0, IN
72
+ 3.0.0.1, 4.0.0.0, US
73
+ ```