address-spec.txt 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. Special Hostnames in Tor
  2. Nick Mathewson
  3. 1. Overview
  4. Most of the time, Tor treats user-specified hostnames as opaque: When
  5. the user connects to www.torproject.org, Tor picks an exit node and uses
  6. that node to connect to "www.torproject.org". Some hostnames, however,
  7. can be used to override Tor's default behavior and circuit-building
  8. 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. The .exit notation is disabled by default as of Tor 0.2.2.1-alpha, due
  27. to potential application-level attacks.
  28. EXAMPLES:
  29. www.example.com.exampletornode.exit
  30. Connect to www.example.com from the node called "exampletornode".
  31. exampletornode.exit
  32. Connect to the published IP address of "exampletornode" using
  33. "exampletornode" as the exit.
  34. 3. .onion
  35. SYNTAX: [digest].onion
  36. The digest is the first eighty bits of a SHA1 hash of the identity key for
  37. a hidden service, encoded in base32.
  38. When Tor sees an address in this format, it tries to look up and connect to
  39. the specified hidden service. See rend-spec.txt for full details.