Skip to content

Latest commit

 

History

History
125 lines (80 loc) · 3.33 KB

README.md

File metadata and controls

125 lines (80 loc) · 3.33 KB
                           t  e  l  i  z  e
                       _______________________
                 ______\                     /_______
                \\     \\           ___     //      /
           __    \ ____  \   __    /   \   _____/\ / ____
       ___/  \____/  _//____/  \___\___/___\__   /__/  _//____
      \\__    ____  __/  __     __      ____    ____  __/  __///
        /      \_   |/    \_     /       \/     /_/   |/    \_
      \\\   ___/\___       /____/\_______/\   ___/\___       /
  <0(--- \__/ -h7- \______/   \       .    \__/ ---- \______/ --(0>
                       \      .\     /.      .
                        \      .\   //      /
                         \______\\ //______/
                                  Y

Description

Telize is a REST API built in C with Kore allowing to get a visitor IP address and to query location information from any IP address. It outputs JSON-encoded IP geolocation data, and supports both JSON and JSONP.

Geolocation operations are performed using libmaxminddb which caches the database in RAM. Therefore, Telize has very minimal overhead and should be blazing fast.

Requirements

Dependencies

Telize requires Kore 3.2.0+ and libmaxminddb.

GeoIP2 databases

Telize requires the free GeoLite2 databases from MaxMind.

mkdir -p /var/db/GeoIP
cd /var/db/GeoIP
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz
tar xfz GeoLite2-City.tar.gz
tar xfz GeoLite2-ASN.tar.gz
mv */*mmdb .

Building

Using the kodev tool:

kodev build

Configuration

Running

Using the kodev tool:

kodev run

Access and Error logs

The default Telize configuration does not have logging enabled, it must be configured manually.

If your Telize instance produces lots of logs, Logswan might be of interest.

Telize and proxies

CORS Support (Cross-origin resource sharing)

Telize has CORS enabled by default with the following policy:

Access-Control-Allow-Origin: *

Usage

For complete API documentation and usage examples, please check the project site.

Get IP address in Plain text format

Get IP address in JSON format

Get IP address location in JSON format

Calling the API endpoint without any parameter will return the visitor IP address:

Appending an IP address as parameter will return location information for the given address:

License

Telize is released under the BSD 2-Clause license. See LICENSE file for details.

Author

Telize is developed by Frederic Cambus.

Resources

Project homepage: https://www.telize.com

Latest tarball release: https://www.statdns.com/telize/telize-2.0.0.tar.gz

GitHub: https://github.com/fcambus/telize