turbobytes / geoipdb

GeoIP related related helper functions for TurboBytes stack
MIT License
0 stars 2 forks source link

Local network detection and IPv6 support #25

Closed coolparadox closed 7 years ago

coolparadox commented 7 years ago

New test cases to tell private network apart from other types of failure are working fine.

This adds new error values to AsnLookup() only -- there is no change to geoipdb interface. CNC builds successfully with this merge.

Fixes #8

coolparadox commented 7 years ago

(Please hold review as it looks there are failing test cases in Travis, let me look)

coolparadox commented 7 years ago

All set, please proceed with review

coolparadox commented 7 years ago

IPv6 support in geoipdb is enabled:

$ http GET localhost:7778/asnlookup/ip/2001:4860:1004::876:102
HTTP/1.1 200 OK
Content-Encoding: gzip
Content-Length: 186
Content-Type: application/json; charset=UTF-8
Date: Tue, 13 Dec 2016 13:19:10 GMT

{
    "ip": "2001:4860:1004::876:102",
    "result": {
        "asndb": {
            "asn": "AS15169",
            "err": "ASN not found",
            "name": ""
        },
        "cymru": {
            "asn": "AS15169",
            "err": "",
            "name": "GOOGLE - Google Inc., US"
        },
        "geoipdb": {
            "asn": "AS15169",
            "err": "",
            "name": "Google Inc."
        },
        "ipinfo": {
            "asn": "AS15169",
            "err": "",
            "name": "Google Inc."
        },
        "maxmind": {
            "asn": "AS15169",
            "err": "",
            "name": "Google Inc."
        }
    }
}

Fixes #9