xasdd6 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "xasdd6",
3
- "version": "1.0.3",
4
- "type": "module",
3
+ "version": "1.0.5",
4
+ "type": "commonjs",
5
5
  "description": "DNS Query and Spoofing Tool",
6
- "main": "./xasdd6.umd.cjs",
7
- "module": "./xasdd6.es.js",
6
+ "main": "./xasdd6.js",
7
+ "module": "./xasdd6.mjs",
8
8
  "exports": {
9
9
  ".": {
10
- "import": "./xasdd6.es.js",
11
- "require": "./xasdd6.umd.cjs"
10
+ "import": "./xasdd6.mjs",
11
+ "require": "./xasdd6.js"
12
12
  }
13
13
  },
14
14
  "keywords": [],
15
15
  "author": "xasdd6",
16
16
  "license": "ISC",
17
17
  "files": [
18
- "xasdd6.es.js",
19
- "xasdd6.umd.cjs"
20
- ]
18
+ "xasdd6.mjs",
19
+ "xasdd6.js"
20
+ ],
21
+ "jsdelivr": "./xasdd6.js"
21
22
  }
package/xasdd6.js ADDED
@@ -0,0 +1,87 @@
1
+ (function(e){typeof define==`function`&&define.amd?define([],e):e()})(function(){var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),t=/^(\d{1,3}\.){3,3}\d{1,3}$/,n=4,r=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i,i=16,a={name:`v4`,size:n,isFormat:e=>t.test(e),encode(e,t,r){r=~~r,t||=new Uint8Array(r+n);let i=e.length,a=0;for(let n=0;n<i;){let i=e.charCodeAt(n++);i===46?(t[r++]=a,a=0):a=a*10+(i-48)}return t[r]=a,t},decode(e,t){return t=~~t,`${e[t++]}.${e[t++]}.${e[t++]}.${e[t]}`}},o={name:`v6`,size:i,isFormat:e=>e.length>0&&r.test(e),encode(e,t,n){n=~~n;let r=n+i,a=-1,o=0,s=0,c=!0,l=!1;t||=new Uint8Array(n+i);for(let i=0;i<e.length;i++){let u=e.charCodeAt(i);u===58?(c?a===-1?n<r&&(a=n):(n<r&&(t[n]=0),n<r-1&&(t[n+1]=0),n+=2):(l===!0?(n<r&&(t[n]=s),n++):(n<r&&(t[n]=o>>8),n<r-1&&(t[n+1]=o&255),n+=2),o=0,s=0),c=!0,l=!1):u===46?(n<r&&(t[n]=s),n++,s=0,o=0,c=!1,l=!0):(c=!1,u>=97?u-=87:u>=65?u-=55:(u-=48,s=s*10+u),o=(o<<4)+u)}if(c===!1)l===!0?(n<r&&(t[n]=s),n++):(n<r&&(t[n]=o>>8),n<r-1&&(t[n+1]=o&255),n+=2);else if(a===0)n<r&&(t[n]=0),n<r-1&&(t[n+1]=0),n+=2;else if(a!==-1){n+=2;for(let e=Math.min(n-1,r-1);e>=a+2;e--)t[e]=t[e-2];t[a]=0,t[a+1]=0,a=n}if(a!==n&&a!==-1)for(n>r-2&&(n=r-2);r>a;)t[--r]=n<r&&n>a?t[--n]:0;else for(;n<r;)t[n++]=0;return t},decode(e,t){t=~~t;let n=``;for(let r=0;r<i;r+=2)r!==0&&(n+=`:`),n+=(e[t+r]<<8|e[t+r+1]).toString(16);return n.replace(/(^|:)0(:0)*:0(:|$)/,`$1::$3`).replace(/:{3,4}/,`::`)}};function s(e){if(a.isFormat(e))return a.size;if(o.isFormat(e))return o.size;throw Error(`Invalid ip address: ${e}`)}function c(e){return s(e)===a.size?1:2}function l(e,t,n){n=~~n;let r=s(e);return typeof t==`function`&&(t=t(n+r)),r===a.size?a.encode(e,t,n):o.encode(e,t,n)}function u(e,t,n){if(t=~~t,n||=e.length-t,n===a.size)return a.decode(e,t,n);if(n===o.size)return o.decode(e,t,n);throw Error(`Invalid buffer size needs to be ${a.size} for v4 or ${o.size} for v6.`)}function d(e){switch(e){case 1:return`A`;case 10:return`NULL`;case 28:return`AAAA`;case 18:return`AFSDB`;case 42:return`APL`;case 257:return`CAA`;case 60:return`CDNSKEY`;case 59:return`CDS`;case 37:return`CERT`;case 5:return`CNAME`;case 49:return`DHCID`;case 32769:return`DLV`;case 39:return`DNAME`;case 48:return`DNSKEY`;case 43:return`DS`;case 55:return`HIP`;case 13:return`HINFO`;case 45:return`IPSECKEY`;case 25:return`KEY`;case 36:return`KX`;case 29:return`LOC`;case 15:return`MX`;case 35:return`NAPTR`;case 2:return`NS`;case 47:return`NSEC`;case 50:return`NSEC3`;case 51:return`NSEC3PARAM`;case 12:return`PTR`;case 46:return`RRSIG`;case 17:return`RP`;case 24:return`SIG`;case 6:return`SOA`;case 99:return`SPF`;case 33:return`SRV`;case 44:return`SSHFP`;case 32768:return`TA`;case 249:return`TKEY`;case 52:return`TLSA`;case 250:return`TSIG`;case 16:return`TXT`;case 252:return`AXFR`;case 251:return`IXFR`;case 41:return`OPT`;case 255:return`ANY`}return`UNKNOWN_`+e}function f(e){switch(e.toUpperCase()){case`A`:return 1;case`NULL`:return 10;case`AAAA`:return 28;case`AFSDB`:return 18;case`APL`:return 42;case`CAA`:return 257;case`CDNSKEY`:return 60;case`CDS`:return 59;case`CERT`:return 37;case`CNAME`:return 5;case`DHCID`:return 49;case`DLV`:return 32769;case`DNAME`:return 39;case`DNSKEY`:return 48;case`DS`:return 43;case`HIP`:return 55;case`HINFO`:return 13;case`IPSECKEY`:return 45;case`KEY`:return 25;case`KX`:return 36;case`LOC`:return 29;case`MX`:return 15;case`NAPTR`:return 35;case`NS`:return 2;case`NSEC`:return 47;case`NSEC3`:return 50;case`NSEC3PARAM`:return 51;case`PTR`:return 12;case`RRSIG`:return 46;case`RP`:return 17;case`SIG`:return 24;case`SOA`:return 6;case`SPF`:return 99;case`SRV`:return 33;case`SSHFP`:return 44;case`TA`:return 32768;case`TKEY`:return 249;case`TLSA`:return 52;case`TSIG`:return 250;case`TXT`:return 16;case`AXFR`:return 252;case`IXFR`:return 251;case`OPT`:return 41;case`ANY`:return 255;case`*`:return 255}return e.toUpperCase().startsWith(`UNKNOWN_`)?parseInt(e.slice(8)):0}function p(e){switch(e){case 0:return`NOERROR`;case 1:return`FORMERR`;case 2:return`SERVFAIL`;case 3:return`NXDOMAIN`;case 4:return`NOTIMP`;case 5:return`REFUSED`;case 6:return`YXDOMAIN`;case 7:return`YXRRSET`;case 8:return`NXRRSET`;case 9:return`NOTAUTH`;case 10:return`NOTZONE`;case 11:return`RCODE_11`;case 12:return`RCODE_12`;case 13:return`RCODE_13`;case 14:return`RCODE_14`;case 15:return`RCODE_15`}return`RCODE_`+e}function ee(e){switch(e){case 0:return`QUERY`;case 1:return`IQUERY`;case 2:return`STATUS`;case 3:return`OPCODE_3`;case 4:return`NOTIFY`;case 5:return`UPDATE`;case 6:return`OPCODE_6`;case 7:return`OPCODE_7`;case 8:return`OPCODE_8`;case 9:return`OPCODE_9`;case 10:return`OPCODE_10`;case 11:return`OPCODE_11`;case 12:return`OPCODE_12`;case 13:return`OPCODE_13`;case 14:return`OPCODE_14`;case 15:return`OPCODE_15`}return`OPCODE_`+e}function m(e){switch(e){case 1:return`IN`;case 2:return`CS`;case 3:return`CH`;case 4:return`HS`;case 255:return`ANY`}return`UNKNOWN_`+e}function te(e){switch(e.toUpperCase()){case`IN`:return 1;case`CS`:return 2;case`CH`:return 3;case`HS`:return 4;case`ANY`:return 255}return 0}function ne(e){switch(e){case 1:return`LLQ`;case 2:return`UL`;case 3:return`NSID`;case 5:return`DAU`;case 6:return`DHU`;case 7:return`N3U`;case 8:return`CLIENT_SUBNET`;case 9:return`EXPIRE`;case 10:return`COOKIE`;case 11:return`TCP_KEEPALIVE`;case 12:return`PADDING`;case 13:return`CHAIN`;case 14:return`KEY_TAG`;case 26946:return`DEVICEID`}return e<0?null:`OPTION_${e}`}function re(e){if(typeof e==`number`)return e;if(!e)return-1;switch(e.toUpperCase()){case`OPTION_0`:return 0;case`LLQ`:return 1;case`UL`:return 2;case`NSID`:return 3;case`OPTION_4`:return 4;case`DAU`:return 5;case`DHU`:return 6;case`N3U`:return 7;case`CLIENT_SUBNET`:return 8;case`EXPIRE`:return 9;case`COOKIE`:return 10;case`TCP_KEEPALIVE`:return 11;case`PADDING`:return 12;case`CHAIN`:return 13;case`KEY_TAG`:return 14;case`DEVICEID`:return 26946;case`OPTION_65535`:return 65535}let t=e.match(/_(\d+)$/);return t?parseInt(t[1],10):-1}var ie=55296,h=56320;function ae(e){let t=0,n=e.length;for(let r=0;r<n;r+=1){let i=e.charCodeAt(r);if(i<=127)t+=1;else if(i<=2047)t+=2;else if((i&63488)!==ie)t+=3;else{let a=r+1;a===n||i>=h?t+=3:(e.charCodeAt(a)&64512)===h?(r=a,t+=4):t+=3}}return t}function g(e,t,n){let r=e.length;n??=0,t===void 0&&(t=new Uint8Array(ae(e)+n));let i=n;for(let n=0;n<r;n+=1){let a=e.charCodeAt(n);if(a<=127)t[i++]=a;else if(a<=2047)t[i++]=192|(a&1984)>>6,t[i++]=128|a&63;else if((a&63488)!==ie)t[i++]=224|(a&61440)>>12,t[i++]=128|(a&4032)>>6,t[i++]=128|a&63;else{let o=n+1;if(o===r||a>=h)t[i++]=239,t[i++]=191,t[i++]=189;else{let r=e.charCodeAt(o);(r&64512)===h?(n=o,a=65536|(a&1023)<<10|r&1023,t[i++]=240|(a&1835008)>>18,t[i++]=128|(a&258048)>>12,t[i++]=128|(a&4032)>>6,t[i++]=128|a&63):(t[i++]=239,t[i++]=191,t[i++]=189)}}}return g.bytes=i-n,t}g.bytes=0;function _(e,t,n){let r=``;t??=0,n??=e.length;for(let i=t;i<n;){let t=e[i++],n;if(t<=128)n=t;else if(t>191&&t<224)n=(t&31)<<6|e[i++]&63;else if(t>239&&t<365){n=((t&7)<<18|(e[i++]&63)<<12|(e[i++]&63)<<6|e[i++]&63)-65536;let a=ie|n>>10&1023;r+=String.fromCharCode(a),n=h|n&1023}else n=(t&15)<<12|(e[i++]&63)<<6|e[i++]&63;r+=String.fromCharCode(n)}return _.bytes=n-t,r}_.bytes=0;var v=e=>e instanceof Uint8Array;function y(e){return typeof e==`string`?ae(e):e.byteLength}function oe(e){return e instanceof Uint8Array?e:Array.isArray(e)?new Uint8Array(e):g(e)}function se(e,t,n){if(typeof t!=`string`)throw Error(`unknown input type`);return g(t,e,n),g.bytes}var ce=2**24,le=2**16,ue=256,b=(e,t)=>e[t]*ce+e[t+1]*le+e[t+2]*ue+e[t+3],x=(e,t)=>e[t]<<8|e[t+1],S=(e,t,n)=>(t=+t,e[n+3]=t,t>>>=8,e[n+2]=t,t>>>=8,e[n+1]=t,t>>>=8,e[n]=t,n+4),C=(e,t,n)=>(e[n]=t>>8,e[n+1]=t&255,n+2);function w(e,t,n,r,i){return n<0&&(r-=n,n=0),r<0&&(r=0),i<0?new Uint8Array:n>=t.length||r>=i?0:de(e,t,n,r,i)}function de(e,t,n,r,i){i-r>t.length-n&&(i=r+t.length-n);let a=i-r,o=e.length-r;return a>o&&(a=o),(r!==0||i<e.length)&&(e=new Uint8Array(e.buffer,e.byteOffset+r,a)),t.set(e,n),a}var fe=0,pe=32768,me=32768,he=-32769,ge=32768,_e=-32769;function T({bytes:e=0,encode:t,decode:n,encodingLength:r}){return t.bytes=e,n.bytes=e,{encode:t,decode:n,encodingLength:r||(()=>e)}}var E=T({encode(e,t,n){t||=new Uint8Array(E.encodingLength(e)),n||=0;let r=n,i=e.replace(/^\.|\.$/gm,``);if(i.length){let e=i.split(`.`);for(let r=0;r<e.length;r++){let i=se(t,e[r],n+1);t[n]=i,n+=i+1}}return t[n++]=0,E.encode.bytes=n-r,t},decode(e,t){t||=0;let n=[],r=t,i=0,a=0,o=!1;for(;;){if(t>=e.length)throw Error(`Cannot decode name (buffer overflow)`);let s=e[t++];if(a+=+!o,s===0)break;if(!(s&192)){if(t+s>e.length)throw Error(`Cannot decode name (buffer overflow)`);if(i+=s+1,i>254)throw Error(`Cannot decode name (name too long)`);n.push(_(e,t,t+s)),t+=s,a+=o?0:s}else if((s&192)==192){if(t+1>e.length)throw Error(`Cannot decode name (buffer overflow)`);let n=x(e,t-1)-49152;if(n>=r)throw Error(`Cannot decode name (bad pointer)`);t=n,r=n,a+=+!o,o=!0}else throw Error(`Cannot decode name (bad label)`)}return E.decode.bytes=a,n.length===0?`.`:n.join(`.`)},encodingLength(e){return e===`.`||e===`..`?1:y(e.replace(/^\.|\.$/gm,``))+2}}),D=T({encode(e,t,n){t||=new Uint8Array(D.encodingLength(e)),n||=0;let r=se(t,e,n+1);return t[n]=r,D.encode.bytes=r+1,t},decode(e,t){t||=0;let n=e[t],r=_(e,t+1,t+1+n);return D.decode.bytes=n+1,r},encodingLength(e){return y(e)+1}}),O=T({bytes:12,encode(e,t,n){t||=new Uint8Array(O.encodingLength(e)),n||=0;let r=(e.flags||0)&32767,i=e.type===`response`?pe:fe;return C(t,e.id||0,n),C(t,r|i,n+2),C(t,e.questions.length,n+4),C(t,e.answers.length,n+6),C(t,e.authorities.length,n+8),C(t,e.additionals.length,n+10),t},decode(e,t){if(t||=0,e.length<12)throw Error(`Header must be 12 bytes`);let n=x(e,t+2);return{id:x(e,t),type:n&pe?`response`:`query`,flags:n&32767,flag_qr:(n>>15&1)==1,opcode:ee(n>>11&15),flag_aa:(n>>10&1)==1,flag_tc:(n>>9&1)==1,flag_rd:(n>>8&1)==1,flag_ra:(n>>7&1)==1,flag_z:(n>>6&1)==1,flag_ad:(n>>5&1)==1,flag_cd:(n>>4&1)==1,rcode:p(n&15),questions:Array(x(e,t+4)),answers:Array(x(e,t+6)),authorities:Array(x(e,t+8)),additionals:Array(x(e,t+10))}},encodingLength(){return 12}}),k=T({encode(e,t,n){t||=new Uint8Array(k.encodingLength(e)),n||=0;let r=e.length;return C(t,r,n),w(e,t,n+2,0,r),k.encode.bytes=r+2,t},decode(e,t){t||=0;let n=x(e,t),r=e.slice(t+2,t+2+n);return k.decode.bytes=n+2,r},encodingLength(e){return e.length+2}}),A=T({encode(e,t,n){return t||=new Uint8Array(A.encodingLength(e)),n||=0,E.encode(e,t,n+2),C(t,E.encode.bytes,n),A.encode.bytes=E.encode.bytes+2,t},decode(e,t){t||=0;let n=x(e,t),r=E.decode(e,t+2);return A.decode.bytes=n+2,r},encodingLength(e){return E.encodingLength(e)+2}}),j=T({encode(e,t,n){t||=new Uint8Array(j.encodingLength(e)),n||=0;let r=n;return n+=2,E.encode(e.mname,t,n),n+=E.encode.bytes,E.encode(e.rname,t,n),n+=E.encode.bytes,S(t,e.serial||0,n),n+=4,S(t,e.refresh||0,n),n+=4,S(t,e.retry||0,n),n+=4,S(t,e.expire||0,n),n+=4,S(t,e.minimum||0,n),n+=4,C(t,n-r-2,r),j.encode.bytes=n-r,t},decode(e,t){t||=0;let n=t,r={};return t+=2,r.mname=E.decode(e,t),t+=E.decode.bytes,r.rname=E.decode(e,t),t+=E.decode.bytes,r.serial=b(e,t),t+=4,r.refresh=b(e,t),t+=4,r.retry=b(e,t),t+=4,r.expire=b(e,t),t+=4,r.minimum=b(e,t),t+=4,j.decode.bytes=t-n,r},encodingLength(e){return 22+E.encodingLength(e.mname)+E.encodingLength(e.rname)}}),M=T({encode(e,t,n){Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&(e[t]=oe(e[t])),!v(e[t]))throw Error(`Must be a Buffer`);t||=new Uint8Array(M.encodingLength(e)),n||=0;let r=n;return n+=2,e.forEach(function(e){t[n++]=e.length,w(e,t,n,0,e.length),n+=e.length}),C(t,n-r-2,r),M.encode.bytes=n-r,t},decode(e,t){t||=0;let n=t,r=x(e,t);t+=2;let i=[];for(;r>0;){let n=e[t++];if(--r,r<n)throw Error(`Buffer overflow`);i.push(e.slice(t,t+n)),t+=n,r-=n}return M.decode.bytes=t-n,i},encodingLength(e){Array.isArray(e)||(e=[e]);let t=2;return e.forEach(function(e){t+=typeof e==`string`?y(e)+1:e.length+1}),t}}),N=T({encode(e,t,n){t||=new Uint8Array(N.encodingLength(e)),n||=0,typeof e==`string`&&(e=oe(e)),e||=new Uint8Array;let r=n;n+=2;let i=e.length;return w(e,t,n,0,i),n+=i,C(t,n-r-2,r),N.encode.bytes=n-r,t},decode(e,t){t||=0;let n=t,r=x(e,t);t+=2;let i=e.slice(t,t+r);return t+=r,N.decode.bytes=t-n,i},encodingLength(e){return e?(v(e)?e.length:y(e))+2:2}}),P=T({encode(e,t,n){t||=new Uint8Array(P.encodingLength(e)),n||=0;let r=n;return n+=2,D.encode(e.cpu,t,n),n+=D.encode.bytes,D.encode(e.os,t,n),n+=D.encode.bytes,C(t,n-r-2,r),P.encode.bytes=n-r,t},decode(e,t){t||=0;let n=t,r={};return t+=2,r.cpu=D.decode(e,t),t+=D.decode.bytes,r.os=D.decode(e,t),t+=D.decode.bytes,P.decode.bytes=t-n,r},encodingLength(e){return D.encodingLength(e.cpu)+D.encodingLength(e.os)+2}}),F=T({encode(e,t,n){return t||=new Uint8Array(F.encodingLength(e)),n||=0,E.encode(e,t,n+2),C(t,E.encode.bytes,n),F.encode.bytes=E.encode.bytes+2,t},decode(e,t){t||=0;let n=E.decode(e,t+2);return F.decode.bytes=E.decode.bytes+2,n},encodingLength(e){return E.encodingLength(e)+2}}),I=T({encode(e,t,n){t||=new Uint8Array(I.encodingLength(e)),n||=0,C(t,e.priority||0,n+2),C(t,e.weight||0,n+4),C(t,e.port||0,n+6),E.encode(e.target,t,n+8);let r=E.encode.bytes+6;return C(t,r,n),I.encode.bytes=r+2,t},decode(e,t){t||=0;let n=x(e,t),r={};return r.priority=x(e,t+2),r.weight=x(e,t+4),r.port=x(e,t+6),r.target=E.decode(e,t+8),I.decode.bytes=n+2,r},encodingLength(e){return 8+E.encodingLength(e.target)}}),L=T({encode(e,t,n){let r=L.encodingLength(e);return t||=new Uint8Array(L.encodingLength(e)),n||=0,e.issuerCritical&&(e.flags=L.ISSUER_CRITICAL),C(t,r-2,n),n+=2,t[n]=e.flags||0,n+=1,D.encode(e.tag,t,n),n+=D.encode.bytes,se(t,e.value,n),n+=y(e.value),L.encode.bytes=r,t},decode(e,t){t||=0;let n=x(e,t);t+=2;let r=t,i={};return i.flags=e[t],t+=1,i.tag=D.decode(e,t),t+=D.decode.bytes,i.value=_(e,t,r+n),i.issuerCritical=!!(i.flags&L.ISSUER_CRITICAL),L.decode.bytes=n+2,i},encodingLength(e){return D.encodingLength(e.tag)+D.encodingLength(e.value)+2}});L.ISSUER_CRITICAL=128;var ve=T({encode(e,t,n){t||=new Uint8Array(ve.encodingLength(e)),n||=0;let r=n;return n+=2,C(t,e.preference||0,n),n+=2,E.encode(e.exchange,t,n),n+=E.encode.bytes,C(t,n-r-2,r),ve.encode.bytes=n-r,t},decode(e,t){t||=0;let n=t,r={};return t+=2,r.preference=x(e,t),t+=2,r.exchange=E.decode(e,t),t+=E.decode.bytes,ve.decode.bytes=t-n,r},encodingLength(e){return 4+E.encodingLength(e.exchange)}}),ye=T({encode(e,t,n){return t||=new Uint8Array(ye.encodingLength(e)),n||=0,C(t,4,n),n+=2,a.encode(e,t,n),t},decode(e,t){return t||=0,t+=2,a.decode(e,t)},bytes:6}),be=T({encode(e,t,n){return t||=new Uint8Array(be.encodingLength(e)),n||=0,C(t,16,n),n+=2,o.encode(e,t,n),be.encode.bytes=18,t},decode(e,t){t||=0,t+=2;let n=o.decode(e,t);return be.decode.bytes=18,n},bytes:18}),xe=e=>new Uint8Array(e),R=T({encode(e,t,n){t||=new Uint8Array(R.encodingLength(e)),n||=0;let r=n,i=re(e.code);if(C(t,i,n),n+=2,e.data)C(t,e.data.length,n),n+=2,w(e.data,t,n),n+=e.data.length;else switch(i){case 8:{let r=e.sourcePrefixLength||0,i=e.family||c(e.ip,xe),a=l(e.ip,xe),o=Math.ceil(r/8);C(t,o+4,n),n+=2,C(t,i,n),n+=2,t[n++]=r,t[n++]=e.scopePrefixLength||0,w(a,t,n,0,o),n+=o}break;case 11:e.timeout?(C(t,2,n),n+=2,C(t,e.timeout,n),n+=2):(C(t,0,n),n+=2);break;case 12:{let r=e.length||0;C(t,r,n),n+=2,t.fill(0,n,n+r),n+=r}break;case 14:{let r=e.tags.length*2;C(t,r,n),n+=2;for(let r of e.tags)C(t,r,n),n+=2}break;default:throw Error(`Unknown roption code: ${e.code}`)}return R.encode.bytes=n-r,t},decode(e,t){t||=0;let n={};n.code=x(e,t),n.type=ne(n.code),t+=2;let r=x(e,t);switch(t+=2,n.data=e.slice(t,t+r),n.code){case 8:n.family=x(e,t),t+=2,n.sourcePrefixLength=e[t++],n.scopePrefixLength=e[t++];{let i=new Uint8Array(n.family===1?4:16);w(e,i,0,t,t+r-4),n.ip=u(i)}break;case 11:r>0&&(n.timeout=x(e,t),t+=2);break;case 14:n.tags=[];for(let i=0;i<r;i+=2)n.tags.push(x(e,t)),t+=2}return R.decode.bytes=r+4,n},encodingLength(e){if(e.data)return e.data.length+4;switch(re(e.code)){case 8:{let t=e.sourcePrefixLength||0;return Math.ceil(t/8)+8}case 11:return typeof e.timeout==`number`?6:4;case 12:return e.length+4;case 14:return 4+e.tags.length*2}throw Error(`Unknown roption code: ${e.code}`)}}),z=T({encode(e,t,n){t||=new Uint8Array(z.encodingLength(e)),n||=0;let r=n,i=X(e,R);return C(t,i,n),n=Z(e,R,t,n+2),z.encode.bytes=n-r,t},decode(e,t){t||=0;let n=t,r=[],i=x(e,t);t+=2;let a=0;for(;i>0;)r[a++]=R.decode(e,t),t+=R.decode.bytes,i-=R.decode.bytes;return z.decode.bytes=t-n,r},encodingLength(e){return 2+X(e||[],R)}}),B=T({encode(e,t,n){t||=new Uint8Array(B.encodingLength(e)),n||=0;let r=n,i=e.key;if(!v(i))throw Error(`Key must be a Buffer`);return n+=2,C(t,e.flags,n),n+=2,t[n]=B.PROTOCOL_DNSSEC,n+=1,t[n]=e.algorithm,n+=1,w(i,t,n,0,i.length),n+=i.length,B.encode.bytes=n-r,C(t,B.encode.bytes-2,r),t},decode(e,t){t||=0;let n=t,r={},i=x(e,t);if(t+=2,r.flags=x(e,t),t+=2,e[t]!==B.PROTOCOL_DNSSEC)throw Error(`Protocol must be 3`);return t+=1,r.algorithm=e[t],t+=1,r.key=e.slice(t,n+i+2),t+=r.key.length,B.decode.bytes=t-n,r},encodingLength(e){return 6+y(e.key)}});B.PROTOCOL_DNSSEC=3,B.ZONE_KEY=128,B.SECURE_ENTRYPOINT=32768;var V=T({encode(e,t,n){t||=new Uint8Array(V.encodingLength(e)),n||=0;let r=n,i=e.signature;if(!v(i))throw Error(`Signature must be a Buffer`);return n+=2,C(t,f(e.typeCovered),n),n+=2,t[n]=e.algorithm,n+=1,t[n]=e.labels,n+=1,S(t,e.originalTTL,n),n+=4,S(t,e.expiration,n),n+=4,S(t,e.inception,n),n+=4,C(t,e.keyTag,n),n+=2,E.encode(e.signersName,t,n),n+=E.encode.bytes,w(i,t,n,0,i.length),n+=i.length,V.encode.bytes=n-r,C(t,V.encode.bytes-2,r),t},decode(e,t){t||=0;let n=t,r={},i=x(e,t);return t+=2,r.typeCovered=d(x(e,t)),t+=2,r.algorithm=e[t],t+=1,r.labels=e[t],t+=1,r.originalTTL=b(e,t),t+=4,r.expiration=b(e,t),t+=4,r.inception=b(e,t),t+=4,r.keyTag=x(e,t),t+=2,r.signersName=E.decode(e,t),t+=E.decode.bytes,r.signature=e.slice(t,n+i+2),t+=r.signature.length,V.decode.bytes=t-n,r},encodingLength(e){return 20+E.encodingLength(e.signersName)+y(e.signature)}}),H=T({encode(e,t,n){t||=new Uint8Array(H.encodingLength(e)),n||=0;let r=n;return n+=2,E.encode(e.mbox||`.`,t,n),n+=E.encode.bytes,E.encode(e.txt||`.`,t,n),n+=E.encode.bytes,H.encode.bytes=n-r,C(t,H.encode.bytes-2,r),t},decode(e,t){t||=0;let n=t,r={};return t+=2,r.mbox=E.decode(e,t)||`.`,t+=E.decode.bytes,r.txt=E.decode(e,t)||`.`,t+=E.decode.bytes,H.decode.bytes=t-n,r},encodingLength(e){return 2+E.encodingLength(e.mbox||`.`)+E.encodingLength(e.txt||`.`)}}),U=T({encode(e,t,n){t||=new Uint8Array(U.encodingLength(e)),n||=0;let r=n,i=[];for(let t=0;t<e.length;t++){let n=f(e[t]);i[n>>8]===void 0&&(i[n>>8]=[]),i[n>>8][n>>3&31]|=1<<7-(n&7)}for(let e=0;e<i.length;e++)if(i[e]!==void 0){let r=oe(i[e]);t[n]=e,n+=1,t[n]=r.length,n+=1,w(r,t,n,0,r.length),n+=r.length}return U.encode.bytes=n-r,t},decode(e,t,n){t||=0;let r=t,i=[];for(;t-r<n;){let n=e[t];t+=1;let r=e[t];t+=1;for(let a=0;a<r;a++){let r=e[t+a];for(let e=0;e<8;e++)if(r&1<<7-e){let t=d(n<<8|a<<3|e);i.push(t)}}t+=r}return U.decode.bytes=t-r,i},encodingLength(e){let t=[];for(let n=0;n<e.length;n++){let r=f(e[n]);t[r>>8]=Math.max(t[r>>8]||0,r&255)}let n=0;for(let e=0;e<t.length;e++)t[e]!==void 0&&(n+=2+Math.ceil((t[e]+1)/8));return n}}),W=T({encode(e,t,n){t||=new Uint8Array(W.encodingLength(e)),n||=0;let r=n;return n+=2,E.encode(e.nextDomain,t,n),n+=E.encode.bytes,U.encode(e.rrtypes,t,n),n+=U.encode.bytes,W.encode.bytes=n-r,C(t,W.encode.bytes-2,r),t},decode(e,t){t||=0;let n=t,r={},i=x(e,t);return t+=2,r.nextDomain=E.decode(e,t),t+=E.decode.bytes,r.rrtypes=U.decode(e,t,i-(t-n)),t+=U.decode.bytes,W.decode.bytes=t-n,r},encodingLength(e){return 2+E.encodingLength(e.nextDomain)+U.encodingLength(e.rrtypes)}}),G=T({encode(e,t,n){t||=new Uint8Array(G.encodingLength(e)),n||=0;let r=n,i=e.salt;if(!v(i))throw Error(`salt must be a Buffer`);let a=e.nextDomain;if(!v(a))throw Error(`nextDomain must be a Buffer`);return n+=2,t[n]=e.algorithm,n+=1,t[n]=e.flags,n+=1,C(t,e.iterations,n),n+=2,t[n]=i.length,n+=1,w(i,t,n,0,i.length),n+=i.length,t[n]=a.length,n+=1,w(a,t,n,0,a.length),n+=a.length,U.encode(e.rrtypes,t,n),n+=U.encode.bytes,G.encode.bytes=n-r,C(t,G.encode.bytes-2,r),t},decode(e,t){t||=0;let n=t,r={},i=x(e,t);t+=2,r.algorithm=e[t],t+=1,r.flags=e[t],t+=1,r.iterations=x(e,t),t+=2;let a=e[t];t+=1,r.salt=e.slice(t,t+a),t+=a;let o=e[t];return t+=1,r.nextDomain=e.slice(t,t+o),t+=o,r.rrtypes=U.decode(e,t,i-(t-n)),t+=U.decode.bytes,G.decode.bytes=t-n,r},encodingLength(e){return 8+e.salt.length+e.nextDomain.length+U.encodingLength(e.rrtypes)}}),K=T({encode(e,t,n){t||=new Uint8Array(K.encodingLength(e)),n||=0;let r=n,i=e.digest;if(!v(i))throw Error(`Digest must be a Buffer`);return n+=2,C(t,e.keyTag,n),n+=2,t[n]=e.algorithm,n+=1,t[n]=e.digestType,n+=1,w(i,t,n,0,i.length),n+=i.length,K.encode.bytes=n-r,C(t,K.encode.bytes-2,r),t},decode(e,t){t||=0;let n=t,r={},i=x(e,t);return t+=2,r.keyTag=x(e,t),t+=2,r.algorithm=e[t],t+=1,r.digestType=e[t],t+=1,r.digest=e.slice(t,n+i+2),t+=r.digest.length,K.decode.bytes=t-n,r},encodingLength(e){return 6+y(e.digest)}});function Se(e){switch(e.toUpperCase()){case`A`:return ye;case`PTR`:return F;case`CNAME`:return F;case`DNAME`:return F;case`TXT`:return M;case`NULL`:return N;case`AAAA`:return be;case`SRV`:return I;case`HINFO`:return P;case`CAA`:return L;case`NS`:return A;case`SOA`:return j;case`MX`:return ve;case`OPT`:return z;case`DNSKEY`:return B;case`RRSIG`:return V;case`RP`:return H;case`NSEC`:return W;case`NSEC3`:return G;case`DS`:return K}return k}var q=T({encode(e,t,n){t||=new Uint8Array(q.encodingLength(e)),n||=0;let r=n;if(E.encode(e.name,t,n),n+=E.encode.bytes,C(t,f(e.type),n),e.type.toUpperCase()===`OPT`){if(e.name!==`.`)throw Error(`OPT name must be root.`);C(t,e.udpPayloadSize||4096,n+2),t[n+4]=e.extendedRcode||0,t[n+5]=e.ednsVersion||0,C(t,e.flags||0,n+6),n+=8,z.encode(e.options||[],t,n),n+=z.encode.bytes}else{let r=te(e.class===void 0?`IN`:e.class);e.flush&&(r|=me),C(t,r,n+2),S(t,e.ttl||0,n+4),n+=8;let i=Se(e.type);i.encode(e.data,t,n),n+=i.encode.bytes}return q.encode.bytes=n-r,t},decode(e,t){t||=0;let n={},r=t;if(n.name=E.decode(e,t),t+=E.decode.bytes,n.type=d(x(e,t)),n.type===`OPT`)n.udpPayloadSize=x(e,t+2),n.extendedRcode=e[t+4],n.ednsVersion=e[t+5],n.flags=x(e,t+6),n.flag_do=(n.flags>>15&1)==1,n.options=z.decode(e,t+8),t+=8+z.decode.bytes;else{let r=x(e,t+2);n.ttl=b(e,t+4),n.class=m(r&he),n.flush=!!(r&me);let i=Se(n.type);n.data=i.decode(e,t+8),t+=8+i.decode.bytes}return q.decode.bytes=t-r,n},encodingLength(e){let t=e.data!==null&&e.data!==void 0?e.data:e.options;return E.encodingLength(e.name)+8+Se(e.type).encodingLength(t)}}),J=T({encode(e,t,n){t||=new Uint8Array(J.encodingLength(e)),n||=0;let r=n;return E.encode(e.name,t,n),n+=E.encode.bytes,C(t,f(e.type),n),n+=2,C(t,te(e.class===void 0?`IN`:e.class),n),n+=2,J.encode.bytes=n-r,e},decode(e,t){t||=0;let n=t,r={};return r.name=E.decode(e,t),t+=E.decode.bytes,r.type=d(x(e,t)),t+=2,r.class=m(x(e,t)),t+=2,r.class&ge&&(r.class&=_e),J.decode.bytes=t-n,r},encodingLength(e){return E.encodingLength(e.name)+4}}),Y={encode:function(e,t,n){let r=!t;r&&(t=new Uint8Array(De(e))),n||=0;let i=n;return e.questions||=[],e.answers||=[],e.authorities||=[],e.additionals||=[],O.encode(e,t,n),n+=O.encode.bytes,n=Z(e.questions,J,t,n),n=Z(e.answers,q,t,n),n=Z(e.authorities,q,t,n),n=Z(e.additionals,q,t,n),Y.encode.bytes=n-i,r&&Ee.bytes!==t.length?t.slice(0,Ee.bytes):t},decode:function(e,t){t||=0;let n=t,r=O.decode(e,t);return t+=O.decode.bytes,t=Oe(r.questions,J,e,t),t=Oe(r.answers,q,e,t),t=Oe(r.authorities,q,e,t),t=Oe(r.additionals,q,e,t),Y.decode.bytes=t-n,r},encodingLength:function(e){return O.encodingLength(e)+X(e.questions||[],J)+X(e.answers||[],q)+X(e.authorities||[],q)+X(e.additionals||[],q)}};Y.encode.bytes=0,Y.decode.bytes=0;function Ce(e,t){if(e.questions)throw Error(`Only one .question object expected instead of a .questions array!`);let n=Object.assign({type:t},e);return n.question&&(n.questions=[n.question],delete n.question),n}var we={encode:function(e,t,n){return t=Y.encode(Ce(e,`query`),t,n),we.encode.bytes=Y.encode.bytes,t},decode:function(e,t){let n=Y.decode(e,t);return we.decode.bytes=Y.decode.bytes,n.questions&&(n.question=n.questions[0],delete n.questions),n},encodingLength:function(e){return Y.encodingLength(Ce(e,`query`))}};we.encode.bytes=0,we.decode.bytes=0;var Te={encode:function(e,t,n){return t=Y.encode(Ce(e,`response`),t,n),Te.encode.bytes=Y.encode.bytes,t},decode:function(e,t){let n=Y.decode(e,t);return Te.decode.bytes=Y.decode.bytes,n.questions&&(n.question=n.questions[0],delete n.questions),n},encodingLength:function(e){return Y.encodingLength(Ce(e,`response`))}};Te.encode.bytes=0,Te.decode.bytes=0;var Ee=Y.encode;Y.decode;var De=Y.encodingLength;function X(e,t){let n=0;for(let r=0;r<e.length;r++)n+=t.encodingLength(e[r]);return n}function Z(e,t,n,r){for(let i=0;i<e.length;i++)t.encode(e[i],n,r),r+=t.encode.bytes;return r}function Oe(e,t,n,r){for(let i=0;i<e.length;i++)e[i]=t.decode(n,r),r+=t.decode.bytes;return r}function ke(e,t,n,r){if(t.length!==64)throw Error(`Charset needs to be 64 characters long! (${t.length})`);let i=new Uint8Array(256),a=new Uint8Array(64);for(let e=0;e<64;e+=1){let n=t.charCodeAt(e);if(n>255)throw Error(`Character #${e} in charset [code=${n}, char=${t.charAt(e)}] is too high! (max=255)`);if(i[n]!==0)throw Error(`Character [code=${n}, char=${t.charAt(e)}] is more than once in the charset!`);i[n]=e,a[e]=n}let o=n.charCodeAt(0),s={name:e,encodingLength(e){let t=e.length,n=t*.75|0;return e.charCodeAt(t-1)===o?e.charCodeAt(t-2)===o?n-2:n-1:n},encode(e,t,n){t??=new Uint8Array(s.encodingLength(e)),n??=0;let r=e.length;e.charCodeAt(r-1)===o&&(e.charCodeAt(r-2)===o?r-=2:--r);let a=r%4,c=r-a,l=n,u=0;for(;u<c;){let n=i[e.charCodeAt(u)]<<18|i[e.charCodeAt(u+1)]<<12|i[e.charCodeAt(u+2)]<<6|i[e.charCodeAt(u+3)];t[l++]=n>>16,t[l++]=n>>8,t[l++]=n,u+=4}if(a===3){let n=i[e.charCodeAt(u)]<<10|i[e.charCodeAt(u+1)]<<4|i[e.charCodeAt(u+2)]>>2;t[l++]=n>>8,t[l++]=n}else a===2&&(t[l++]=i[e.charCodeAt(u)]<<2|i[e.charCodeAt(u+1)]>>4);return s.encode.bytes=l-n,t},decode(e,t,n){t??=0,n??=e.length;let i=n-t,c=i%3,l=t+i-c,u=[];for(let n=t;n<l;n+=3){let t=e[n]<<16|e[n+1]<<8|e[n+2];u.push(a[t>>18&63],a[t>>12&63],a[t>>6&63],a[t&63])}if(c===2){let t=(e[n-2]<<8)+e[n-1];u.push(a[t>>10],a[t>>4&63],a[t<<2&63]),r===1&&u.push(o)}else if(c===1){let t=e[n-1];u.push(a[t>>2],a[t<<4&63]),r===1&&u.push(o,o)}return s.decode.bytes=i,String.fromCharCode.apply(String,u)}};return s}ke(`base64`,`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,`=`,1);var Ae=ke(`base64-url`,`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,`=`,2),je=e(((e,t)=>{t.exports={}})),Me=typeof global<`u`?global.AbortError:typeof window<`u`?window.AbortError:null;Me||=class extends Error{constructor(e=`Request aborted.`){super(e)}},Me.prototype.name=`AbortError`,Me.prototype.code=`ABORT_ERR`;var Ne=typeof globalThis<`u`&&globalThis.URL||je().URL,Q=class extends Error{constructor(e,t,n){super(`status=`+t+` while requesting `+e+` [`+n+`]`),this.uri=e,this.status=t,this.method=n}toJSON(){return{code:this.code,uri:this.uri,status:this.status,method:this.method,endpoint:this.endpoint}}};Q.prototype.name=`HTTPStatusError`,Q.prototype.code=`HTTP_STATUS`;var Pe=class extends Error{constructor(e,t){super(e),this.cause=t}toJSON(){return{message:this.message,endpoint:this.endpoint,code:this.code,cause:Re(this.cause)}}};Pe.prototype.name=`ResponseError`,Pe.prototype.code=`RESPONSE_ERR`;var Fe=class extends Error{constructor(e){super(`Timeout (t=`+e+`).`),this.timeout=e}toJSON(){return{code:this.code,endpoint:this.endpoint,timeout:this.timeout}}};Fe.prototype.name=`TimeoutError`,Fe.prototype.code=`ETIMEOUT`;var Ie=/^((\d{1,3}\.){3,3}\d{1,3})(:(\d{2,5}))?$/,Le=/^((::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?)(:(\d{2,5}))?$/i;function Re(e){if(typeof e==`string`)return{message:e};try{let t=JSON.stringify(e);if(t!==`{}`)return JSON.parse(t)}catch{}let t={message:String(e.message||e)};return e.code!==void 0&&(t.code=String(e.code)),t}var ze=/^(([a-z0-9]+:)\/\/)?([^/[\s:]+|\[[^\]]+\])?(:([^/\s]+))?(\/[^\s]*)?(.*)$/,Be=/\[(post|get|((ipv4|ipv6|name)=([^\]]+)))\]/gi,Ve=/\[(((pk|name)=([^\]]+)))\]/gi;function He(e){let t=ze.exec(e),n=t[2]||`https:`,r=t[3],i=t[5],a=t[6],o=t[7];if(n===`https:`||n===`http:`){let e=Ue(o,Be);return{name:e.name,protocol:n,ipv4:e.ipv4,ipv6:e.ipv6,host:r,port:i,path:a,method:e.post?`POST`:`GET`}}if(n===`udp:`||n===`udp4:`||n===`udp6:`){let t=Ue(o,Ve),a=/^\[(.*)\]$/.exec(r);if(a&&n===`udp4:`)throw Error(`Endpoint parsing error: Cannot use ipv6 host with udp4: (endpoint=${e})`);if(!a&&n===`udp6:`)throw Error(`Endpoint parsing error: Incorrectly formatted host for udp6: (endpoint=${e})`);return a?new Ye({protocol:`udp6:`,ipv6:a[1],port:i,pk:t.pk,name:t.name}):new Je({protocol:`udp4:`,ipv4:r,port:i,pk:t.pk,name:t.name})}throw new We(n,e)}function Ue(e,t){t.lastIndex=0;let n={};for(;;){let r=t.exec(e);if(!r)break;r[2]?n[r[3].toLowerCase()]=r[4]:n[r[1].toLowerCase()]=!0}return n}var We=class extends Error{constructor(e,t){super(`Invalid Endpoint: unsupported protocol "${e}" for endpoint: ${t}, supported protocols: ${Ge.join(`, `)}`),this.protocol=e,this.endpoint=t}toJSON(){return{code:this.code,endpoint:this.endpoint,timeout:this.timeout}}};We.prototype.name=`InvalidProtocolError`,We.prototype.code=`EPROTOCOL`;var Ge=[`http:`,`https:`,`udp4:`,`udp6:`],Ke=class{constructor(e,t){this.name=e.name||null,this.protocol=e.protocol;let n=typeof e.port==`string`?e.port=parseInt(e.port,10):e.port;if(n==null)this.port=t?this.protocol===`https:`?443:80:e.pk?443:53;else if(typeof n!=`number`&&!isNaN(n))throw Error(`Invalid Endpoint: port "${e.port}" needs to be a number: ${JSON.stringify(e)}`);else this.port=n}toJSON(){return this.toString()}},qe=class extends Ke{constructor(e){super(e,!1),this.pk=e.pk||null}toString(){let e=this.port===(this.pk?443:53)?``:`:${this.port}`,t=this.pk?` [pk=${this.pk}]`:``,n=this.name?` [name=${this.name}]`:``;return`udp://${this.ipv4||`[${this.ipv6}]`}${e}${t}${n}`}},Je=class extends qe{constructor(e){if(super(Object.assign({protocol:`udp4:`},e)),!e.ipv4||typeof e.ipv4!=`string`)throw Error(`Invalid Endpoint: .ipv4 "${e.ipv4}" needs to be set: ${JSON.stringify(e)}`);this.ipv4=e.ipv4}},Ye=class extends qe{constructor(e){if(super(Object.assign({protocol:`udp6:`},e)),!e.ipv6||typeof e.ipv6!=`string`)throw Error(`Invalid Endpoint: .ipv6 "${e.ipv6}" needs to be set: ${JSON.stringify(e)}`);this.ipv6=e.ipv6}};function Xe(e){return Le.test(e)&&!Ie.test(e)?`[${e}]`:e}var Ze=class extends Ke{constructor(e){if(super(Object.assign({protocol:`https:`},e),!0),e.host||(e.ipv4&&(e.host=e.ipv4),e.ipv6&&(e.host=`[${e.ipv6}]`)),!e.host||typeof e.host!=`string`)throw Error(`Invalid Endpoint: host "${e.path}" needs to be set: ${JSON.stringify(e)}`);if(this.host=e.host,this.path=e.path||`/dns-query`,this.method=/^post$/i.test(e.method)?`POST`:`GET`,this.ipv4=e.ipv4,this.ipv6=e.ipv6,!this.ipv6){let e=Le.exec(this.host);e&&(this.ipv6=e[1])}this.ipv4||Ie.test(this.host)&&(this.ipv4=this.host);let t=`${this.protocol}//${Xe(this.host)}:${this.port}${this.path}`;try{this.url=new Ne(t)}catch(e){throw Error(e.message+` [${t}]`)}}toString(){let e=this.protocol===`https:`?``:`http://`,t=this.port===(this.protocol===`https:`?443:80)?``:`:${this.port}`,n=this.method===`GET`?``:` [post]`,r=this.path===`/dns-query`?``:this.path,i=this.name?` [name=${this.name}]`:``,a=this.ipv4&&this.ipv4!==this.host?` [ipv4=${this.ipv4}]`:``,o=this.ipv6&&this.ipv6!==this.host?` [ipv6=${this.ipv6}]`:``;return`${e}${Xe(this.host)}${t}${r}${n}${a}${o}${i}`}};function Qe(e){let t;if(typeof e==`string`)t=He(e);else{if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Can not convert ${e} to an endpoint`);if(e instanceof Ke)return e;t=e}(t.protocol===null||t.protocol===void 0)&&(t.protocol=`https:`);let n=t.protocol;if(n===`udp4:`)return new Je(t);if(n===`udp6:`)return new Ye(t);if(n===`https:`||n===`http:`)return new Ze(t);throw new We(n,JSON.stringify(t))}var $e=`application/dns-message`;function et(){}async function tt(e,t,n,r){let i=t?t.localStoragePrefix+t.name:null;if(i)try{let e=JSON.parse(localStorage.getItem(i));if(e&&e.time>t.maxTime)return e}catch{}let{data:a}=await nt(e,`GET`,null,n,r),o={time:Date.now(),data:JSON.parse(_(a))};if(i)try{localStorage.setItem(i,JSON.stringify(o))}catch{o.time=null}return o}function nt(e,t,n,r,i){return new Promise((a,o)=>{let s=new Ne(e);t===`GET`&&n&&(s.search=`?dns=`+Ae.decode(n));let c=s.toString(),l=new XMLHttpRequest;l.open(t,c,!0),l.setRequestHeader(`Accept`,$e),t===`POST`&&l.setRequestHeader(`Content-Type`,$e),l.responseType=`arraybuffer`,l.timeout=r,l.ontimeout=u,l.onreadystatechange=f,l.onerror=ee,l.onload=d,t===`POST`?l.send(n):l.send(),i&&i.addEventListener(`abort`,m);function u(){p(new Fe(r));try{l.abort()}catch{}}function d(){if(l.status!==200)p(new Q(c,l.status,t));else{let e;if(typeof l.response==`string`)e=g(l.response);else if(l.response instanceof Uint8Array)e=l.response;else if(Array.isArray(l.response)||l.response instanceof ArrayBuffer)e=new Uint8Array(l.response);else throw Error(`Unprocessable response `+l.response);p(null,e)}}function f(){if(l.readyState>1&&l.status!==200&&l.status!==0){p(new Q(c,l.status,t));try{l.abort()}catch{}}}let p=function(e,t){p=et,i&&i.removeEventListener(`abort`,m),a(e?{error:e,response:l}:{data:t,response:l})};function ee(){p(l.status===200?Error(`Inexplicable XHR Error`):new Q(c,l.status,t))}function m(){p(new Me);try{l.abort()}catch{}}})}function rt(e){return e.filter(e=>e.cors||e.endpoint.cors)}var it={data:[{name:`adfree.usableprivacy.net`,endpoint:{protocol:`https:`,host:`adfree.usableprivacy.net`},description:`Public updns DoH service with advertising, tracker and malware filters.
2
+ Hosted in Europe by @usableprivacy, details see: https://docs.usableprivacy.com`,country:`Germany`,location:{lat:51.2993,long:9.491},filter:!0},{name:`adguard-dns-doh`,endpoint:{protocol:`https:`,host:`dns.adguard.com`,ipv4:`94.140.15.15`},description:`Remove ads and protect your computer from malware (over DoH)`,country:`France`,location:{lat:48.8582,long:2.3387},filter:!0},{name:`adguard-dns-family-doh`,endpoint:{protocol:`https:`,host:`dns-family.adguard.com`,ipv4:`94.140.15.16`},description:`Adguard DNS with safesearch and adult content blocking (over DoH)`,country:`France`,location:{lat:48.8582,long:2.3387},filter:!0},{name:`adguard-dns-unfiltered-doh`,endpoint:{protocol:`https:`,host:`dns-unfiltered.adguard.com`,ipv4:`94.140.14.140`},description:`AdGuard public DNS servers without filters (over DoH)`,country:`France`,location:{lat:48.8582,long:2.3387}},{name:`ahadns-doh-chi`,endpoint:{protocol:`https:`,host:`doh.chi.ahadns.net`,cors:!0},description:`A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Chicago, USA. By https://ahadns.com/
3
+ Server statistics can be seen at: https://statistics.ahadns.com/?server=chi`,country:`United States`,location:{lat:41.8483,long:-87.6517},filter:!0,cors:!0},{name:`ahadns-doh-in`,endpoint:{protocol:`https:`,host:`doh.in.ahadns.net`,cors:!0},description:`A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Mumbai, India. By https://ahadns.com/
4
+ Server statistics can be seen at: https://statistics.ahadns.com/?server=in`,country:`India`,location:{lat:19.0748,long:72.8856},filter:!0,cors:!0},{name:`ahadns-doh-la`,endpoint:{protocol:`https:`,host:`doh.la.ahadns.net`,cors:!0},description:`A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Los Angeles, USA. By https://ahadns.com/
5
+ Server statistics can be seen at: https://statistics.ahadns.com/?server=la`,country:`United States`,location:{lat:34.0549,long:-118.2578},filter:!0,cors:!0},{name:`ahadns-doh-nl`,endpoint:{protocol:`https:`,host:`doh.nl.ahadns.net`,cors:!0},description:`A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Amsterdam, Netherlands. By https://ahadns.com/
6
+ Server statistics can be seen at: https://statistics.ahadns.com/?server=nl`,country:`Netherlands`,location:{lat:52.3824,long:4.8995},filter:!0,cors:!0},{name:`ahadns-doh-ny`,endpoint:{protocol:`https:`,host:`doh.ny.ahadns.net`,cors:!0},description:`A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in New York. By https://ahadns.com/
7
+ Server statistics can be seen at: https://statistics.ahadns.com/?server=ny`,country:`United States`,location:{lat:40.7308,long:-73.9975},filter:!0,cors:!0},{name:`ahadns-doh-pl`,endpoint:{protocol:`https:`,host:`doh.pl.ahadns.net`,cors:!0},description:`A zero logging DNS with support for DNS-over-HTTPS (DoH) & DNS-over-TLS (DoT). Blocks ads, malware, trackers, viruses, ransomware, telemetry and more. No persistent logs. DNSSEC. Hosted in Poland. By https://ahadns.com/
8
+ Server statistics can be seen at: https://statistics.ahadns.com/?server=pl`,country:`Netherlands`,location:{lat:52.3824,long:4.8995},filter:!0,cors:!0},{name:`alidns-doh`,endpoint:{protocol:`https:`,host:`dns.alidns.com`,ipv4:`223.5.5.5`,cors:!0},description:`A public DNS resolver that supports DoH/DoT in mainland China, provided by Alibaba-Cloud.
9
+ Warning: GFW filtering rules are applied by that resolver.
10
+ Homepage: https://alidns.com/`,country:`China`,location:{lat:34.7725,long:113.7266},filter:!0,log:!0,cors:!0},{name:`ams-ads-doh-nl`,endpoint:{protocol:`https:`,host:`dnsnl-noads.alekberg.net`},description:`Resolver in Amsterdam. DoH protocol. Non-logging. Blocks ads, malware and trackers. DNSSEC enabled.`,country:`Romania`,location:{lat:45.9968,long:24.997},filter:!0},{name:`ams-doh-nl`,endpoint:{protocol:`https:`,host:`dnsnl.alekberg.net`},description:`Resolver in Amsterdam. DoH protocol. Non-logging, non-filtering, DNSSEC.`,country:`Romania`,location:{lat:45.9968,long:24.997}},{name:`att`,endpoint:{protocol:`https:`,host:`dohtrial.att.net`},description:`AT&T test DoH server.`,log:!0},{name:`bcn-ads-doh`,endpoint:{protocol:`https:`,host:`dnses-noads.alekberg.net`},description:`Resolver in Spain. DoH protocol. Non-logging, remove ads and malware, DNSSEC.`,country:`Spain`,location:{lat:41.3891,long:2.1611},filter:!0},{name:`bcn-doh`,endpoint:{protocol:`https:`,host:`dnses.alekberg.net`},description:`Resolver in Spain. DoH protocol. Non-logging, non-filtering, DNSSEC.`,country:`Spain`,location:{lat:41.3891,long:2.1611}},{name:`brahma-world`,endpoint:{protocol:`https:`,host:`dns.brahma.world`},description:`DNS-over-HTTPS server. Non Logging, filters ads, trackers and malware. DNSSEC ready, QNAME Minimization, No EDNS Client-Subnet.
11
+ Hosted in Stockholm, Sweden. (https://dns.brahma.world)`,country:`United States`,location:{lat:37.751,long:-97.822},filter:!0},{name:`cisco-doh`,endpoint:{protocol:`https:`,host:`doh.opendns.com`,ipv4:`146.112.41.2`},description:`Remove your DNS blind spot (DoH protocol)
12
+ Warning: modifies your queries to include a copy of your network
13
+ address when forwarding them to a selection of companies and organizations.`,country:`United States`,location:{lat:37.751,long:-97.822},filter:!0,log:!0},{name:`cloudflare`,endpoint:{protocol:`https:`,host:`dns.cloudflare.com`,ipv4:`1.0.0.1`,cors:!0},description:`Cloudflare DNS (anycast) - aka 1.1.1.1 / 1.0.0.1`,country:`Australia`,location:{lat:-33.494,long:143.2104},cors:!0},{name:`cloudflare-family`,endpoint:{protocol:`https:`,host:`family.cloudflare-dns.com`,ipv4:`1.0.0.3`,cors:!0},description:`Cloudflare DNS (anycast) with malware protection and parental control - aka 1.1.1.3 / 1.0.0.3`,country:`Australia`,location:{lat:-33.494,long:143.2104},filter:!0,cors:!0},{name:`cloudflare-ipv6`,endpoint:{protocol:`https:`,host:`1dot1dot1dot1.cloudflare-dns.com`,cors:!0},description:`Cloudflare DNS over IPv6 (anycast)`,country:`United States`,location:{lat:37.751,long:-97.822},cors:!0},{name:`cloudflare-security`,endpoint:{protocol:`https:`,host:`security.cloudflare-dns.com`,ipv4:`1.0.0.2`,cors:!0},description:`Cloudflare DNS (anycast) with malware blocking - aka 1.1.1.2 / 1.0.0.2`,country:`Australia`,location:{lat:-33.494,long:143.2104},filter:!0,cors:!0},{name:`controld-block-malware`,endpoint:{protocol:`https:`,host:`freedns.controld.com`,path:`/p1`},description:`ControlD Free DNS. Take CONTROL of your Internet. Block unwanted content, bypass geo-restrictions and be more productive. DoH protocol and No logging. - https://controld.com/free-dns
14
+ This DNS blocks Malware domains.`,country:`Canada`,location:{lat:43.6319,long:-79.3716},filter:!0},{name:`controld-block-malware-ad`,endpoint:{protocol:`https:`,host:`freedns.controld.com`,path:`/p2`},description:`ControlD Free DNS. Take CONTROL of your Internet. Block unwanted content, bypass geo-restrictions and be more productive. DoH protocol and No logging. - https://controld.com/free-dns
15
+ This DNS blocks Malware, Ads & Tracking domains.`,country:`Canada`,location:{lat:43.6319,long:-79.3716},filter:!0},{name:`controld-block-malware-ad-social`,endpoint:{protocol:`https:`,host:`freedns.controld.com`,path:`/p3`},description:`ControlD Free DNS. Take CONTROL of your Internet. Block unwanted content, bypass geo-restrictions and be more productive. DoH protocol and No logging. - https://controld.com/free-dns
16
+ This DNS blocks Malware, Ads & Tracking and Social Networks domains.`,country:`Canada`,location:{lat:43.6319,long:-79.3716},filter:!0},{name:`controld-family-friendly`,endpoint:{protocol:`https:`,host:`freedns.controld.com`,path:`/family`},description:`ControlD Free DNS. Take CONTROL of your Internet. Block unwanted content, bypass geo-restrictions and be more productive. DoH protocol and No logging. - https://controld.com/free-dns
17
+ This DNS blocks Malware, Ads & Tracking, Adult Content and Drugs domains.`,country:`Canada`,location:{lat:43.6319,long:-79.3716},filter:!0},{name:`controld-uncensored`,endpoint:{protocol:`https:`,host:`freedns.controld.com`,path:`/uncensored`},description:`ControlD Free DNS. Take CONTROL of your Internet. Block unwanted content, bypass geo-restrictions and be more productive. DoH protocol and No logging. - https://controld.com/free-dns
18
+ This DNS unblocks censored domains from various countries.`,country:`Canada`,location:{lat:43.6319,long:-79.3716}},{name:`controld-unfiltered`,endpoint:{protocol:`https:`,host:`freedns.controld.com`,path:`/p0`},description:`ControlD Free DNS. Take CONTROL of your Internet. Block unwanted content, bypass geo-restrictions and be more productive. DoH protocol and No logging. - https://controld.com/free-dns
19
+ This is a Unfiltered DNS, no DNS record blocking or manipulation here, if you want to block Malware, Ads & Tracking or Social Network domains, use the other ControlD DNS configs.`,country:`Canada`,location:{lat:43.6319,long:-79.3716}},{name:`dns.digitale-gesellschaft.ch`,endpoint:{protocol:`https:`,host:`dns.digitale-gesellschaft.ch`},description:`Public DoH resolver operated by the Digital Society (https://www.digitale-gesellschaft.ch).
20
+ Hosted in Zurich, Switzerland.
21
+ Non-logging, non-filtering, supports DNSSEC.`,country:`Switzerland`,location:{lat:47.1449,long:8.1551}},{name:`dns.ryan-palmer`,endpoint:{protocol:`https:`,host:`dns1.ryan-palmer.com`},description:`Non-logging, non-filtering, DNSSEC DoH Server. Hosted in the UK.`,country:`United Kingdom`,location:{lat:51.5164,long:-.093}},{name:`dns.sb`,endpoint:{protocol:`https:`,host:`doh.sb`,ipv4:`185.222.222.222`,cors:!0},description:`DNSSEC-enabled DoH server by https://xtom.com/
22
+ https://dns.sb/doh/`,country:`Unknown`,location:{lat:47,long:8},cors:!0},{name:`dns.therifleman.name`,endpoint:{protocol:`https:`,host:`dns.therifleman.name`},description:`DNS-over-HTTPS DNS forwarder from Mumbai, India. Blocks web and Android trackers and ads.
23
+ IP addresses are not logged, but queries are logged for 24 hours for debugging.
24
+ Report issues, send suggestions @ joker349 at protonmail.com.
25
+ Also supports DoT (for android) @ dns.therifleman.name and plain DNS @ 172.104.206.174`,country:`United States`,location:{lat:37.751,long:-97.822},filter:!0},{name:`dnsforfamily-doh`,endpoint:{protocol:`https:`,host:`dns-doh.dnsforfamily.com`},description:`(DoH Protocol) (Now supports DNSSEC). Block adult websites, gambling websites, malwares and advertisements.
26
+ It also enforces safe search in: Google, YouTube, Bing, DuckDuckGo and Yandex.
27
+ Social websites like Facebook and Instagram are not blocked. No DNS queries are logged.
28
+ As of 26-May-2022 5.9 million websites are blocked and new websites are added to blacklist daily.
29
+ Completely free, no ads or any commercial motive. Operating for 4 years now.
30
+ Provided by: https://dnsforfamily.com`,country:`Finland`,location:{lat:60.1758,long:24.9349},filter:!0},{name:`dnsforfamily-doh-no-safe-search`,endpoint:{protocol:`https:`,host:`dns-doh-no-safe-search.dnsforfamily.com`},description:`(DoH Protocol) (Now supports DNSSEC) Block adult websites, gambling websites, malwares and advertisements.
31
+ Unlike other dnsforfamily servers, this one does not enforces safe search. So Google, YouTube, Bing, DuckDuckGo and Yandex are completely accessible without any restriction.
32
+ Social websites like Facebook and Instagram are not blocked. No DNS queries are logged.
33
+ As of 26-May-2022 5.9 million websites are blocked and new websites are added to blacklist daily.
34
+ Completely free, no ads or any commercial motive. Operating for 4 years now.
35
+ Warning: This server is incompatible with anonymization.
36
+ Provided by: https://dnsforfamily.com`,country:`Finland`,location:{lat:60.1758,long:24.9349},filter:!0},{name:`dnsforge.de`,endpoint:{protocol:`https:`,host:`dnsforge.de`,cors:!0},description:`Public DoH resolver running with Pihole for Adblocking (https://dnsforge.de).
37
+ Non-logging, AD-filtering, supports DNSSEC. Hosted in Germany.`,country:`Germany`,location:{lat:52.2998,long:9.447},filter:!0,cors:!0},{name:`dnshome-doh`,endpoint:{protocol:`https:`,host:`dns.dnshome.de`},description:`https://www.dnshome.de/ public resolver in Germany`},{name:`dnspod-doh`,endpoint:{protocol:`https:`,host:`doh.pub`,cors:!0},description:`A public DNS resolver in mainland China provided by DNSPod (Tencent Cloud).
38
+ https://www.dnspod.cn/Products/Public.DNS?lang=en`,filter:!0,log:!0,cors:!0},{name:`dnswarden-asia-adblock-dohv4`,endpoint:{protocol:`https:`,host:`doh.asia.dnswarden.com`,path:`/adblock`},description:`Hosted in Singapore. For more information look [here](https://github.com/bhanupratapys/dnswarden) or [here](https://dnswarden.com).`,country:`Singapore`,location:{lat:1.2929,long:103.8547},filter:!0},{name:`dnswarden-asia-adultfilter-dohv4`,endpoint:{protocol:`https:`,host:`doh.asia.dnswarden.com`,path:`/adultfilter`},description:`Hosted in Singapore. For more information look [here](https://github.com/bhanupratapys/dnswarden) or [here](https://dnswarden.com).`,country:`Singapore`,location:{lat:1.2929,long:103.8547},filter:!0},{name:`dnswarden-asia-uncensor-dohv4`,endpoint:{protocol:`https:`,host:`doh.asia.dnswarden.com`,path:`/uncensored`},description:`Hosted in Singapore. For more information look [here](https://github.com/bhanupratapys/dnswarden) or [here](https://dnswarden.com).`,country:`Singapore`,location:{lat:1.2929,long:103.8547}},{name:`dnswarden-eu-adblock-dohv4`,endpoint:{protocol:`https:`,host:`doh.eu.dnswarden.com`},description:`Hosted in Germany. For more information look [here](https://github.com/bhanupratapys/dnswarden) or [here](https://dnswarden.com).`,country:`Germany`,location:{lat:50.1103,long:8.7147},filter:!0},{name:`dnswarden-us-adblock-dohv4`,endpoint:{protocol:`https:`,host:`doh.us.dnswarden.com`},description:`Hosted in USA (Dallas) . For more information look [here](https://github.com/bhanupratapys/dnswarden) or [here](https://dnswarden.com).`,country:`United States`,location:{lat:32.7889,long:-96.8021},filter:!0},{name:`doh-ch-blahdns`,endpoint:{protocol:`https:`,host:`doh-ch.blahdns.com`,cors:!0},description:`Blocks ad and Tracking, no Logging, DNSSEC, Hosted in Switzerland. By https://blahdns.com/`,country:`Netherlands`,location:{lat:52.3824,long:4.8995},filter:!0,cors:!0},{name:`doh-cleanbrowsing-adult`,endpoint:{protocol:`https:`,host:`doh.cleanbrowsing.org`,path:`/doh/adult-filter/`,cors:!0},description:`Blocks access to all adult, pornographic and explicit sites. It does
39
+ not block proxy or VPNs, nor mixed-content sites. Sites like Reddit
40
+ are allowed. Google and Bing are set to the Safe Mode.
41
+ By https://cleanbrowsing.org/`,filter:!0,cors:!0},{name:`doh-cleanbrowsing-family`,endpoint:{protocol:`https:`,host:`doh.cleanbrowsing.org`,path:`/doh/family-filter/`,cors:!0},description:`Blocks access to all adult, pornographic and explicit sites. It also
42
+ blocks proxy and VPN domains that are used to bypass the filters.
43
+ Mixed content sites (like Reddit) are also blocked. Google, Bing and
44
+ Youtube are set to the Safe Mode.
45
+ By https://cleanbrowsing.org/`,filter:!0,cors:!0},{name:`doh-cleanbrowsing-security`,endpoint:{protocol:`https:`,host:`doh.cleanbrowsing.org`,path:`/doh/security-filter/`,cors:!0},description:`Block access to phishing, malware and malicious domains. It does not block adult content.
46
+ By https://cleanbrowsing.org/`,filter:!0,cors:!0},{name:`doh-crypto-sx`,endpoint:{protocol:`https:`,host:`doh.crypto.sx`,cors:!0},description:`DNS-over-HTTPS server. Anycast, no logs, no censorship, DNSSEC.
47
+ Backend hosted by Scaleway, globally cached via Cloudflare.
48
+ Maintained by Frank Denis.`,country:`United States`,location:{lat:37.751,long:-97.822},cors:!0},{name:`doh-crypto-sx-ipv6`,endpoint:{protocol:`https:`,host:`doh-ipv6.crypto.sx`,cors:!0},description:`DNS-over-HTTPS server accessible over IPv6. Anycast, no logs, no censorship, DNSSEC.
49
+ Backend hosted by Scaleway, globally cached via Cloudflare.
50
+ Maintained by Frank Denis.`,country:`United States`,location:{lat:37.751,long:-97.822},cors:!0},{name:`doh-de-blahdns`,endpoint:{protocol:`https:`,host:`doh-de.blahdns.com`,cors:!0},description:`Blocks ad and Tracking, no Logging, DNSSEC, Hosted in Germany. By https://blahdns.com/`,country:`Germany`,location:{lat:51.2993,long:9.491},filter:!0,cors:!0},{name:`doh-fi-blahdns`,endpoint:{protocol:`https:`,host:`doh-fi.blahdns.com`,cors:!0},description:`Blocks ad and Tracking, no Logging, DNSSEC, Hosted in Finland. By https://blahdns.com/`,country:`Finland`,location:{lat:60.1758,long:24.9349},filter:!0,cors:!0},{name:`doh-ibksturm`,endpoint:{protocol:`https:`,host:`ibksturm.synology.me`},description:`DoH & DoT Server, No Logging, No Filters, DNSSEC
51
+ Running privately by ibksturm in Thurgau, Switzerland`},{name:`doh-jp-blahdns`,endpoint:{protocol:`https:`,host:`doh-jp.blahdns.com`,cors:!0},description:`Blocks ad and Tracking, no Logging, DNSSEC, Hosted in Japan. By https://blahdns.com/`,country:`Japan`,location:{lat:35.6882,long:139.7532},filter:!0,cors:!0},{name:`doh.ffmuc.net`,endpoint:{protocol:`https:`,host:`doh.ffmuc.net`},description:`An open (non-logging, non-filtering, non-censoring) DoH resolver operated by Freifunk Munich with nodes in DE.
52
+ https://ffmuc.net/`,country:`Germany`,location:{lat:51.2993,long:9.491}},{name:`doh.tiarap.org`,endpoint:{protocol:`https:`,host:`doh.tiarap.org`},description:`Non-Logging DNS-over-HTTPS server, cached via Cloudflare.
53
+ Filters out ads, trackers and malware, NO ECS, supports DNSSEC.`,country:`United States`,location:{lat:37.751,long:-97.822},filter:!0},{name:`google`,endpoint:{protocol:`https:`,host:`dns.google`,ipv4:`8.8.8.8`,cors:!0},description:`Google DNS (anycast)`,country:`United States`,location:{lat:37.751,long:-97.822},log:!0,cors:!0},{name:`hdns`,endpoint:{protocol:`https:`,host:`query.hdns.io`,cors:!0},description:`HDNS is a public DNS resolver that supports Handshake domains.
54
+ https://www.hdns.io`,country:`United States`,location:{lat:37.7771,long:-122.406},cors:!0},{name:`he`,endpoint:{protocol:`https:`,host:`ordns.he.net`},description:`Hurricane Electric DoH server (anycast)
55
+ Unknown logging policy.`,country:`United States`,location:{lat:37.751,long:-97.822},log:!0},{name:`id-gmail-doh`,endpoint:{protocol:`https:`,host:`doh.tiar.app`},description:`Non-Logging DNS-over-HTTPS server located in Singapore.
56
+ Filters out ads, trackers and malware, supports DNSSEC, provided by id-gmail.`,country:`Singapore`,location:{lat:1.2929,long:103.8547},filter:!0},{name:`iij`,endpoint:{protocol:`https:`,host:`public.dns.iij.jp`},description:`DoH server operated by Internet Initiative Japan in Tokyo.
57
+ https://www.iij.ad.jp/`,country:`Japan`,location:{lat:35.69,long:139.69},log:!0},{name:`iqdns-doh`,endpoint:{protocol:`https:`,host:`a.passcloud.xyz`},description:`Non-logging DoH service runned by V2EX.com user johnsonwil.
58
+ Returns "no such domain" for anti-Chinese government websites. Supports DNSSEC.
59
+ For more information: https://www.v2ex.com/t/785666`,filter:!0},{name:`jp.tiar.app-doh`,endpoint:{protocol:`https:`,host:`jp.tiar.app`},description:`Non-Logging, Non-Filtering DNS-over-HTTPS server in Japan.
60
+ No ECS, Support DNSSEC`,country:`Japan`,location:{lat:35.6882,long:139.7532}},{name:`jp.tiarap.org`,endpoint:{protocol:`https:`,host:`jp.tiarap.org`},description:`DNS-over-HTTPS Server. Non-Logging, Non-Filtering, No ECS, Support DNSSEC.
61
+ Cached via Cloudflare.`},{name:`libredns`,endpoint:{protocol:`https:`,host:`doh.libredns.gr`},description:`DoH server in Germany. No logging, but no DNS padding and no DNSSEC support.
62
+ https://libredns.gr/`,country:`Germany`,location:{lat:51.2993,long:9.491}},{name:`nextdns`,endpoint:{protocol:`https:`,host:`anycsast.dns.nextdns.io`},description:`NextDNS is a cloud-based private DNS service that gives you full control
63
+ over what is allowed and what is blocked on the Internet.
64
+ DNSSEC, Anycast, Non-logging, NoFilters
65
+ https://www.nextdns.io/`,country:`Netherlands`,location:{lat:52.3891,long:4.6563}},{name:`nextdns-ultralow`,endpoint:{protocol:`https:`,host:`dns.nextdns.io`,path:`/dnscrypt-proxy`},description:`NextDNS is a cloud-based private DNS service that gives you full control
66
+ over what is allowed and what is blocked on the Internet.
67
+ https://www.nextdns.io/
68
+ To select the server location, the "-ultralow" variant relies on bootstrap servers
69
+ instead of anycast.`},{name:`njalla-doh`,endpoint:{protocol:`https:`,host:`dns.njal.la`,cors:!0},description:`Non-logging DoH server in Sweden operated by Njalla.
70
+ https://dns.njal.la/`,country:`Sweden`,location:{lat:59.3247,long:18.056},cors:!0},{name:`odoh-cloudflare`,endpoint:{protocol:`https:`,host:`odoh.cloudflare-dns.com`,cors:!0},description:`Cloudflare ODoH server.
71
+ https://cloudflare.com`,cors:!0},{name:`odoh-crypto-sx`,endpoint:{protocol:`https:`,host:`odoh.crypto.sx`,cors:!0},description:`ODoH target server. Anycast, no logs.
72
+ Backend hosted by Scaleway. Maintained by Frank Denis.`,cors:!0},{name:`odoh-id-gmail`,endpoint:{protocol:`https:`,host:`doh.tiar.app`,path:`/odoh`},description:`ODoH target server. Based in Singapore, no logs.
73
+ Filter ads, trackers and malware.`,filter:!0},{name:`odoh-jp.tiar.app`,endpoint:{protocol:`https:`,host:`jp.tiar.app`,path:`/odoh`},description:`ODoH target server. no logs.`},{name:`odoh-jp.tiarap.org`,endpoint:{protocol:`https:`,host:`jp.tiarap.org`,path:`/odoh`},description:`ODoH target server via Cloudflare, no logs.`},{name:`odoh-resolver4.dns.openinternet.io`,endpoint:{protocol:`https:`,host:`resolver4.dns.openinternet.io`},description:`ODoH target server. no logs, no filter, DNSSEC.
74
+ Running on dedicated hardware colocated at Sonic.net in Santa Rosa, CA in the United States.
75
+ Uses Sonic's recusrive DNS servers as upstream resolvers (but is not affiliated with Sonic
76
+ in any way). Provided by https://openinternet.io`},{name:`odoh-tiarap.org`,endpoint:{protocol:`https:`,host:`doh.tiarap.org`,path:`/odoh`},description:`ODoH target server via Cloudflare, no logs.
77
+ Filter ads, trackers and malware.`,filter:!0},{name:`publicarray-au2-doh`,endpoint:{protocol:`https:`,host:`doh-2.seby.io`,cors:!0},description:`DNSSEC • OpenNIC • Non-logging • Uncensored - hosted on ovh.com.au
78
+ Maintained by publicarray - https://dns.seby.io`,country:`Australia`,location:{lat:-33.8591,long:151.2002},cors:!0},{name:`puredns-doh`,endpoint:{protocol:`https:`,host:`puredns.org`,ipv4:`146.190.6.13`,cors:!0},description:`Public uncensored DNS resolver in Singapore - https://puredns.org
79
+ ** Only available in Indonesia and Singapore **`,country:`United States`,location:{lat:37.751,long:-97.822},cors:!0},{name:`quad101`,endpoint:{protocol:`https:`,host:`dns.twnic.tw`,cors:!0},description:`DNSSEC-aware public resolver by the Taiwan Network Information Center (TWNIC)
80
+ https://101.101.101.101/index_en.html`,cors:!0},{name:`quad9-doh-ip4-port443-filter-ecs-pri`,endpoint:{protocol:`https:`,host:`dns11.quad9.net`,ipv4:`149.112.112.11`},description:`Quad9 (anycast) dnssec/no-log/filter/ecs 9.9.9.11 - 149.112.112.11`,country:`United States`,location:{lat:37.751,long:-97.822},filter:!0},{name:`quad9-doh-ip4-port443-filter-pri`,endpoint:{protocol:`https:`,host:`dns.quad9.net`,ipv4:`149.112.112.112`},description:`Quad9 (anycast) dnssec/no-log/filter 9.9.9.9 - 149.112.112.9 - 149.112.112.112`,country:`United States`,location:{lat:37.751,long:-97.822},filter:!0},{name:`quad9-doh-ip4-port443-nofilter-ecs-pri`,endpoint:{protocol:`https:`,host:`dns12.quad9.net`,ipv4:`9.9.9.12`},description:`Quad9 (anycast) no-dnssec/no-log/no-filter/ecs 9.9.9.12 - 149.112.112.12`,country:`United States`,location:{lat:37.751,long:-97.822}},{name:`quad9-doh-ip4-port443-nofilter-pri`,endpoint:{protocol:`https:`,host:`dns10.quad9.net`,ipv4:`149.112.112.10`},description:`Quad9 (anycast) no-dnssec/no-log/no-filter 9.9.9.10 - 149.112.112.10`,country:`United States`,location:{lat:37.751,long:-97.822}},{name:`quad9-doh-ip6-port5053-filter-pri`,endpoint:{protocol:`https:`,host:`dns9.quad9.net`},description:`Quad9 (anycast) dnssec/no-log/filter 2620:fe::fe - 2620:fe::9 - 2620:fe::fe:9`,country:`United States`,location:{lat:37.751,long:-97.822},filter:!0},{name:`safesurfer-doh`,endpoint:{protocol:`https:`,host:`doh.safesurfer.io`},description:`Family safety focused blocklist for over 2 million adult sites, as well as phishing and malware and more.
81
+ Free to use, paid for customizing blocking for more categories+sites and viewing usage at my.safesurfer.io. Logs taken for viewing
82
+ usage, data never sold - https://safesurfer.io`,filter:!0,log:!0},{name:`sth-ads-doh-se`,endpoint:{protocol:`https:`,host:`dnsse-noads.alekberg.net`},description:`Resolver in Stockholm, Sweden. DoH server. Non-logging, remove ads and malware, DNSSEC.`,country:`Bulgaria`,location:{lat:42.696,long:23.332},filter:!0},{name:`sth-doh-se`,endpoint:{protocol:`https:`,host:`dnsse.alekberg.net`},description:`Resolver in Stockholm, Sweden. DoH server. Non-logging, non-filtering, DNSSEC.`,country:`Bulgaria`,location:{lat:42.696,long:23.332}},{name:`switch`,endpoint:{protocol:`https:`,host:`dns.switch.ch`},description:`Public DoH service provided by SWITCH in Switzerland
83
+ https://www.switch.ch
84
+ Provides protection against malware, but does not block ads.`,filter:!0},{name:`uncensoreddns-dk-ipv4`,endpoint:{protocol:`https:`,host:`unicast.uncensoreddns.org`},description:`Also known as censurfridns.
85
+ DoH, no logs, no filter, DNSSEC, unicast hosted in Denmark - https://blog.uncensoreddns.org`,country:`Denmark`,location:{lat:55.7123,long:12.0564}},{name:`uncensoreddns-ipv4`,endpoint:{protocol:`https:`,host:`anycast.uncensoreddns.org`},description:`Also known as censurfridns.
86
+ DoH, no logs, no filter, DNSSEC, anycast - https://blog.uncensoreddns.org`,country:`Denmark`,location:{lat:55.7123,long:12.0564}},{name:`v.dnscrypt.uk-doh-ipv4`,endpoint:{protocol:`https:`,host:`v.dnscrypt.uk`},description:`DoH, no logs, uncensored, DNSSEC. Hosted in London UK on Digital Ocean
87
+ https://www.dnscrypt.uk`,country:`United Kingdom`,location:{lat:51.4964,long:-.1224}}],time:1654187067783};function at(e){let t=e.time===null||e.time===void 0?Date.now():e.time,n=rt(e.data.map(e=>(e.endpoint=Qe(Object.assign({name:e.name},e.endpoint)),e))),r=n.map(e=>e.endpoint);return{data:{resolvers:n,resolverByName:n.reduce((e,t)=>(e[t.name]=t,e),{}),endpoints:r,endpointByName:r.reduce((e,t)=>(e[t.name]=t,e),{})},time:t}}var ot=at(it),st=new Ne(`https://martinheidegger.github.io/dns-query/resolvers.json`);function ct(e){return/^@/.test(e)}new class{constructor(e){this.opts=Object.assign({timeout:5e3,update:!0,updateURL:st,persist:!1,localStoragePrefix:`dnsquery_`,maxAge:3e5},e),this._dataP=null}_data(e,t){return!e&&this._dataP!==null?this._dataP.then(e=>e.time<Date.now()-this.opts.maxAge?this._data(!0,e):e):(this._dataP=this.opts.update?tt(this.opts.updateURL,this.opts.persist?{name:`resolvers.json`,localStoragePrefix:this.opts.localStoragePrefix,maxTime:Date.now()-this.opts.maxAge}:null,this.opts.timeout).then(e=>at({data:e.data.resolvers,time:e.time})).catch(()=>t||ot):Promise.resolve(ot),this._dataP)}data(){return this._data(!1).then(e=>e.data)}endpoints(e){if(e==null)return this.data().then(e=>e.endpoints);if(e===`doh`&&(e=lt),e===`dns`&&(e=ut),typeof e==`function`)return this.data().then(t=>t.endpoints.filter(e));if(typeof e==`string`||typeof e[Symbol.iterator]!=`function`)return Promise.reject(Error(`Endpoints (${e}) needs to be iterable (array).`));if(e=Array.from(e).filter(Boolean),e.findIndex(ct)===-1)try{return Promise.resolve(e.map(Qe))}catch(e){return Promise.reject(e)}return this.data().then(t=>e.map(e=>{if(ct(e)){let n=t.endpointByName[e.substring(1)];if(!n)throw Error(`Endpoint ${e} is not known.`);return n}return Qe(e)}))}};function lt(e){return e.protocol===`https:`||e.protocol===`http:`}function ut(e){return e.protocol===`udp4:`||e.protocol===`udp6:`}var $={name:`AES-GCM`,length:256,tagLength:128,ivLength:12,key:`Hello, World!`},dt=new TextEncoder,ft=new TextDecoder,pt;function mt(){return pt||=crypto.subtle.digest(`SHA-256`,dt.encode($.key)).then(e=>crypto.subtle.importKey(`raw`,e,{name:$.name},!1,[`encrypt`,`decrypt`])),pt}function ht(e){return Array.from(e,e=>e.toString(16).padStart(2,`0`)).join(``)}function gt(e){if(e.length%2!=0)throw Error(`Invalid ciphertext`);let t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){let r=Number.parseInt(e.slice(n*2,n*2+2),16);if(Number.isNaN(r))throw Error(`Invalid ciphertext`);t[n]=r}return t}async function _t(e){let t=crypto.getRandomValues(new Uint8Array($.ivLength)),n=await crypto.subtle.encrypt({name:$.name,iv:t,tagLength:$.tagLength},await mt(),dt.encode(e)),r=new Uint8Array($.ivLength+n.byteLength);return r.set(t),r.set(new Uint8Array(n),$.ivLength),ht(r)}async function vt(e){let t=gt(e);if(t.length<=$.ivLength)throw Error(`Invalid ciphertext`);let n=await crypto.subtle.decrypt({name:$.name,iv:t.slice(0,$.ivLength),tagLength:$.tagLength},await mt(),t.slice($.ivLength));return ft.decode(n)}(async()=>{let e=await _t(`Fizz Buzz`);console.log(`Encrypted:`,e);let t=await vt(e);console.log(`Decrypted:`,t)})()});