@@ -149,7 +149,7 @@ impl Endpoint {
149
149
let _ = builder. set_address ( ( [ 0 ; 8 ] , port) . into ( ) ) ;
150
150
// while testing always use the default loopback address
151
151
#[ cfg( feature = "test" ) ]
152
- let _ = builder. set_address ( ( [ 0 , 0 , 0 , 0 , 0 , 0xffff , 0x7f00 , 1 ] , port) . into ( ) ) ;
152
+ let _ = builder. set_address ( ( [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ] , port) . into ( ) ) ;
153
153
let _ = builder. set_server_key_pair ( Some ( key_pair) ) ;
154
154
155
155
builder
@@ -191,8 +191,7 @@ impl Endpoint {
191
191
/// The following settings are used when using
192
192
/// [`trust-dns`](trust_dns_resolver):
193
193
/// - all system configurations are ignored
194
- #[ allow( clippy:: doc_markdown) ]
195
- /// - Cloudflare with DoT is used as the name server
194
+ /// - Cloudflare with DoH is used as the name server
196
195
/// - DNSSEC is enabled
197
196
/// - IPv6 is preferred over IPv4 if the bound socket is IPv6
198
197
///
@@ -324,7 +323,7 @@ impl Endpoint {
324
323
325
324
// build the `Resolver`
326
325
#[ allow( box_pointers) ]
327
- let resolver = TokioAsyncResolver :: tokio ( ResolverConfig :: cloudflare_tls ( ) , opts)
326
+ let resolver = TokioAsyncResolver :: tokio ( ResolverConfig :: cloudflare_https ( ) , opts)
328
327
. map_err ( |error| Error :: ResolveTrustDns ( Box :: new ( error) ) ) ?;
329
328
// query the IP
330
329
#[ allow( box_pointers) ]
@@ -362,17 +361,7 @@ impl Endpoint {
362
361
/// # Errors
363
362
/// [`Error::LocalAddress`] if aquiring the local address failed.
364
363
pub fn local_address ( & self ) -> Result < SocketAddr > {
365
- let address = self . endpoint . local_addr ( ) . map_err ( Error :: LocalAddress ) ?;
366
-
367
- #[ cfg( not( feature = "test" ) ) ]
368
- return Ok ( address) ;
369
-
370
- #[ cfg( feature = "test" ) ]
371
- Ok ( if address. ip ( ) . is_loopback ( ) {
372
- ( [ 0 , 0 , 0 , 0 , 0 , 0xffff , 0x7f00 , 1 ] , address. port ( ) ) . into ( )
373
- } else {
374
- address
375
- } )
364
+ self . endpoint . local_addr ( ) . map_err ( Error :: LocalAddress )
376
365
}
377
366
378
367
/// Close all of this [`Endpoint`]'s [`Connection`](crate::Connection)s
0 commit comments