tangerine 1.0.0 → 1.0.1
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/index.js +12 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -502,7 +502,9 @@ class Resolver extends dns.promises.Resolver {
|
|
|
502
502
|
|
|
503
503
|
case dns.V4MAPPED: {
|
|
504
504
|
if (options.family === 6 && !answers.some((answer) => isIPv6(answer)))
|
|
505
|
-
answers = answers.map((answer) =>
|
|
505
|
+
answers = answers.map((answer) =>
|
|
506
|
+
ipaddr.parse(answer).toIPv4MappedAddress().toString()
|
|
507
|
+
);
|
|
506
508
|
break;
|
|
507
509
|
}
|
|
508
510
|
|
|
@@ -515,14 +517,18 @@ class Resolver extends dns.promises.Resolver {
|
|
|
515
517
|
case dns.ADDRCONFIG | dns.V4MAPPED: {
|
|
516
518
|
options.family = this.constructor.getAddrConfigTypes();
|
|
517
519
|
if (options.family === 6 && !answers.some((answer) => isIPv6(answer)))
|
|
518
|
-
answers = answers.map((answer) =>
|
|
520
|
+
answers = answers.map((answer) =>
|
|
521
|
+
ipaddr.parse(answer).toIPv4MappedAddress().toString()
|
|
522
|
+
);
|
|
519
523
|
break;
|
|
520
524
|
}
|
|
521
525
|
|
|
522
526
|
// eslint-disable-next-line no-bitwise
|
|
523
527
|
case dns.V4MAPPED | dns.ALL: {
|
|
524
528
|
if (options.family === 6 && !answers.some((answer) => isIPv6(answer)))
|
|
525
|
-
answers = answers.map((answer) =>
|
|
529
|
+
answers = answers.map((answer) =>
|
|
530
|
+
ipaddr.parse(answer).toIPv4MappedAddress().toString()
|
|
531
|
+
);
|
|
526
532
|
options.all = true;
|
|
527
533
|
break;
|
|
528
534
|
}
|
|
@@ -531,7 +537,9 @@ class Resolver extends dns.promises.Resolver {
|
|
|
531
537
|
case dns.ADDRCONFIG | dns.V4MAPPED | dns.ALL: {
|
|
532
538
|
options.family = this.constructor.getAddrConfigTypes();
|
|
533
539
|
if (options.family === 6 && !answers.some((answer) => isIPv6(answer)))
|
|
534
|
-
answers = answers.map((answer) =>
|
|
540
|
+
answers = answers.map((answer) =>
|
|
541
|
+
ipaddr.parse(answer).toIPv4MappedAddress().toString()
|
|
542
|
+
);
|
|
535
543
|
options.all = true;
|
|
536
544
|
|
|
537
545
|
break;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tangerine",
|
|
3
3
|
"description": "Tangerine is the best Node.js drop-in replacement for dns.promises.Resolver using DNS over HTTPS (\"DoH\") via undici with built-in retries, timeouts, smart server rotation, AbortControllers, and caching support for multiple backends via Keyv.",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"author": "Forward Email (https://forwardemail.net)",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/forwardemail/tangerine/issues"
|