|
|
|
@ -224,6 +224,8 @@ pub struct ConfigFile {
|
|
|
|
|
pub client_keys: HashSet <String>,
|
|
|
|
|
|
|
|
|
|
pub allow_any_client: bool,
|
|
|
|
|
|
|
|
|
|
pub index_directories: bool,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl ConfigFile {
|
|
|
|
@ -238,6 +240,7 @@ impl ConfigFile {
|
|
|
|
|
throttle_upload: false,
|
|
|
|
|
client_keys: Default::default (),
|
|
|
|
|
allow_any_client: true,
|
|
|
|
|
index_directories: true,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -281,6 +284,7 @@ impl Builder {
|
|
|
|
|
throttle_upload: false,
|
|
|
|
|
client_keys: Default::default (),
|
|
|
|
|
allow_any_client: true,
|
|
|
|
|
index_directories: true,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Self {
|
|
|
|
@ -559,6 +563,7 @@ pub mod executable {
|
|
|
|
|
throttle_upload: opt.throttle_upload,
|
|
|
|
|
allow_any_client: true,
|
|
|
|
|
client_keys: Default::default (),
|
|
|
|
|
index_directories: config_file.index_directories.unwrap_or (true),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if opt.print_tripcode {
|
|
|
|
@ -612,6 +617,7 @@ pub mod executable {
|
|
|
|
|
pub relay_url: Option <String>,
|
|
|
|
|
pub file_server_root: Option <PathBuf>,
|
|
|
|
|
pub file_server_roots: Option <BTreeMap <String, PathBuf>>,
|
|
|
|
|
pub index_directories: Option <bool>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn gen_and_save_key (path: &Path) -> anyhow::Result <()> {
|
|
|
|
|