Adds DoH capabilities

This commit is contained in:
Pierre Lannoy 2023-12-13 18:38:00 +01:00
commit a6486e6db2
Signed by: Pierre Lannoy
GPG key ID: D27231EF87D53F31
2 changed files with 2 additions and 3 deletions

View file

@ -8,7 +8,6 @@
"node": ">=16.0.0"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "pm2 start app.js",
"start-proxied": "pm2 start app.js -- 5080 5443",
"count": "find .certs -type d | grep '.\\.' | wc -l"

View file

@ -65,7 +65,7 @@ const parseTxtRecordData = (value) => {
export async function findTxtRecord(host) {
const resolver = new DohResolver('https://doh.hosterra.tech/dns-query');
const resolved = await resolver.query( host );
console.log(resolved);
if (resolved.response.answers) {
for (const head of resolved.response.answers) {
const txtData = parseTxtRecordData(head.data);