{"id":15965317,"url":"https://github.com/bwplotka/go-ipfilter","last_synced_at":"2025-07-27T11:39:36.872Z","repository":{"id":79051044,"uuid":"97822309","full_name":"bwplotka/go-ipfilter","owner":"bwplotka","description":"Tiny Golang lib for IP filtering. (e.g private only)","archived":false,"fork":false,"pushed_at":"2017-07-20T13:43:15.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T23:16:18.559Z","etag":null,"topics":["filter","go","golang","ip","ipfiltering"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bwplotka.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-20T10:24:12.000Z","updated_at":"2021-05-13T19:29:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"38e0a190-0dce-4c68-9133-60d6e4d7991c","html_url":"https://github.com/bwplotka/go-ipfilter","commit_stats":null,"previous_names":["bplotka/go-ipfilter"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwplotka%2Fgo-ipfilter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwplotka%2Fgo-ipfilter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwplotka%2Fgo-ipfilter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwplotka%2Fgo-ipfilter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bwplotka","download_url":"https://codeload.github.com/bwplotka/go-ipfilter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247183937,"owners_count":20897675,"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":["filter","go","golang","ip","ipfiltering"],"created_at":"2024-10-07T17:40:54.129Z","updated_at":"2025-04-04T13:26:23.606Z","avatar_url":"https://github.com/bwplotka.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IP Filter \n[![Build Status](https://travis-ci.org/Bplotka/go-ipfilter.svg?branch=master)](https://travis-ci.org/Bplotka/go-ipfilter) \n\n\u003c!---\nCommented for now, because of github caching wrong badge..\n[![Go Report Card](https://goreportcard.com/badge/github.com/Bplotka/go-ipfilter)](https://goreportcard.com/report/github.com/Bplotka/go-ipfilter)\n--\u003e\n\nTiny Golang lib for IP filtering. \n\nThis is helpful to restrict access to some endpoints on public service (e.g debug endpoints)\n\n### Well, why not just use proper auth (e.g basic, oidc, oauth2)?\n\nBecause some endpoints are problematic to hide using auth, like debug or metrics endpoints.\n\n## Usage\n\nFilters are in a form of Bool conditions that takes IP in a form of `net.IP`\n\n```go\ntype Condition func(net.IP) bool\n````\n\nYou can chain multiple conditions with some logic using `ipfilter.OR(...)` `ipfilter.AND(...)`\n\nThis package also contain useful [HTTP middleware integration](./http/middleware.go).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwplotka%2Fgo-ipfilter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbwplotka%2Fgo-ipfilter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwplotka%2Fgo-ipfilter/lists"}