https://github.com/danog/libdnsjson
Encoder/decoder for google's JSON DNS message format based on libdns
https://github.com/danog/libdnsjson
dns doh json libdns
Last synced: 4 months ago
JSON representation
Encoder/decoder for google's JSON DNS message format based on libdns
- Host: GitHub
- URL: https://github.com/danog/libdnsjson
- Owner: danog
- License: mit
- Created: 2019-06-12T12:33:08.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-02T16:41:26.000Z (6 months ago)
- Last Synced: 2025-02-01T11:11:08.931Z (4 months ago)
- Topics: dns, doh, json, libdns
- Language: PHP
- Size: 13.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LibDNSJson
[](https://travis-ci.org/danog/libdnsjson)
Encoder/decoder for [google's JSON DNS message format](https://developers.google.com/speed/public-dns/docs/dns-over-https) based on [libdns](https://github.com/DaveRandom/LibDNS/).
The API consists of a `QueryEncoderFactory` that creates `QueryEncoder` objects, that can encode libdns `Message` objects to a query string that can be used both with google's and cloudflare's DNS-over-HTTPS APIs (for cloudflare, using directly UDP wireformat with `libdns`'s `Encoder` is recommended).
The `JsonDecoderFactory` creates `JsonDecoder` objects, that accept JSON strings and decode them back to `Message` objects.
## Installation
```
composer require danog/libdns-json
```