t e l i z e
_______________________
______\ /_______
\\ \\ ___ // /
__ \ ____ \ __ / \ _____/\ / ____
___/ \____/ _//____/ \___\___/___\__ /__/ _//____
\\__ ____ __/ __ __ ____ ____ __/ __///
/ \_ |/ \_ / \/ /_/ |/ \_
\\\ ___/\___ /____/\_______/\ ___/\___ /
<0(--- \__/ -h7- \______/ \ . \__/ ---- \______/ --(0>
\ .\ /. .
\ .\ // /
\______\\ //______/
Y
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.
Telize requires Kore 4.0.0+ and libmaxminddb.
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.
Using the kodev tool:
kodev build
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.
Using the kodev tool:
kodev run
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 handles the 'X-Forwarded-For' HTTP header if present, and returns data for the first IP address of the list.
Telize has CORS enabled by default with the following policy:
Access-Control-Allow-Origin: *
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.
For complete API documentation and usage examples, please check the project site.
- Example: http://127.0.0.1:8080/ip
- Example (JSON): http://127.0.0.1:8080/jsonip
- Example (JSONP): http://127.0.0.1:8080/jsonip?callback=getip
Calling the API endpoint without any parameter will return the visitor IP address:
- Example (JSON): http://127.0.0.1:8080/location
- Example (JSONP): http://127.0.0.1:8080/location?callback=getgeoip
Appending an IP address as parameter will return location information for the given address:
- Example (JSON): http://127.0.0.1:8080/location/46.19.37.108
- Example (JSONP): http://127.0.0.1:8080/location/46.19.37.108?callback=getgeoip
Telize is released under the BSD 2-Clause license. See LICENSE
file
for details.
Telize is developed by Frederic Cambus.
- Site: https://www.cambus.net
Project homepage: https://www.telize.com
Latest tarball release: https://www.statdns.com/telize/telize-3.1.0.tar.gz