feat: RFC-8427 #171

Merged
sam merged 16 commits from RFC-8427 into master 2022-12-27 20:07:09 +00:00
Collaborator

This PR will make the JSON response body be based off RFC-8427 which will be similar to kdig's JSON output. Below is example output of running awl git.froth.zone -j --no-opt

⚠️ the only outstanding "issue" for this is that currently in the JSON body response rdata does not specify A, AAAA, MX etc. this is defined here

{
   "dateString": "2022-12-15T18:24:05-00:00",
   "dateSeconds": 1671146645,
   "msgLength": 498,
   "id": 19491,
   "opcode": "QUERY",
   "status": "NOERROR",
   "response": true,
   "authoritative": false,
   "truncated": false,
   "RD": true,
   "RA": true,
   "zero": false,
   "authenticatedData": false,
   "checkingDisabled": false,
   "QNAME": "froth.zone.",
   "QTYPE": 1,
   "QTYPEname": "A",
   "QCLASS": 1,
   "QCLASSname": "IN",
   "queryTime": "14.857181ms",
   "server": "1.1.1.1:53 (UDP)",
   "answersRRs": [
     {
       "NAME": "froth.zone.",
       "TYPE": 1,
       "TYPEname": "A",
       "CLASS": 1,
       "CLASSname": "IN",
       "TTL": "849",
       "rdata": "95.216.99.249",
       "RDLENGTH": 4
     }
   ],
   "authorityRRs": [
     {
       "NAME": "froth.zone.",
       "TYPE": 2,
       "TYPEname": "NS",
       "CLASS": 1,
       "CLASSname": "IN",
       "TTL": "75809",
       "rdata": "rin.froth.zone.",
       "RDLENGTH": 6
     },
     ---
     
This PR will make the JSON response body be based off [RFC-8427](https://www.rfc-editor.org/rfc/rfc8427.html) which will be similar to [kdig's](https://www.knot-dns.cz/docs/2.6/html/man_kdig.html) JSON output. Below is example output of running `awl git.froth.zone -j --no-opt` :warning: the only outstanding "issue" for this is that currently in the JSON body response `rdata` does not specify A, AAAA, MX etc. this is defined [here](https://www.rfc-editor.org/rfc/rfc8427.html#section-2.3) ```JSON { "dateString": "2022-12-15T18:24:05-00:00", "dateSeconds": 1671146645, "msgLength": 498, "id": 19491, "opcode": "QUERY", "status": "NOERROR", "response": true, "authoritative": false, "truncated": false, "RD": true, "RA": true, "zero": false, "authenticatedData": false, "checkingDisabled": false, "QNAME": "froth.zone.", "QTYPE": 1, "QTYPEname": "A", "QCLASS": 1, "QCLASSname": "IN", "queryTime": "14.857181ms", "server": "1.1.1.1:53 (UDP)", "answersRRs": [ { "NAME": "froth.zone.", "TYPE": 1, "TYPEname": "A", "CLASS": 1, "CLASSname": "IN", "TTL": "849", "rdata": "95.216.99.249", "RDLENGTH": 4 } ], "authorityRRs": [ { "NAME": "froth.zone.", "TYPE": 2, "TYPEname": "NS", "CLASS": 1, "CLASSname": "IN", "TTL": "75809", "rdata": "rin.froth.zone.", "RDLENGTH": 6 }, --- ```
grumbulon added 7 commits 2022-12-15 23:29:49 +00:00
attempt to make json print like kdig (ref RFC-8427)
Some checks failed
continuous-integration/drone/push Build is failing
720dbc5ccb
lint
Some checks failed
continuous-integration/drone/push Build is failing
5e0ca30b2e
small things to make more correct
All checks were successful
continuous-integration/drone/push Build is passing
9226d0cdf0
Signed-off-by: Sam Therapy <sam@samtherapy.net>
lint and stuff
All checks were successful
continuous-integration/drone/push Build is passing
4d1240cc77
make time more correct
All checks were successful
continuous-integration/drone/push Build is passing
431937d0fe
Signed-off-by: Sam Therapy <sam@samtherapy.net>
skirt around rdata
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
1d8856c45a
Signed-off-by: Sam Therapy <sam@samtherapy.net>
grumbulon added 2 commits 2022-12-16 00:23:51 +00:00
lint
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing
55cd300f4c
grumbulon added 1 commit 2022-12-16 00:28:40 +00:00
oops, accidentally was racist
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
cfc4d09003
grumbulon added 1 commit 2022-12-16 00:29:38 +00:00
oops again
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
252e95ee2d
sam added 1 commit 2022-12-17 15:30:08 +00:00
add edns
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
8aad12c7ef
Signed-off-by: Sam Therapy <sam@samtherapy.net>
sam added 1 commit 2022-12-17 15:32:16 +00:00
make ttl an int if it is an int
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
9f517424d0
Signed-off-by: Sam Therapy <sam@samtherapy.net>
sam requested review from sam 2022-12-17 16:24:27 +00:00
sam added 1 commit 2022-12-17 16:53:43 +00:00
Merge branch 'master' into RFC-8427
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
b9bf6bd8dc
sam approved these changes 2022-12-27 16:02:07 +00:00
Owner

I think this all looks good

I think this all looks good
sam added 1 commit 2022-12-27 17:07:29 +00:00
this is in the RFC

Signed-off-by: Sam Therapy <sam@samtherapy.net>
sam approved these changes 2022-12-27 17:08:02 +00:00
sam added 1 commit 2022-12-27 17:24:53 +00:00
Force a build
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
461718d1f6
sam merged commit d93eccc064 into master 2022-12-27 20:07:09 +00:00
sam deleted branch RFC-8427 2022-12-27 20:07:09 +00:00
sam referenced this pull request from a commit 2022-12-27 20:07:10 +00:00
Sign in to join this conversation.
No description provided.