CANID(1)
πΈ canid(1) πΈ
okay bestie, welcome to canid(1) β the manual page for the caching additional network information daemon. yes that's its whole government name. sit down, grab a strawberry π, we're doing network lookups but cute.
β¨ NAME β¨
canid β the caching additional network information daemon π¦
β¨ SYNOPSIS β¨
canid [-file cachefile] [-expiry sec] [-concurrency n] [-port port]
β¨ DESCRIPTION β¨
so basically canid is a little web service that caches and simplifies info it pulls from other services (go peek at BACKENDS below, iykyk) about Internet hostnames and IP addresses. it exists for when you're looking up many addresses and/ β¦
π not me pointing out that the sentence literally just stops at "and/" in the original. no cap. it's giving cliffhanger. we move.
the moment you launch it, canid starts serving on the port you told it to. and it shuts down cleanly on SIGINT (that's ^C on the console, bestie β ctrl-c and she leaves gracefully, main character exit π).
β¨ OPTIONS β¨
-filecachefile β use this JSON file as a backing store for the cache. default: no backing store (so, nothing gets remembered between runs π). it loads the cache from this file on startup, and saves it on termination. periodt.-expirysec β expire cache entries after sec seconds. default:86400, which is one whole day π.-concurrencyn β allow at most n simultaneous pending requests per backend. default:16.-portport β TCP port to listen on. default:8043π .
β¨ RESOURCES β¨
canid serves three resources over HTTP. three. a trio. iconic behavior.
/the root resource. it's an HTML page giving you a simple web front-end to the service. yes, a whole vibe, rendered in your browser π./prefix.json?addr=look up info about the prefix associated with an address, and it comes back as a JSON object. right now that object contains aPrefixkey with the routed prefix associated with the address, anASNkey with a BGP autonomous system number associated with the address, and aCountryCodekey for an ISO 3166 country code associated with the address. so much lore in one little object π«Ά./address.json?name=look up an Internet hostname via DNS, and get back the IPv4 and IPv6 addresses associated with it as a JSON object. this object contains aNamekey with the name looked up, and anAddresseskey containing an array of IPv4 and/or IPv6 addresses as strings. and here's the tea: looking up an address for a name will cause prefix information for all addresses found to be cached, as well. two-for-one, we love efficiency β¨.
every single JSON resource also carries a Cached key β that's the time at which the data entry was put into the cache, in [RFC3339](https://datatracker.ietf.org/doc/RFC3339) format. timestamps are the moment, fr fr.
β¨ BACKENDS β¨
- the
prefix.jsonresource currently uses the Prefix Overview and Geolocation API entry points from [RIPEstat](https://stat.ripe.net). shoutout. - the
address.jsonresource uses DNS, as provided by the Go standard library'snet.LookupIP()β that's the system resolver, bestie, doing its thing π§.
β¨ AUTHOR β¨
Brian Trammell brian@trammell.ch π
β¨ LICENSE β¨
Copyright (c) 2016 - 2018 Brian Trammell
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
and that's the whole page, bestie π this one's dated February 2018 and it lives under the manual name CANID(1). go look up some addresses, you got this π π₯
π¦ where this page comes from
- debian bookworm: canid 0.0~git20180613.007c9af-2+b21 Β· MIT
- debian trixie: canid 0.0~git20180613.007c9af-2+b34 Β· MIT
- ubuntu jammy: canid 0.0~git20180613.007c9af-2build2 Β· MIT
- ubuntu noble: canid 0.0~git20180613.007c9af-2build3 Β· MIT
- ubuntu noble: canid 0.0~git20180613.007c9af-2ubuntu0.24.04.3 Β· MIT
- ubuntu resolute: canid 0.0~git20180613.007c9af-2build4 Β· MIT
- ubuntu stonking: canid 0.0~git20180613.007c9af-2build4 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms