{"id":51463751,"url":"https://github.com/aredoff/whoiscached","last_synced_at":"2026-07-06T08:30:57.522Z","repository":{"id":354176123,"uuid":"1222417883","full_name":"aredoff/whoiscached","owner":"aredoff","description":"Whois cached service","archived":false,"fork":false,"pushed_at":"2026-04-27T12:27:04.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-27T14:24:05.824Z","etag":null,"topics":[],"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/aredoff.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-27T10:50:04.000Z","updated_at":"2026-04-27T12:26:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aredoff/whoiscached","commit_stats":null,"previous_names":["aredoff/whoiscached"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/aredoff/whoiscached","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aredoff%2Fwhoiscached","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aredoff%2Fwhoiscached/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aredoff%2Fwhoiscached/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aredoff%2Fwhoiscached/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aredoff","download_url":"https://codeload.github.com/aredoff/whoiscached/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aredoff%2Fwhoiscached/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35184015,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"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":[],"created_at":"2026-07-06T08:30:56.228Z","updated_at":"2026-07-06T08:30:57.509Z","avatar_url":"https://github.com/aredoff.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# whoiscache\n\nA caching WHOIS server (TCP, query line + `\\n`). Responses are kept **in memory** with a periodic **on-disk snapshot** (`[storage]`). Upstream follows IANA referrals; for ASN, fallback comes from the config.\n\n## Features\n\n- **Domain / ASN / IP**: keys `d:`, `a:`, `4:`/`6:` plus a normalized value. For IP, **one** CIDR from the WHOIS response is stored; lookup is **LPM** (most specific prefix).\n- **Stale**: two TTL layers per record; on upstream failure stale is served until `stale_ttl` expires.\n- **Snapshot**: written only when **dirty**; atomically (`tmp` + `rename`). Loaded from disk on startup.\n- **CLI**: `-dump-keys` — keys from the snapshot; `-get-key=\u003cRecordKey\u003e` — primary from the snapshot; `-delete-key=\u003cRecordKey\u003e` — remove the record and update the snapshot (opens DiskStore, `Close` writes the file).\n- **Metrics**: `GET /metrics`.\n\n## Requirements\n\n- Go 1.23+ (see `go.mod`)\n\n## Run\n\n```bash\nexport WHOISCACHE_CONFIG=configs/config.ini\ngo run ./cmd/whoiscached -config configs/config.ini\n```\n\nThe directory for `snapshot_path` is created on first write.\n\n**systemd:** [deploy/whoiscached.service](deploy/whoiscached.service) and steps in [deploy/README.md](deploy/README.md).\n\n## Configuration\n\nSee [deploy/config.ini.example](deploy/config.ini.example).\n\n| Section   | Purpose                                                   |\n| --------- | --------------------------------------------------------- |\n| `[server]`  | WHOIS TCP, timeouts, `max_conns`, `worker_pool_size`.   |\n| `[metrics]` | HTTP for `/metrics`.                                   |\n| `[storage]` | `snapshot_path`, `snapshot_interval`.                  |\n| `[cache]`   | Domain/IP/ASN TTL, `negative_ttl`, `stale_ttl`.         |\n| `[whois]`   | Upstream, limits, `iana_referral` for IP/ASN.          |\n\n## Metrics\n\n- `whoiscache_requests_total{kind,result}`\n- `whoiscache_errors_total{stage}`\n- `whoiscache_request_duration_seconds{kind}`\n\n## Limitations\n\n- For IP/ASN, only `iana_referral` is supported in the config.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faredoff%2Fwhoiscached","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faredoff%2Fwhoiscached","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faredoff%2Fwhoiscached/lists"}