dane-agent
v0.0.1
Published
This library can validate HTTPS requests using [DANE](https://en.wikipedia.org/wiki/DNS-based_Authentication_of_Named_Entities) Protocol.
Downloads
1
Readme
DANE Agent
This library can validate HTTPS requests using DANE Protocol.
Examples
A. Using NodeJS' https module:
import https from 'https'
import DANEAgent from 'dane-agent'
const agent = new DANEAgent()
const url = 'https://good.dane.huque.com/'
const req = https.get(url, { agent }, (res) => {
res.on('data', (data) => console.log(data.toString()))
})
req.end()
B. Using axios:
import axios from 'axios'
import DANEAgent from 'dane-agent'
const httpsAgent = new DANEAgent()
axios.get('https://good.dane.huque.com/', { httpsAgent })
C. Set DNS Servers:
import DANEAgent from 'dane-agent'
new DANEAgent({ dnsServers: ['1.1.1.1', '8.8.8.8'] })