All Projects → ahmetb → coredns-grpc-backend-sample

ahmetb / coredns-grpc-backend-sample

Licence: Apache-2.0 license
Sample CoreDNS gRPC proxy backend written in Go

Programming Languages

go
31211 projects - #10 most used programming language

Sample gRPC backend for CoreDNS

Generate the gRPC stubs

This is only needed if dns.proto is updated:

cd proto
protoc dns.proto --go_out=plugins=grpc:.

Run the server

This will start the backend on port 8053 (udp/tcp):

go build -o main
./main

Start CoreDNS

This will start coredns using the Corefile on port 1053 (udp/tcp) and proxy requests to the backend over gRPC:

coredns

Try it out

$ dig +short @localhost -p 1053 A foo.example.com
127.0.0.1

$ dig +short @localhost -p 1053 AAAA foo.example.com
::1
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].