Skip to content
  • eta's avatar
    Improve and future-proof the `arti` CLI · 4fa0122d
    eta authored
    This switches out `arti`'s argument-parsing library with `clap`, which
    is a lot more featureful (and very widely used within the Rust
    ecosystem). We also now use a lot of `clap`'s features to improve the
    CLI experience:
    
    - The CLI now expects a subcommand (currently, either "help", or "proxy"
      for the existing SOCKS proxy behaviour). This should let us add
      additional non-SOCKS-proxy features to arti in future.
    - `clap` supports default values determined at runtime, so the way the
      default config file is loaded was changed: now, we determine the
      OS-specific path for said file before invoking `clap`, so the help
      command can show it properly.
      - The behaviour of `tor_config` was also changed; now, one simply
        specifies a list of configuration files to load, together with
        whether they're required.
      - That function also way overused generics; this has been fixed.
    - Instead of using the ARTI_LOG environment variable to configure
      logging, one now uses the `-l, --log-level` CLI option.
      (The intent is for this option to be more discoverable by users.)
    - The `proxy` subcommand allows the user to override the SOCKS port used
      on the CLI without editing the config file.
    4fa0122d
After you've reviewed these contribution guidelines, you'll be all set to contribute to this project.