...
Configuration
We propose two Tor configuration options :
NameSubstitution [.]source_dnspath [.]target_dnspath
NameService [.]dnspath socketspec
[noncannonical] [timeout=num]
[-- service specific options]
We require that socketspec be either the path to a UNIX domain socket
or an address of the form IP:port. We also require that that each
*dnspath be a string conforming to RFC 952 and RFC 1123 sec. 2.1.
In other words, a dnsspec consists of a series of labels separated by
periods . with each label of up to 63 characters consisting of the
letters a-z in a case insensitive mannor, the digits 0-9, and the
hyphen -, but hyphens may not appear at the beginning or end of labels.
NameSubstitution rules are applied only to DNS query strings provided
by the user, not CNAME results. If a trailing substring of a query
matches source_dnspath then it is replaced by target_dnspath.
NameService rules route matching query to to appropriate name service
supplier software. If a trailing substring of a query matches dnspath,
then a query is sent to the socketspec using the RPC protcol descrived
below. Of course, NameService rules are applied only after all the
NameSubstitution rules.