From ae1ef93d959a91b701603e8323b9dcd2f27fc89d Mon Sep 17 00:00:00 2001 From: Eugene K Date: Thu, 10 Mar 2022 08:44:46 -0500 Subject: [PATCH] normalize DNS message JSON --- tunnel/intercept/hosting_resolv.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tunnel/intercept/hosting_resolv.go b/tunnel/intercept/hosting_resolv.go index 58b187449..55421d849 100644 --- a/tunnel/intercept/hosting_resolv.go +++ b/tunnel/intercept/hosting_resolv.go @@ -45,26 +45,26 @@ const ( ) type DnsQuestion struct { - Name string - Type int + Name string `json:"name"` + Type int `json:"type"` } type DnsAnswer struct { - Name string - Type int - TTL int `json:"TTL"` - Data string + Name string `json:"name"` + Type int `json:"type"` + TTL int `json:"ttl"` + Data string `json:"data"` Port uint16 `json:"port,omitempty"` Priority uint16 `json:"priority,omitempty"` Weight uint16 `json:"weight,omitempty"` } type DnsMessage struct { - Id int - Status int - Question []*DnsQuestion - Answer []*DnsAnswer - Comment string `json:",omitempty"` + Id int `json:"id"` + Status int `json:"status"` + Question []*DnsQuestion `json:"question"` + Answer []*DnsAnswer `json:"answer"` + Comment string `json:"comment,omitempty"` } type resolvConn struct {