From a5f93069ea1a155b66c763eaa5207ea76f51c8d0 Mon Sep 17 00:00:00 2001 From: Chris Chapman Date: Thu, 29 Sep 2022 21:14:16 -0700 Subject: [PATCH] Adding DNS proxy proto --- proto-public/pbdns/dns.proto | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 proto-public/pbdns/dns.proto diff --git a/proto-public/pbdns/dns.proto b/proto-public/pbdns/dns.proto new file mode 100644 index 0000000000..bcf3e8d06f --- /dev/null +++ b/proto-public/pbdns/dns.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; + +package hashicorp.consul.dns; + +option go_package = "github.com/hashicorp/consul/proto-public/pbdns"; + +service DNSService { + // Query sends a DNS request over to Consul server and returns a DNS reply message. + rpc Query(QueryRequest) returns (QueryResponse) {} +} + +enum Protocol { + PROTOCOL_UNSET_UNSPECIFIED = 0; + PROTOCOL_TCP = 1; + PROTOCOL_UDP = 2; +} + +message QueryRequest { + // msg is the DNS request message. + bytes msg = 1; + // protocol is the protocol of the request + Protocol protocol = 2; +} + +message QueryResponse { + // msg is the DNS reply message. + bytes msg = 1; +}