Implemented setting bind-host for DNS-resolver.

This commit is contained in:
Revertron
2021-02-22 22:02:01 +01:00
parent d7911dfe04
commit 074a709f3b
5 changed files with 15 additions and 5 deletions
+7 -1
View File
@@ -49,12 +49,18 @@ impl Settings {
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Dns {
#[serde(default = "default_host")]
pub host: String,
pub port: u16,
pub forwarders: Vec<String>
}
impl Default for Dns {
fn default() -> Self {
Dns { port: 53, forwarders: Vec::new() }
Dns { host: String::from("0.0.0.0"), port: 53, forwarders: Vec::new() }
}
}
fn default_host() -> String {
String::from("0.0.0.0")
}