authenticate_any

Function authenticate_any 

Source
pub async fn authenticate_any(
    controller: &mut Controller,
    password: Option<&str>,
) -> Result<()>
Expand description

Authenticates with Tor using any available method.

Attempts authentication in this order:

  1. No authentication (if control port is open)
  2. Password authentication (if provided)
  3. Cookie authentication

If password authentication fails and no password was provided, prompts the user interactively for a password.

§Arguments

  • controller - The Tor controller to authenticate
  • password - Optional password for authentication

§Errors

Returns Error::Control if authentication fails.