Skip to content
  • teor (Tim Wilson-Brown)'s avatar
    Implement Prop #260: Single Onion Services · b560f852
    teor (Tim Wilson-Brown) authored and Nick Mathewson's avatar Nick Mathewson committed
    Add experimental OnionServiceSingleHopMode and
    OnionServiceNonAnonymousMode options. When both are set to 1, every
    hidden service on a tor instance becomes a non-anonymous Single Onion
    Service. Single Onions make one-hop (direct) connections to their
    introduction and renzedvous points. One-hop circuits make Single Onion
    servers easily locatable, but clients remain location-anonymous.
    This is compatible with the existing hidden service implementation, and
    works on the current tor network without any changes to older relays or
    clients.
    
    Implements proposal #260, completes ticket #17178. Patch by teor & asn.
    
    squash! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Implement Prop #260: Single Onion Services
    
    Redesign single onion service poisoning.
    
    When in OnionServiceSingleHopMode, each hidden service key is poisoned
    (marked as non-anonymous) on creation by creating a poison file in the
    hidden service directory.
    
    Existing keys are considered non-anonymous if this file exists, and
    anonymous if it does not.
    
    Tor refuses to launch in OnionServiceSingleHopMode if any existing keys
    are anonymous. Similarly, it refuses to launch in anonymous client mode
    if any existing keys are non-anonymous.
    
    Rewrite the unit tests to match and be more comprehensive.
    Adds a bonus unit test for rend_service_load_all_keys().
    b560f852