We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47a7f3d commit f613a53Copy full SHA for f613a53
clash-lib/src/app/dns/config.rs
@@ -257,12 +257,13 @@ impl TryFrom<&crate::config::def::Config> for Config {
257
)));
258
}
259
260
- for ns in &dc.default_nameserver {
261
- let _ = ns.parse::<IpAddr>().map_err(|_| {
+ let default_nameserver = Config::parse_nameserver(&dc.default_nameserver)?;
+
262
+ for ns in &default_nameserver {
263
+ let _ = ns.address.parse::<SocketAddr>().map_err(|_| {
264
Error::InvalidConfig(String::from("default dns must be ip address"))
265
})?;
266
- let default_nameserver = Config::parse_nameserver(&dc.default_nameserver)?;
267
268
Ok(Self {
269
enable: dc.enable,
0 commit comments