diff options
author | Hristo Venev <hristo@venev.name> | 2019-03-19 10:14:23 +0200 |
---|---|---|
committer | Hristo Venev <hristo@venev.name> | 2019-03-19 10:14:23 +0200 |
commit | e143b186a3eba9c03af20156ad3a2e729c638dc9 (patch) | |
tree | 20f966ffc8981d90ab5a94c3c6a86172f92fd3f2 /src/config.rs | |
parent | 517040083e7796f59c47f8afe6a782417b132c20 (diff) |
BREAKING CHANGES
ifname is now passed as an argument before the config file.
own_public_key is obtained from the interface.
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/config.rs b/src/config.rs index eab10fe..00874c2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -17,7 +17,6 @@ pub struct Source { #[serde(deny_unknown_fields)] #[derive(serde_derive::Serialize, serde_derive::Deserialize, Clone, PartialEq, Eq, Debug)] pub struct PeerConfig { - pub own_public_key: String, #[serde(default = "default_min_keepalive")] pub min_keepalive: u32, #[serde(default = "default_max_keepalive")] @@ -35,17 +34,11 @@ pub struct UpdateConfig { #[serde(deny_unknown_fields)] #[derive(serde_derive::Serialize, serde_derive::Deserialize, Clone, Debug)] pub struct Config { - pub ifname: String, - #[serde(default = "default_wg_command")] - pub wg_command: String, - #[serde(default = "default_curl_command")] - pub curl_command: String, - #[serde(flatten)] - pub peers: PeerConfig, + pub peer_config: PeerConfig, #[serde(flatten)] - pub update: UpdateConfig, + pub update_config: UpdateConfig, pub sources: Vec<Source>, } @@ -62,14 +55,6 @@ impl PeerConfig { } } -fn default_wg_command() -> String { - "wg".to_owned() -} - -fn default_curl_command() -> String { - "curl".to_owned() -} - fn default_min_keepalive() -> u32 { 10 } |