mapping unnamed TCP literals to URIs

I'm working with a project that locates machines on a network.

There's 3 types of address, all using tcp

- ipv4
- ipv6
- tor

Example :

"addr":
"yyqxgozwnb3sjzpbjj7b5jux3gply5unharzazak4nl62ar727yvvoyd.onion:9735"
"addr": "99.152.240.206:9735"
"addr": "[2a02:c207:3001:4820::1]:9735"

I would ideally like to turn these strings systematically into URIs.

Does anyone know a way?

I vaguely recall the dns: URI scheme can be used for ipv4.  onion: for
tor?  Anything for ipv6?

Received on Sunday, 27 January 2019 19:07:39 UTC