address-spec.txt 2.3 KB

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