summaryrefslogtreecommitdiff
path: root/crates/arti/src/main.rs
Commit message (Collapse)AuthorAgeFilesLines
* Improve and future-proof the `arti` CLIeta2021-10-271-68/+135
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Update our disclaimers and limitations sections.Nick Mathewson2021-10-271-5/+3
|
* Rename tor_client/arti_tor_client to arti_client.Nick Mathewson2021-10-211-5/+5
| | | | | | Solves a name conflict with the existing tor_client create. Closes #130.
* Fix most warnings from nightly.Nick Mathewson2021-10-191-1/+3
| | | | (One represents code that I forgot to write.)
* Make elements of TorClientConfig private.Nick Mathewson2021-10-191-13/+10
|
* tor-client: refactor TorClient::bootstrap's args into a config objecteta2021-10-191-10/+16
| | | | | | | | | | | | | The three arguments TorClient::bootstrap requires by way of configuration have been factored into a new TorClientConfig object. This object gains two associated functions: one which uses `tor_config`'s `CfgPath` machinery to generate sane defaults for the state and cache directories, and one that accepts said directories in order to create a config object with those inserted. (this commit was inspired by trying to use arti as a library and being somewhat overwhelmed by the amount of config stuff there was to do :p)
* Merge branch 'reject_bad_hostnames'Nick Mathewson2021-10-181-2/+10
|\
| * Formatting fixesNeel Chauhan2021-10-061-1/+3
| |
| * Introduce ClientConfig for is_localhost config parameterNeel Chauhan2021-10-061-2/+8
| |
* | arti: On startup, increase the NOFILE resource limit.Nick Mathewson2021-10-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | The default soft limit is typically enough for process usage on most Unixes, but OSX has a pretty low default (256), which you can run into easily under heavy usage. With this patch, we're going to aim for as much as 16384, if we're allowed. Fixes part of #188.
* | Report errors in logging configuration a bit more usefullyNick Mathewson2021-10-131-2/+22
| |
* | Document trace_filter example in main.rs too.Nick Mathewson2021-10-131-0/+2
| |
* | Re-export configuration types from tor-client.Nick Mathewson2021-10-091-8/+10
| |
* | enable checked_conversions lint.Nick Mathewson2021-10-091-0/+1
|/
* Do not use set_ prefix on derive_builder settersJani Monoses2021-09-161-3/+3
|
* Merge remote-tracking branch 'origin/mr/77'Nick Mathewson2021-09-101-10/+18
|\
| * Create a separate logging section in config.Jani Monoses2021-09-091-10/+18
| |
* | Use derive_builder for the rest of tor_dirmgr::configNick Mathewson2021-09-091-3/+3
| |
* | Use derive_builder for NetworkConfig.Nick Mathewson2021-09-081-4/+5
|/
* Make journald an optional feature.Jani Monoses2021-09-071-6/+7
|
* Allow logging to journald.Jani Monoses2021-09-071-7/+26
| | | | | Log to journald when available, add journald config option. Separate logging setup into its own function.
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+285
This will cause some pain for now, but now is really the best time to do this kind of thing.