GDNSD_GEOIP_TEST(1)

✨ GDNSD_GEOIP_TEST πŸ’–

okay bestie, so this is the gdnsd_geoip_test manual page, from the gdnsd crew (the manual name is right there in the title, iykyk) β€” it's the commandline test program for gdnsd-plugin-geoip maps. yes, that means you get to poke at your geoip maps from a terminal like the main character you are. πŸŽ€


🌸 SYNOPSIS 🌸

gdnsd_geoip_test [-c /etc/gdnsd] [map_name addr]
  -c            gdnsd config dir, see main gdnsd(8) manpage for details
  map_name      Mapping name from geoip plugin config
  addr          Client IP address to map.

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically πŸ’… β€” this is a cute little commandline test program for your gdnsd-plugin-geoip map configs. it reads your standard gdnsd config file, pulls out the relevant bits from the geoip plugin section, and then runs the maps section through the exact same core code the plugin itself uses. no dupe logic, no vibes mismatch, fr fr. then it takes the IP address you handed it and resolves it against the map name you gave it, and hands you back an ordered datacenter list (plus the edns scope netmask result). slay. ✨

πŸ’€ okay but listen: the input IP addresses on the commandline do not accept CIDR subnet information. that's not a bug, bestie, that is intentional. because of the way gdnsd-plugin-geoip builds, optimizes, and performs lookups on its internal data, the client subnet mask is literally irrelevant β€” and the response scope mask is always as specific or general as it needs to be. so if you wanna simulate different edns input masks on the same address data, you just zero out more of the right-hand bits of the address yourself. easy. periodt. πŸ‘‘

and if you don't pass a [map_name addr] pair on the commandline? no problem 🫢 the program drops you into a REPL (that's Read-Eval-Print Loop, for the uninitiated) with a prompt, so you can interactively type in as many [map_name addr] pairs as your heart desires β€” no reloading the configured database(s) every single time. obsessed. 😭


🌈 SEE ALSO 🌈


Copyright (c) 2012 Brandon L Black <blblack@gmail.com>

This file is part of gdnsd.

gdnsd-plugin-geoip is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

gdnsd-plugin-geoip is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with gdnsd-plugin-geoip. If not, see <http://www.gnu.org/licenses/>.


okay that's the whole page, bestie, go test those maps πŸ’–βœ¨ this lil number came to you courtesy of gdnsd 3.8.3, dated 2025-02-16. mwah. πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from