drop nested config

This functionality was never actually used AFAICT, as no way to provide
alternate profiles was ever provided.

This changes the configuration format to remove the `[global]` section,
everything that was previously under that namespace is now at the top
level.
This commit is contained in:
Charles Hall 2024-06-06 21:58:33 -07:00
parent 44088852cf
commit 003c0a4928
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
3 changed files with 10 additions and 11 deletions

View file

@ -10,13 +10,12 @@ use crate::Result;
/// ```
/// - Global proxy
/// ```toml
/// [global.proxy]
/// [proxy]
/// global = { url = "socks5h://localhost:9050" }
/// ```
/// - Proxy some domains
/// ```toml
/// [global.proxy]
/// [[global.proxy.by_domain]]
/// [[proxy.by_domain]]
/// url = "socks5h://localhost:9050"
/// include = ["*.onion", "matrix.myspecial.onion"]
/// exclude = ["*.myspecial.onion"]

View file

@ -111,7 +111,7 @@ async fn try_main() -> Result<(), error::Main> {
let args = args::parse();
// Initialize config
let raw_config = Figment::new().merge(Toml::file(&args.config).nested());
let raw_config = Figment::new().merge(Toml::file(&args.config));
let config = raw_config.extract::<Config>()?;