@k03mad/dns-leak 3.1.0 → 3.2.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/README.md +2 -1
- package/app/api/Wander.js +49 -0
- package/app/api/_index.js +1 -0
- package/app/run.js +12 -2
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -4,7 +4,8 @@ Using API/tools:\
|
|
|
4
4
|
— [ipleak.net](https://airvpn.org/forums/topic/14737-api)\
|
|
5
5
|
— [ipwhois.io](https://ipwhois.io/documentation)\
|
|
6
6
|
— [cloudping.cloud](https://www.cloudping.cloud/cdn)\
|
|
7
|
-
— [nextdns.io](https://test.nextdns.io
|
|
7
|
+
— [nextdns.io](https://test.nextdns.io)\
|
|
8
|
+
— [wander.science](https://wander.science/projects/dns/dnssec-resolver-test)
|
|
8
9
|
|
|
9
10
|
## Global
|
|
10
11
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {request} from '@k03mad/request';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
|
|
4
|
+
const {green, red, yellow} = chalk;
|
|
5
|
+
|
|
6
|
+
/** */
|
|
7
|
+
export default class Wander {
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @param {object} [opts]
|
|
11
|
+
* @param {number} [opts.requestsRps] parallel requests rps
|
|
12
|
+
*/
|
|
13
|
+
constructor({
|
|
14
|
+
requestsRps = 2,
|
|
15
|
+
} = {}) {
|
|
16
|
+
this._requestsRps = requestsRps;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** */
|
|
20
|
+
get _endpoints() {
|
|
21
|
+
return {
|
|
22
|
+
|
|
23
|
+
/** */
|
|
24
|
+
sigfail: () => 'https://sigfail.rsa2048-sha256.ippacket.stream/noerror.png',
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @returns {Promise<object>}
|
|
30
|
+
*/
|
|
31
|
+
async checkDNSSEC() {
|
|
32
|
+
const testEndpoint = this._endpoints.sigfail();
|
|
33
|
+
|
|
34
|
+
try {
|
|
35
|
+
await request(testEndpoint, {}, {
|
|
36
|
+
rps: this._requestsRps,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
return {name: 'OFF', code: 0, color: red};
|
|
40
|
+
} catch (err) {
|
|
41
|
+
if (err.code === 'ESERVFAIL') {
|
|
42
|
+
return {name: 'ON', code: 1, color: green};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return {name: 'unknown', code: -1, color: yellow};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
}
|
package/app/api/_index.js
CHANGED
package/app/run.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import {CloudPing, IPLeak, IPWhois, NextDNS, Wander} from './api/_index.js';
|
|
3
4
|
import {log} from './helpers/log.js';
|
|
4
5
|
import * as spinner from './helpers/spinner.js';
|
|
5
6
|
import {formatIpInfo, formatLocationInfo, header} from './helpers/text.js';
|
|
@@ -8,12 +9,14 @@ const LeakApi = new IPLeak();
|
|
|
8
9
|
const NextApi = new NextDNS();
|
|
9
10
|
const WhoisApi = new IPWhois();
|
|
10
11
|
const CloudPingApi = new CloudPing();
|
|
12
|
+
const WanderApi = new Wander();
|
|
11
13
|
|
|
12
|
-
const [leak, next, whois, location] = await Promise.allSettled([
|
|
14
|
+
const [leak, next, whois, location, dnssec] = await Promise.allSettled([
|
|
13
15
|
LeakApi.getDnsInfoMulti({isSpinnerEnabled: true}),
|
|
14
16
|
NextApi.getTest(),
|
|
15
17
|
WhoisApi.getIpInfo(),
|
|
16
18
|
CloudPingApi.getCurrentLocation(),
|
|
19
|
+
WanderApi.checkDNSSEC(),
|
|
17
20
|
]);
|
|
18
21
|
|
|
19
22
|
const spinnerName = 'IP info';
|
|
@@ -67,6 +70,13 @@ if (next.value?.ecs) {
|
|
|
67
70
|
} catch {}
|
|
68
71
|
}
|
|
69
72
|
|
|
73
|
+
if (dnssec.value?.name) {
|
|
74
|
+
output.push(
|
|
75
|
+
header('DNSSEC'),
|
|
76
|
+
dnssec.value.color(dnssec.value.name),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
70
80
|
if (location.value) {
|
|
71
81
|
output.push(
|
|
72
82
|
header('CLOUDFRONT CDN'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k03mad/dns-leak",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "DNS leak test",
|
|
5
5
|
"maintainers": [
|
|
6
6
|
"Kirill Molchanov <k03.mad@gmail.com"
|
|
@@ -14,20 +14,21 @@
|
|
|
14
14
|
"node": ">=20"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@k03mad/request": "
|
|
17
|
+
"@k03mad/request": "4.0.0",
|
|
18
18
|
"chalk": "5.3.0",
|
|
19
19
|
"country-locale-map": "1.8.15",
|
|
20
|
-
"nanoid": "5.0.
|
|
20
|
+
"nanoid": "5.0.4",
|
|
21
21
|
"nanoid-dictionary": "5.0.0-beta.1",
|
|
22
22
|
"ora": "7.0.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@k03mad/eslint-config": "
|
|
25
|
+
"@k03mad/eslint-config": "14.8.0",
|
|
26
26
|
"@microsoft/eslint-formatter-sarif": "3.0.0",
|
|
27
|
-
"eslint": "
|
|
27
|
+
"@stylistic/eslint-plugin": "1.4.1",
|
|
28
|
+
"eslint": "8.55.0",
|
|
28
29
|
"eslint-plugin-import": "2.29.0",
|
|
29
|
-
"eslint-plugin-jsdoc": "46.
|
|
30
|
-
"eslint-plugin-n": "16.
|
|
30
|
+
"eslint-plugin-jsdoc": "46.9.0",
|
|
31
|
+
"eslint-plugin-n": "16.3.1",
|
|
31
32
|
"eslint-plugin-simple-import-sort": "10.0.0",
|
|
32
33
|
"eslint-plugin-sort-destructure-keys": "1.5.0",
|
|
33
34
|
"eslint-plugin-unicorn": "49.0.0",
|