diff options
author | Hristo Venev <hristo@venev.name> | 2019-03-19 11:47:44 +0200 |
---|---|---|
committer | Hristo Venev <hristo@venev.name> | 2019-03-19 17:21:50 +0200 |
commit | 6ddb2ca6ec02b79e63ce7eb442904f4fc91e077e (patch) | |
tree | c3235b3fc98502f594935ad21ab3868842a908ea /src/config.rs | |
parent | e9634eae716cb83364ba472a58f1b1a958996658 (diff) |
Move stuff around, base64 decode keys.
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs index 2effacb..98db02d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -3,13 +3,14 @@ // See COPYING. use crate::ip::{Ipv4Set, Ipv6Set}; +use crate::model::{Key}; use serde_derive; #[serde(deny_unknown_fields)] #[derive(serde_derive::Serialize, serde_derive::Deserialize, Clone, PartialEq, Eq, Debug)] pub struct Source { pub url: String, - pub psk: Option<String>, + pub psk: Option<Key>, pub ipv4: Ipv4Set, pub ipv6: Ipv6Set, } @@ -56,14 +57,17 @@ impl PeerConfig { } } +#[inline] fn default_min_keepalive() -> u32 { 10 } +#[inline] fn default_max_keepalive() -> u32 { 0 } +#[inline] fn default_refresh_sec() -> u32 { 1200 } |