Sign inSign up

joxrays/dns-client

By joxrays

•Updated over 3 years ago

A simple DNS client command line implemented by Golang.

Image
0

75

joxrays/dns-client repository overview

A simple DNS client command line implemented by Golang.

Using library: https://github.com/miekg/dns⁠

Usage:

  • kubectl run dns-client -it --restart='Never' --image joxrays/dns-client:v1.0.0 --command -- bash

  • docker run -it --name dns-client joxrays/dns-client:v1.0.0 bash

  1. enter docker container
  2. cd /
  3. ./dns_client query <DNS-SERVER> <DOMAIN> <DNS-RECORD> : Query the ip address of domain name by DNS server.
  4. ./dns_client http <DNS-SERVER> <TARGET> : Send a http request to target server. The target ip address was parsed by DNS server

Example:

  1. ./dns_client query 8.8.8.8:53 www.google.com AAAA
  2. ./dns_client http 8.8.8.8:53 https://www.google.com
  3. ./dns_client query kube-dns.kube-system.svc.cluster.local:53 http-echo-service.default.svc.cluster.local A
  4. ./dns_client http kube-dns.kube-system.svc.cluster.local:53 http://http-echo-service:5678

test docker image: https://hub.docker.com/r/joxrays/simple-http-echo⁠

Tag summary

Content type

Image

Digest

sha256:61090f839…

Size

32.3 MB

Last updated

over 3 years ago

docker pull joxrays/dns-client:v1.0.0