Skip to content
  • teor (Tim Wilson-Brown)'s avatar
    Count unix sockets when counting client listeners · 16386a8c
    teor (Tim Wilson-Brown) authored
    Users can't run an anonymous client and non-anonymous single
    onion service at the same time. We need to know whether we have
    any client ports or sockets open to do this check.
    
    When determining whether a client port (SOCKS, Trans, NATD, DNS)
    is set, count unix sockets when counting client listeners. This
    has no user-visible behaviour change, because these options are
    set once and never read in the current tor codebase.
    
    Don't count sockets when setting ControlPort_set, that's what
    ControlSocket is for. (This will be reviewed in #19665.)
    
    Don't count sockets when counting server listeners, because the code
    that uses these options expects to count externally-visible ports.
    (And it would change the behaviour of Tor.)
    16386a8c