💾 Archived View for thebackupbox.net › ~epoch › blog › veilid--1 captured on 2024-12-17 at 10:11:37. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2024-07-09)
-=-=-=-=-=-=-
I was poking at stuff a while ago and never got around to writing it down in a blog post.
UNTIL NOW.
I was playing with the veilid-cli and was trying to figure out what I could get it to do.
reading the help in the built-in command line thing, I was able to get a DHT Key set to some value.
first thing to get a bit of data put into the DHT is to do
record create
and it'll output something like:
DHTRecordDescriptor { key: CryptoTyped { kind: VLD0, value: CryptoKey(1eimAUnFTwpATw-uyWjkPqGh3o20StlvejgCQ2KQEEo) }, owner: CryptoKey(8XrAbqEuCywkjcuc8I2C9Wfweb2NbG9ZuCq2vjM_oZY), owner_secret: Some(CryptoKey(7dj5PpAE6_xj1fy_qYB6b-w_yBQTLmzU2MHEEEBfEV8)), schema: DFLT(DHTSchemaDFLT { o_cnt: 1 }) }
These are the real values I used, so have fun with this public private key.
You need to grab some of the values out of that output to craft the next command:
record set 1eimAUnFTwpATw-uyWjkPqGh3o20StlvejgCQ2KQEEo 0 8XrAbqEuCywkjcuc8I2C9Wfweb2NbG9ZuCq2vjM_oZY:7dj5PpAE6_xj1fy_qYB6b-w_yBQTLmzU2MHEEEBfEV8 "test"
which will set the record's value to "test".
then when you want to see what value some other nerd with this private key set it to, you can do:
record get 1eimAUnFTwpATw-uyWjkPqGh3o20StlvejgCQ2KQEEo 0
I have also made some shell-scripts to do these operations.
//git.thebackupbox.net/veilid-hacks/
Not exactly sure how subkeys work atm.
The subkeys are the number 0 in the examples.
seems like they are unsigned 16 bit, so range from 0 to 65535
if you want to see what all the records your node knows about are, you can use:
record list local record list remote
some of them seem to be encrypted and output binary bloop.
the last thing I made was a script that would record peers into a file that I can use to see how big the network is and find cool websites that are hosted on the same computers.
I hope that isn't considered rude.
last I checked the network was about 75 nodes.