mirror of
https://codeberg.org/slatian/service.echoip-slatecave.git
synced 2025-07-17 14:33:27 +02:00
Removed dns search functionality completely
I don't see it working and not being annoying
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
use serde::{Deserialize,Serialize};
|
||||
use trust_dns_resolver::config::Protocol;
|
||||
use trust_dns_resolver::Name;
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::net::SocketAddr;
|
||||
@ -11,7 +10,6 @@ pub struct DnsConfig {
|
||||
pub allow_forward_lookup: bool,
|
||||
pub allow_reverse_lookup: bool,
|
||||
pub hidden_suffixes: Vec<String>,
|
||||
pub search: Vec<String>,
|
||||
pub resolver: HashMap<String,DnsResolverConfig>,
|
||||
|
||||
pub enable_system_resolver: bool,
|
||||
@ -40,8 +38,6 @@ pub struct DnsResolverConfig {
|
||||
#[serde(default="zero")]
|
||||
pub weight: i32,
|
||||
pub servers: Vec<SocketAddr>,
|
||||
#[serde(default)]
|
||||
pub search: Vec<String>,
|
||||
pub protocol: DnsProtocol,
|
||||
pub tls_dns_name: Option<String>,
|
||||
#[serde(skip_serializing)] //Don't leak our bind address to the outside
|
||||
@ -65,7 +61,6 @@ impl Default for DnsConfig {
|
||||
allow_reverse_lookup: false,
|
||||
hidden_suffixes: Vec::new(),
|
||||
resolver: Default::default(),
|
||||
search: Vec::new(),
|
||||
|
||||
enable_system_resolver: true,
|
||||
system_resolver_name: "System".to_string(),
|
||||
@ -89,8 +84,7 @@ impl Into<Protocol> for DnsProtocol {
|
||||
|
||||
impl DnsResolverConfig {
|
||||
pub fn to_trust_resolver_config(
|
||||
&self,
|
||||
additional_search: &Vec<String>,
|
||||
&self
|
||||
) -> trust_dns_resolver::config::ResolverConfig {
|
||||
let mut resolver = trust_dns_resolver::config::ResolverConfig::new();
|
||||
for server in &self.servers {
|
||||
|
Reference in New Issue
Block a user