{"id":15136365,"url":"https://github.com/m-messiah/ip2geo","last_synced_at":"2025-10-13T23:41:21.779Z","repository":{"id":57571698,"uuid":"40238171","full_name":"m-messiah/ip2geo","owner":"m-messiah","description":"Импортер ipgeo-данных в файлы, понятные для nginx geoip module, с поддержкой кодов регионов РФ.","archived":false,"fork":false,"pushed_at":"2025-04-18T10:31:09.000Z","size":191,"stargazers_count":64,"open_issues_count":2,"forks_count":16,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-08-27T17:38:13.414Z","etag":null,"topics":["geo","geoip","ip2geo","ip2location","ip2proxy","ipgeobase","ipgeobase-importer","maxmind","nginx","nginx-proxy"],"latest_commit_sha":null,"homepage":"https://github.com/m-messiah/ip2geo","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/m-messiah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["m-messiah"],"patreon":"m_messiah"}},"created_at":"2015-08-05T10:01:10.000Z","updated_at":"2025-04-18T10:31:09.000Z","dependencies_parsed_at":"2024-04-19T13:37:06.767Z","dependency_job_id":"d50ef44a-3614-4666-bf05-27fab6dc0117","html_url":"https://github.com/m-messiah/ip2geo","commit_stats":{"total_commits":149,"total_committers":8,"mean_commits":18.625,"dds":0.09395973154362414,"last_synced_commit":"fbcd1ce19d2e3251e2678c1d3d9fdcf42382188c"},"previous_names":["m-messiah/ipgeobase-importer"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/m-messiah/ip2geo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-messiah%2Fip2geo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-messiah%2Fip2geo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-messiah%2Fip2geo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-messiah%2Fip2geo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-messiah","download_url":"https://codeload.github.com/m-messiah/ip2geo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-messiah%2Fip2geo/sbom","scorecard":{"id":608022,"data":{"date":"2025-08-11","repo":{"name":"github.com/m-messiah/ip2geo","commit":"31c889c3607e3eddd30501371ef923b254ed9d06"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/9 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/m-messiah/ip2geo/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/m-messiah/ip2geo/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/m-messiah/ip2geo/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/m-messiah/ip2geo/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/m-messiah/ip2geo/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/m-messiah/ip2geo/go.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/m-messiah/ip2geo/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/m-messiah/ip2geo/golangci-lint.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/golangci-lint.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/m-messiah/ip2geo/golangci-lint.yml/main?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:25","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:26","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/go.yml:1","Warn: no topLevel permission defined: .github/workflows/golangci-lint.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.1.7 not signed: https://api.github.com/repos/m-messiah/ip2geo/releases/191629885","Warn: release artifact v1.1.6 not signed: https://api.github.com/repos/m-messiah/ip2geo/releases/93505858","Warn: release artifact v1.1.5 not signed: https://api.github.com/repos/m-messiah/ip2geo/releases/50926970","Warn: release artifact v1.1.4 not signed: https://api.github.com/repos/m-messiah/ip2geo/releases/22457276","Warn: release artifact v1.1.3 not signed: https://api.github.com/repos/m-messiah/ip2geo/releases/18043151","Warn: release artifact v1.1.7 does not have provenance: https://api.github.com/repos/m-messiah/ip2geo/releases/191629885","Warn: release artifact v1.1.6 does not have provenance: https://api.github.com/repos/m-messiah/ip2geo/releases/93505858","Warn: release artifact v1.1.5 does not have provenance: https://api.github.com/repos/m-messiah/ip2geo/releases/50926970","Warn: release artifact v1.1.4 does not have provenance: https://api.github.com/repos/m-messiah/ip2geo/releases/22457276","Warn: release artifact v1.1.3 does not have provenance: https://api.github.com/repos/m-messiah/ip2geo/releases/18043151"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 8 commits out of 23 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T02:02:48.431Z","repository_id":57571698,"created_at":"2025-08-21T02:02:48.432Z","updated_at":"2025-08-21T02:02:48.432Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017233,"owners_count":26086016,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["geo","geoip","ip2geo","ip2location","ip2proxy","ipgeobase","ipgeobase-importer","maxmind","nginx","nginx-proxy"],"created_at":"2024-09-26T06:21:20.353Z","updated_at":"2025-10-13T23:41:21.763Z","avatar_url":"https://github.com/m-messiah.png","language":"Go","funding_links":["https://github.com/sponsors/m-messiah","https://patreon.com/m_messiah"],"categories":[],"sub_categories":[],"readme":"# Ip2Geo importer\n\n[![Test](https://github.com/m-messiah/ip2geo/actions/workflows/go.yml/badge.svg)](https://github.com/m-messiah/ip2geo/actions/workflows/go.yml)[![golangci-lint](https://github.com/m-messiah/ip2geo/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/m-messiah/ip2geo/actions/workflows/golangci-lint.yml)[![CodeQL](https://github.com/m-messiah/ip2geo/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/m-messiah/ip2geo/actions/workflows/codeql-analysis.yml)[![GitHub release](https://img.shields.io/github/release/m-messiah/ip2geo.svg?style=for-the-badge)](https://github.com/m-messiah/ip2geo/releases/latest)[![Github Releases](https://img.shields.io/github/downloads/m-messiah/ip2geo/total.svg?style=for-the-badge)](https://github.com/m-messiah/ip2geo/releases)[![Maintainability](https://api.codeclimate.com/v1/badges/8687e760d260b8499393/maintainability)](https://codeclimate.com/github/m-messiah/ip2geo/maintainability)\n\nИмпортер ipgeo-данных в файлы, понятные для [nginx geo module](http://nginx.org/ru/docs/http/ngx_http_geo_module.html), с поддержкой кодов регионов РФ.\n\nПоддерживает Ipgeobase.ru, TOR-списки, MaxMind GeoLite (для городов и стран), базы IP2Proxy PX4 и PX4LITE.\n\n## Установка\n\n1. Скачать соответствующий архитектуре бинарник с github куда-нибудь в $PATH\n2. Сделать его исполняемым\n3. Пользоваться\n\n(также, при наличии Go окружения можно собрать самостоятельно через go get + go build)\n\n## Запуск\n\nПо умолчанию, ip2geo генерирует все возможные map-файлы, но все настраиваемо с помощью ключей:\n\n    -c      string\n        Путь до конфигурационного файла (см. config.yaml.example)\n    -output string\n        Директория для записи map-файлов (по умолчанию: \"output\")\n    -q  Be quiet - skip [OK]\n    -qq Be very quiet - show only errors\n    -version Вывести текущую версию программы и выйти.\n    -ipgeobase\n        Генерация IPgeobase баз (название города, код региона, часовой пояс)\n    -tor\n        Генерация списков TOR нод.\n    -ip2proxy\n        Генерация ip2proxy PX4LITE сетей\n    -ip2proxy-token string\n        Токен для скачивания ip2proxy PX4LITE баз https://lite.ip2location.com/file-download\n    -ip2proxy-lite-filename string\n        Путь до уже скачанного zip файла PX4LITE\n    -ip2proxy-pro\n        Генерация ip2proxy PX4 сетей\n    -ip2proxy-pro-token string\n        Токен для скачивания ip2proxy PX4\n    -ip2proxy-pro-filename string\n        Путь до уже скачанного zip файла PX4\n    -ip2proxy-print-type\n        Вместо 1 указывать тип прокси из ip2proxy (PUB/DCH/e.t.c.)\n    -maxmind\n        Генерация баз MaxMind (название города, часовой пояс)\n    Дальше параметры для MaxMind:\n    -maxmind-license-key string\n        Лицензионный ключ для MaxMind\n    -maxmind-filename string\n        Путь до уже скачанного файла MaxMind GeoLite2-City-CSV.csv\n    -lang string\n        Язык MaxMind баз (по умолчанию ru)\n    -ipver int\n        MaxMind версия IP (4 or 6) (default 4)\n    -include string\n        MaxMind фильтр: использовать только перечисленные страны  \n        Принимает список ISO-кодов стран, разделенных пробелами (\"RU FR EN\")\n    -exclude string\n        MaxMind фильтр: исключает из вывода перечисленные страны. (см формат выше)\n    -nobase64\n        Не перекодирует MaxMind города в base64, записывая их в map-файл как есть. Не используйте, если не уверены в кодировке MaxMind.\n    -nocountry\n        Не создавать map-файлы с названиями стран и iso-кодами стран из MaxMind\n    \n\n### Формат geomap-файлов\n\ngeomap-файлы предназначены для использования в nginx в виде:\n\n```nginx\n# Region\n    geo $region {\n        ranges;\n        include geo/region.txt;\n    }\n# City\n    geo $city_geo {\n        ranges;\n        include geo/city.txt;\n    }\n\n    geo $city_mm {\n        ranges;\n        include geo/mm_city.txt;\n    }\n\n    map $city_geo $city {\n        \"\" $city_mm;\n        default $city_geo;\n    }\n# Country\n    geo $country {\n        ranges;\n        include geo/mm_country.txt;\n    }\n# Country Code\n    geo $country_code {\n        ranges;\n        include geo/mm_country_code.txt;\n    }\n# TZ\n    geo $tz_geo {\n        ranges;\n        include geo/tz.txt;\n    }\n\n    geo $tz_mm {\n        ranges;\n        include geo/mm_tz.txt;\n    }\n\n    map $tz_geo $tz {\n        \"\" $tz_mm;\n        default $tz_geo;\n    }\n# Tor\n    geo $is_tor {\n        ranges;\n        default 0;\n        include geo/tor.txt;\n    }\n# Proxy\n    geo $is_proxy {\n        ranges;\n        default 0;\n        include geo/ip2proxy_net.txt;\n    }\n```\n\nТаким образом, IP адреса в файлах записаны в виде диапазона (range) и отсортированы по возрастанию IP. Карты сделаны каскадно, чтобы решить проблему пересечений диапазонов. IPGeobase используется в первую очередь, и если адрес там не найден, то MaxMind.\n\nДля того чтобы название города всегда отдавалось корректно - оно кодируется в base64 от utf8 (если не указан флаг `-nobase64`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-messiah%2Fip2geo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-messiah%2Fip2geo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-messiah%2Fip2geo/lists"}