{"id":17312916,"url":"https://github.com/9seconds/topographer","last_synced_at":"2025-04-14T14:40:32.473Z","repository":{"id":54250391,"uuid":"119259399","full_name":"9seconds/topographer","owner":"9seconds","description":"Self-hosted lenient geoip service","archived":false,"fork":false,"pushed_at":"2021-03-02T07:30:04.000Z","size":19811,"stargazers_count":30,"open_issues_count":1,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-28T03:32:36.772Z","etag":null,"topics":["geoip","self-hosted"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/9seconds.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2018-01-28T13:12:18.000Z","updated_at":"2025-02-02T11:00:06.000Z","dependencies_parsed_at":"2022-08-13T10:00:58.106Z","dependency_job_id":null,"html_url":"https://github.com/9seconds/topographer","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9seconds%2Ftopographer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9seconds%2Ftopographer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9seconds%2Ftopographer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9seconds%2Ftopographer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/9seconds","download_url":"https://codeload.github.com/9seconds/topographer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248898405,"owners_count":21179768,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geoip","self-hosted"],"created_at":"2024-10-15T12:45:01.485Z","updated_at":"2025-04-14T14:40:32.441Z","avatar_url":"https://github.com/9seconds.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Topographer\n===========\n\n[![CI](https://github.com/9seconds/topographer/workflows/CI/badge.svg?branch=master)](https://github.com/9seconds/topographer/actions)\n[![Code Coverage](https://codecov.io/gh/9seconds/topographer/branch/master/graph/badge.svg?token=CQSrBMbxh9)](https://codecov.io/gh/9seconds/topographer)\n[![Go Reference](https://pkg.go.dev/badge/github.com/9seconds/topographer.svg)](https://pkg.go.dev/github.com/9seconds/topographer)\n\nFast and lenient self-hosted IP geolocation service.\n\nSometimes you need to detect regions and cities of different IPs. There\nare a bunch of databases and free services available but you need to\nhave a code which works with these database or deal with limitations of\nthese services. For example, ipinfo.io or freegeoip.net limit your queries.\n\nSometimes you need your own service which responds with country/city\nand does not have such limitations. Most of such services are based on\nfree versions of geolocation databases so it makes sense to have a free\nself-hosted service which you can simply plug into your infrastructure.\n\nAlso, if you ever deal with IP geolocation you may know it is awfully\nimprecise. There are many situations when one database detects one\ncity, another - slightly different location. Also, if you deal with\nnon-residential IPs you may know that a lot of hosters and clouds have a\nweird route setup so you may have differences even in countries!\n\nJust look at this example: https://bgpview.io/ip/191.96.13.80 Which\ncountry does this IP belong?\n\nThis service goes in slightly different way: it uses a couple of\ndatabases, collects their results, combine and consolidate results and\nreturn a final one.\n\nIt queries all providers (or a limited set of them), picks the most\npopular country. Within this country group, it picks the most popular\ncity and returns this tuple as a result.\n\n\nBuilding\n========\n\nBuilding is trivial.\n\n1. Install [Golang](https://golang.org/doc/install);\n2. Run `go get github.com/9seconds/topographer`\n\nor if you want to build from sources:\n\n```shell\n$ git clone https://github.com/9seconds/topographer\n$ cd topographer\n$ go build\n```\n\nor simple build Docker container\n\n```shell\n$ docker build -t topographer .\n```\n\n\nInstalling\n==========\n\nInstallation is simple as\n\n```shell\n$ go get github.com/9seconds/topographer\n```\n\n(but if you want, you can find prebuilt binaries on [releases page](https://github.com/9seconds/topographer/releases))\n\nWe also have Docker images in both DockerHub and Github Container Registry:\n\n```shell\n$ docker pull nineseconds/topographer\n```\n\nand\n\n```shell\n$ docker pull ghcr.io/9seconds/topographer:master\n```\n\nRunning the application\n=======================\n\nA binary has a single cli flag: `-config`.\n\n```shell\n$ topographer -config /path/to/config.hjson\n```\n\nor if you run with docker, just put config as `/config.hjson` there:\n\n```shell\n$ docker run -v /path/to/local/config.hjson:/config.hjson -p 8000:80 nineseconds/topographer\n```\n\nAPI\n===\n\nPlease see [OpenAPI specification](https://github.com/9seconds/topographer/blob/master/openapi.yaml).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9seconds%2Ftopographer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F9seconds%2Ftopographer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9seconds%2Ftopographer/lists"}