lanflare_core/config.rs
1use std::path::PathBuf;
2
3/// Global runtime configuration for LanFlare.
4#[derive(Clone, Debug)]
5pub struct AppConfig {
6 pub alias: String,
7 pub port: u16,
8 pub download_dir: PathBuf,
9 pub auto_accept: bool,
10 pub pin: Option<String>,
11}
12
13impl Default for AppConfig {
14 fn default() -> Self {
15 Self {
16 alias: "LanFlare Node".to_string(),
17 port: 53317,
18 download_dir: dirs::download_dir().unwrap_or_else(|| PathBuf::from(".")),
19 auto_accept: false,
20 pin: None,
21 }
22 }
23}