This is a Go-based DNS client that supports Proxy Protocol v2, allowing you to send DNS queries while preserving client source IP information.
✅ Sends DNS queries using UDP
✅ Supports Proxy Protocol v2 to include source IP details
✅ Allows setting Type-Length-Value (TLV) fields in the Proxy Protocol header
✅ Supports DNS query types: A, AAAA, MX
Make sure you have Go installed (>=1.18).
-
Clone the repository:
git clone https://github.com/yourusername/dns-proxy-client.git cd dns-proxy-client -
Install dependencies:
go mod tidy
-
Build the binary:
go build -o dns-client
Run the client with the following syntax:
./dns-client <dns_server> <port> <domain> <type(A,AAAA,MX)> [kv_key=kv_value]Example to query an AAAA record with Proxy Protocol and a TLV field:
./dns-client 1.1.1.1 53 example.com AAAA 1=custom-datamiekg/dns– DNS library for Gopires/go-proxyproto– Proxy Protocol implementation