feat: add cmd/check-ip reference CLI#138
Open
coolaj86 wants to merge 9 commits into
Open
Conversation
4cad73c to
4d13c4b
Compare
09ee34e to
20be287
Compare
4d13c4b to
a50fc99
Compare
a50fc99 to
213a219
Compare
213a219 to
2740a50
Compare
3ec50cc to
11d90cf
Compare
25df840 to
2273e7e
Compare
9afa9d0 to
575048d
Compare
2273e7e to
7dc6446
Compare
575048d to
4723e81
Compare
8b93a69 to
17d50e5
Compare
4723e81 to
4272cfb
Compare
2b2b164 to
a408dc8
Compare
4272cfb to
8d12e66
Compare
8d12e66 to
dfd2aec
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Ties gitshallow, httpcache, geoip, ipcohort, and sync/dataset together into a single tool that resolves an IP against the configured blocklist and GeoIP databases, with optional --serve mode for production use. Flags: --git, --blocklist, --whitelist, --geoip-conf, --serve, --async-load, --format pretty|json, plus -V/--version and help. Includes /healthz, http.Server timeouts, and stage-timing logs to stderr.
dfd2aec to
f81ff76
Compare
…railing / from -geoip-url
…olution, and richer GeoIP data - Embed web UI (index.html, app.js, style.css) via go:embed - Title: 'IP Location & Status' instead of 'check-ip' - 'Show my IP Info' link for lookups of the visitor's own IP - Domain resolution with resolved_from field in JSON - Richer GeoIP fields: region ISO, continent, coordinates, traits, etc. - /api/raw debug endpoint for raw MaxMind records - net/geoip: expand Info struct and add LookupRaw method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLI + HTTP server for checking IPs against blocklists with GeoIP enrichment.
Two modes:
check-ip <ip> [ip...]— look up IPs, output pretty/tsv/csv/jsoncheck-ip --serve :8080— HTTP API with/checkand/healthzendpointsFeatures:
sync/dataset(blocklists, geoip, whitelist)--geoip-urlflag with trailing slash trimmingUsage:
Prerequisites:
--geoip-url https://geoip.oneal.im/geoip/databasesfor the hosted mirrorPackages used
net/ipcohort— IP cohort filternet/geoip— MaxMind GeoLite2 readernet/gitshallow— git repo mirroringnet/httpcache— ETag/Last-Modified cachingsync/dataset— hot-swap refresh with atomic.Pointer