Adds DoH capabilities
This commit is contained in:
parent
e62eb5f40c
commit
bb40fc56f5
1 changed files with 4 additions and 4 deletions
|
|
@ -64,7 +64,7 @@ const parseTxtRecordData = (value) => {
|
|||
*/
|
||||
export async function findTxtRecord(host) {
|
||||
const resolver = new DohResolver('https://doh.hosterra.tech/dns-query');
|
||||
resolver.query( host)
|
||||
/*resolver.query( host)
|
||||
.then(response => {
|
||||
response.answers.forEach(ans => {
|
||||
throw new Error(ans)
|
||||
|
|
@ -79,12 +79,12 @@ export async function findTxtRecord(host) {
|
|||
|
||||
});
|
||||
})
|
||||
.catch(throw new Error(err));
|
||||
.catch(throw new Error(err));*/
|
||||
|
||||
|
||||
//const resolved = await resolver.query( host );
|
||||
const resolved = await resolver.query( host );
|
||||
//console.log(resolved);
|
||||
//throw new Error(resolved.response);
|
||||
throw new Error(JSON.stringify(resolved.response));
|
||||
/*if (resolved.response.answers) {
|
||||
for (const head of resolved.response.answers) {
|
||||
const txtData = parseTxtRecordData(head.data);
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue