[tor-dev] How to query HS hostname from control port

Jesse V kernelcorn at riseup.net
Mon Sep 5 00:53:53 UTC 2016


Hi everyone,

TL;DR: Please let me know how to fetch the hostname of my hidden service
from Tor's control port.

Say I have configured torrc to set up a hidden/onion service. By
default, it's set up in /var/lib/tor/hidden_service, a directory which
isn't world-readable. My software can authenticate into Tor's control
port, but it needs to know the hostname/address of the service. It can't
read the hidden_service/hostname file directly, and so far I haven't
figured out how to query Tor for that information. As a last resort, I
suppose I could copy /var/lib/tor/hidden_service/hostname to a directory
that the software can read, but I'd like to avoid that if possible.

I have hunted through
https://gitweb.torproject.org/torspec.git/tree/control-spec.txt without
too much success. The closest I have come is "GETCONF
HiddenServiceOptions" but I suspect that the option is under GETINFO
instead. However, the documentation mostly describes how to query
information about other onion services. I need to know about my service
though, if that's possible. Please advise.

-- 
Jesse V

I look forward to seeing everyone again in July at Minneapolis. :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 534 bytes
Desc: OpenPGP digital signature
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20160904/976f0cc0/attachment.sig>


More information about the tor-dev mailing list