2021-12-14 10:55:29 +03:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
|
|
|
/// ### `config.yaml` schema
|
|
|
|
/// here should contain all configuration options.
|
|
|
|
/// See: https://github.com/Dreamacro/clash/wiki/configuration for details
|
|
|
|
#[derive(Default, Debug, Clone, Deserialize, Serialize)]
|
|
|
|
pub struct ClashConfig {
|
|
|
|
pub port: Option<u32>,
|
|
|
|
|
|
|
|
/// alias to `mixed-port`
|
|
|
|
pub mixed_port: Option<u32>,
|
|
|
|
|
|
|
|
/// alias to `allow-lan`
|
|
|
|
pub allow_lan: Option<bool>,
|
|
|
|
|
|
|
|
/// alias to `external-controller`
|
|
|
|
pub external_ctrl: Option<String>,
|
|
|
|
|
|
|
|
pub secret: Option<String>,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[derive(Default, Debug, Clone, Deserialize, Serialize)]
|
|
|
|
pub struct ClashController {
|
2021-12-16 21:15:40 +03:00
|
|
|
/// clash core port
|
|
|
|
pub port: Option<String>,
|
|
|
|
|
2021-12-14 10:55:29 +03:00
|
|
|
/// same as `external-controller`
|
|
|
|
pub server: Option<String>,
|
|
|
|
pub secret: Option<String>,
|
|
|
|
}
|