Skip to content

`kv.sslip.io`: (key-value) read/write/delete TXTs

Compare
Choose a tag to compare
@cunnie cunnie released this 04 Dec 16:25
· 326 commits to main since this release
fdc6a80

We enable special behavior under the kv.sslip.io subdomain: it can be treated as a key-value store, the sub-subdomain being the key, and the TXT record being the value.

For example, to write ("put") the value "12.0.1" to the key "macos-version" on the ns-gce.sslip.io. nameserver, you'd use the following dig command:

dig @ns-gce.sslip.io. txt put.12.0.1.macos-version.kv.sslip.io.

To read ("get") the value back, you'd write the following dig command:

dig @ns-gce.sslip.io. txt get.macos-version.kv.sslip.io.

Since "get" is the default behavior, you don't need to include it in the
domain name:

dig @ns-gce.sslip.io. txt macos-version.kv.sslip.io.

Finally, when you're done with the key-value, you can "delete" it:

dig @ns-gce.sslip.io. txt delete.macos-version.kv.sslip.io.

Notes:

  • Keys are case-insensitive (to accommodate DNS convention). In other words, KEY.kv.sslip.io and key.kv.sslip.io return the same TXT record.
  • Values are case-sensitive. put.CamelCase.style.kv.sslip.io sets the TXT record to "CamelCase".
  • put requests will return the TXT record being put; i.e. put.hello.world.kv.sslip.io returns one TXT record of one string, hello.
  • delete requests will return the TXT record being deleted; i.e. delete.world.kv.sslip.io returns one TXT record of one string, hello. If the TXT record does not exist, no TXT records will be returned.
  • Values are limited to 63 bytes to mitigate using the sslip.io servers in a DNS amplification attack.
  • Values are not persistent: if the server is restarted, all values disappear. Poof.
  • Values are not consistent. If a value is set in ns-aws.sslip.io, it does not propagate to ns-gce.sslip.io nor ns-azure.sslip.io.