ipinfo

command
v0.0.0-...-81183d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

README

ipinfo.io plugin

Connector sends a GET request to the ipinfo.io API and expects an JSON response with IP details back. Request can contain ip field only with an IP address to check.

curl to test:

curl 'https://localhost:443/api?uuid=auth-key&sql=FROM+ipinfo+WHERE+ip=%278.8.8.8%27'

Compile with:

go build -buildmode=plugin -ldflags="-w" -o ipinfo.so ./*.go

Limitations

Does not support complex SQL queries and datetime range selection.

Access details

Source YAML definition's access fields:

  • server: API server, for example - https://ipinfo.io
  • token: User's access token, for extended queries limit

Definition file example

Replace API token with your own:

name: ipinfo
label: ipinfo.io
icon: database

plugin: ipinfo
inGlobal: true
includeDatetime: false
supportsSQL: false

access:
    server: https://ipinfo.io
    token: xxxxxxxxxxxxxx

queryFields:
    - ip


relations:
  -
    from:
        id: ip
        group: ip
        search: ip
        attributes: ["anycast", "city", "loc", "postal", "region"]

    to:
        id: hostname
        group: domain
        search: domain

  -
    from:
        id: ip
        group: ip
        search: ip
        attributes: ["anycast", "city", "loc", "postal", "region"]

    to:
        id: org
        group: institution
        search: institution
        attributes: ["asn", "city", "loc", "postal", "region"]

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL