Giter Site home page Giter Site logo

dlarmeir / telize Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fcambus/telize

0.0 0.0 0.0 188 KB

High performance JSON IP and GeoIP REST API (IP Geolocation)

Home Page: https://www.telize.com

License: BSD 2-Clause "Simplified" License

C 100.00%

telize's Introduction

                           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 4.0.0+ and libmaxminddb.

GeoIP2 databases

Telize requires the free GeoLite2 databases from MaxMind.

The path to the GeoLite2 City and GeoLite2 ASN databases can be configured in conf/build.conf via the GEOIP2DIR macro, pointing to /var/db/GeoIP by default.

Building

Using the kodev tool:

kodev build

Configuration

By default, Telize will only listen on 127.0.0.1 and ::1. To add more listeners, bind directives should be added in conf/telize.conf in the server blocks.

Running

Using the kodev tool:

kodev run

Access logs

The default Telize configuration does not have logging enabled, it must be configured manually. There are commented out accesslog directives in conf/telize.conf for each domain block.

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

Telize and proxies

Telize handles the 'X-Forwarded-For' HTTP header if present, and returns data for the first IP address of the list.

CORS Support (Cross-origin resource sharing)

Telize has CORS enabled by default with the following policy:

Access-Control-Allow-Origin: *

Timezone offsets

Since version 3.0.0, Telize now dynamically calculates timezone offsets (UTC time offset) and adds data to the payload.

On Alpine Linux, the 'tzdata' package needs to be installed, otherwise localtime() will not return any data.

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-3.0.0.tar.gz

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

telize's People

Contributors

fcambus avatar yverry avatar jorisvink avatar jnalley avatar lrobinot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.