Tor ships with a list of directory authorities and some information about them.
In particular, this information includes for each authority its IP address, onion port and onion key fingerprint.
This makes it possible for clients to make an onion connection to one or more authorities for bootstrapping purposes. It then connects to the authority's DirPort ...
There are several amendments to Tor being researched to enable this functionality; the functionality does reduce/remove the anonymity of the server but sometimes that is okay, e.g. if (like Facebook) you run a publicly attested, non-hidden "onion service".*
The amendments are:
"Single Onion Services" https://gitweb.torproject.org/torspec.git/plain/...
Never decrease the hop length, because it's a purpose of having Tor entry point : to be censorship-resistant. If you will decrease your hidden service behaviour, you will not just decrease it's anonymity, but also make connections to it "fingerprintable"=detectable, and - as a consecuence - censorable
According to the manpage you can't have a SocksPort configured:
HiddenServiceSingleHopMode requires HiddenServiceNonAnonymousMode to be set
to 1. Since a Single Onion service is non-anonymous, you can not configure
a SOCKSPort on a tor instance that is running in HiddenServiceSingleHopMode.
If you don't have SocksPort in your config, it defaults to ...
The FAQ talks about this.
You should let people choose their path length.
Right now the path
length is hard-coded at 3 plus the number of nodes in your path that
are sensitive. That is, in normal cases it's 3, but for example if
you're accessing an onion service or a ".exit" address it could be 4.
We don't want to encourage people to use paths ...
If I remember correctly, the Tor software ships with a list of directory authorities. The client has just enough information to bootstrap and then continue to download information about all the other relays in the network.