DNS/KnotResolver/cookies/dnslib/proxyについて、ここに記述してください。

$ dig +qr -p 8053 +cookie -t ns inet.ad.jp @127.0.0.3

; <<>> DiG 9.11.0-P3 <<>> +qr -p 8053 +cookie -t ns inet.ad.jp @127.0.0.3
;; global options: +cmd
;; Sending:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37017
;; flags: rd ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 7dd99696390356ca
;; QUESTION SECTION:
;inet.ad.jp.                    IN      NS

;; QUERY SIZE: 51

;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37017
;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 3
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 7dd99696390356cafa36788458f375c55cbe84c3e8ec214f (good)
;; QUESTION SECTION:
;inet.ad.jp.                    IN      NS

;; ANSWER SECTION:
inet.ad.jp.             3600    IN      NS      ns2.inet.ad.jp.
inet.ad.jp.             3600    IN      NS      ns1.inet.ad.jp.

;; ADDITIONAL SECTION:
ns1.inet.ad.jp.         3600    IN      A       153.121.42.26
ns2.inet.ad.jp.         3600    IN      A       49.212.54.233

;; Query time: 10 msec
;; SERVER: 127.0.0.3#8053(127.0.0.3)
;; WHEN: Sun Apr 16 22:46:45 JST 2017
;; MSG SIZE  rcvd: 135

$ python proxy.py

Starting Proxy Resolver (127.0.0.3:8053 -> 153.121.42.26:53) [UDP]
Received: [127.0.0.1:46108] (udp) <51> : 90990120000100000000000104696e6574026164026a700000020001000029100000000000000c000a00087dd99696390356ca
Request: [127.0.0.1:46108] (udp) / 'inet.ad.jp.' (NS)

    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37017
    ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
    ;; QUESTION SECTION:
    ;inet.ad.jp.                    IN      NS
    ;; ADDITIONAL SECTION:
    ;OPT PSEUDOSECTION
    ;EDNS: version: 0, flags: ; udp: 4096
    ;EDNS: code: 10; data: 7dd99696390356ca

Reply: [127.0.0.1:46108] (udp) / 'inet.ad.jp.' (NS) / RRs: NS,NS

    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37017
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 3
    ;; QUESTION SECTION:
    ;inet.ad.jp.                    IN      NS
    ;; ANSWER SECTION:
    inet.ad.jp.             3600    IN      NS      ns2.inet.ad.jp.
    inet.ad.jp.             3600    IN      NS      ns1.inet.ad.jp.
    ;; ADDITIONAL SECTION:
    ns1.inet.ad.jp.         3600    IN      A       153.121.42.26
    ns2.inet.ad.jp.         3600    IN      A       49.212.54.233
    ;OPT PSEUDOSECTION
    ;EDNS: version: 0, flags: ; udp: 4096
    ;EDNS: code: 10; data: 7dd99696390356cafa36788458f375c55cbe84c3e8ec214f

Sent: [127.0.0.1:46108] (udp) <135> : 90998500000100020000000304696e6574026164026a700000020001c00c0002000100000e100006036e7332c00cc00c0002000100000e100006036e7331c00cc03a0001000100000e10000499792a1ac0280001000100000e10000431d436e9000029100000000000001c000a00187dd99696390356cafa36788458f375c55cbe84c3e8ec214f