dns: add a getaddrinfo based system resolver (#22080)

This can be used when using the system resolver is desired. For
example, on Android.

Signed-off-by: Matt Klein <mklein@lyft.com>

Mirrored from https://github.com/envoyproxy/envoy @ 516b3f304bccf451691224c71a357f9c62840b2b
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent f7f73de824
commit 8929c1310b
  1. 1
      BUILD
  2. 9
      envoy/extensions/network/dns_resolver/getaddrinfo/v3/BUILD
  3. 30
      envoy/extensions/network/dns_resolver/getaddrinfo/v3/getaddrinfo_dns_resolver.proto
  4. 1
      versioning/BUILD

@ -238,6 +238,7 @@ proto_library(
"//envoy/extensions/matching/input_matchers/ip/v3:pkg",
"//envoy/extensions/network/dns_resolver/apple/v3:pkg",
"//envoy/extensions/network/dns_resolver/cares/v3:pkg",
"//envoy/extensions/network/dns_resolver/getaddrinfo/v3:pkg",
"//envoy/extensions/network/socket_interface/v3:pkg",
"//envoy/extensions/quic/crypto_stream/v3:pkg",
"//envoy/extensions/quic/proof_source/v3:pkg",

@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)

@ -0,0 +1,30 @@
syntax = "proto3";
package envoy.extensions.network.dns_resolver.getaddrinfo.v3;
import "udpa/annotations/status.proto";
option java_package = "io.envoyproxy.envoy.extensions.network.dns_resolver.getaddrinfo.v3";
option java_outer_classname = "GetaddrinfoDnsResolverProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/network/dns_resolver/getaddrinfo/v3;getaddrinfov3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: getaddrinfo DNS resolver]
// [#extension: envoy.network.dns_resolver.getaddrinfo]
// Configuration for getaddrinfo DNS resolver. This resolver will use the system's getaddrinfo()
// function to resolve hosts.
//
// .. attention::
//
// This resolver uses a single background thread to do resolutions. As such, it is not currently
// advised for use in situations requiring a high resolution rate. A thread pool can be added
// in the future if needed.
//
// .. attention::
//
// Resolutions currently use a hard coded TTL of 60s because the getaddrinfo() API does not
// provide the actual TTL. Configuration for this can be added in the future if needed.
message GetAddrInfoDnsResolverConfig {
}

@ -180,6 +180,7 @@ proto_library(
"//envoy/extensions/matching/input_matchers/ip/v3:pkg",
"//envoy/extensions/network/dns_resolver/apple/v3:pkg",
"//envoy/extensions/network/dns_resolver/cares/v3:pkg",
"//envoy/extensions/network/dns_resolver/getaddrinfo/v3:pkg",
"//envoy/extensions/network/socket_interface/v3:pkg",
"//envoy/extensions/quic/crypto_stream/v3:pkg",
"//envoy/extensions/quic/proof_source/v3:pkg",

Loading…
Cancel
Save