address-spec.txt 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. $Id$
  2. Special Hostnames in Tor
  3. Nick Mathewson
  4. 1. Overview
  5. Most of the time, Tor treats user-specified hostnames as opaque: When the
  6. user connects to tor.eff.org, Tor picks an exit node and uses that node to
  7. connect to "tor.eff.org". Some hostnames, however, can be used to override
  8. Tor's default behavior and circuit-building rules.
  9. These hostnames can be passed to Tor as the address part of a SOCKS4a or
  10. SOCKS5 request. If the application is connected to Tor using an IP-only
  11. method (such as SOCKS4, TransPort, or NatdPort), these hostnames can be
  12. substituted for certain IP addresses using the MapAddress configuration
  13. option or the MAPADDRESS control command.
  14. 2. .exit
  15. SYNTAX: [hostname].[name-or-digest].exit
  16. [name-or-digest].exit
  17. Hostname is a valid hostname; [name-or-digest] is either the nickname of a
  18. Tor node or the hex-encoded digest of that node's public key.
  19. When Tor sees an address in this format, it uses the specified hostname as
  20. the exit node. If no "hostname" component is given, Tor defaults to the
  21. published IPv4 address of the exit node.
  22. It is valid to try to resolve hostnames, and in fact upon success Tor
  23. will cache an internal mapaddress of the form
  24. "www.google.com.foo.exit=64.233.161.99.foo.exit" to speed subsequent
  25. lookups.
  26. EXAMPLES:
  27. www.example.com.exampletornode.exit
  28. Connect to www.example.com from the node called "exampletornode."
  29. exampletornode.exit
  30. Connect to the published IP address of "exampletornode" using
  31. "exampletornode" as the exit.
  32. 3. .onion
  33. SYNTAX: [digest].onion
  34. The digest is the first eighty bits of a SHA1 hash of the identity key for
  35. a hidden service, encoded in base32.
  36. When Tor sees an address in this format, it tries to look up and connect to
  37. the specified hidden service. See rend-spec.txt for full details.
  38. 4. .noconnect
  39. SYNTAX: [string].noconnect
  40. When Tor sees an address in this format, it immediately closes the
  41. connection without attaching it to any circuit. This is useful for
  42. controllers that want to test whether a given application is indeed using
  43. the same instance of Tor that they're controlling.