@k03mad/dns-leak 6.0.0 → 7.0.0
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/LICENSE +1 -1
- package/README.md +4 -5
- package/app/run.js +2 -9
- package/package.json +4 -3
- package/app/helpers/log.js +0 -5
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
# DNS
|
|
1
|
+
# DNS-leak test
|
|
2
|
+
|
|
3
|
+
## Using API/tools
|
|
2
4
|
|
|
3
|
-
Using API/tools:\
|
|
4
5
|
— [ipleak.net](https://airvpn.org/forums/topic/14737-api)\
|
|
5
6
|
— [ipwhois.io](https://ipwhois.io/documentation)\
|
|
6
7
|
— [cloudping.cloud](https://www.cloudping.cloud/cdn)\
|
|
7
8
|
— [nextdns.io](https://test.nextdns.io)\
|
|
8
9
|
— [wander.science](https://wander.science/projects/dns/dnssec-resolver-test)
|
|
9
10
|
|
|
10
|
-
##
|
|
11
|
+
## Use
|
|
11
12
|
|
|
12
13
|
```bash
|
|
13
14
|
npm i @k03mad/dns-leak -g
|
|
14
|
-
```
|
|
15
15
|
|
|
16
|
-
```bash
|
|
17
16
|
dns-leak
|
|
18
17
|
```
|
package/app/run.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import {ip2geo} from '@k03mad/ip2geo';
|
|
4
|
+
import {log} from '@k03mad/simple-log';
|
|
4
5
|
|
|
5
6
|
import {CloudPing, IPLeak, NextDNS, Wander} from './api/_index.js';
|
|
6
|
-
import {log} from './helpers/log.js';
|
|
7
|
-
import * as spinner from './helpers/spinner.js';
|
|
8
7
|
import {formatIpInfo, formatLocationInfo, header} from './helpers/text.js';
|
|
9
8
|
|
|
10
9
|
const LeakApi = new IPLeak();
|
|
@@ -20,9 +19,6 @@ const [leak, next, geoip, location, dnssec] = await Promise.allSettled([
|
|
|
20
19
|
WanderApi.checkDNSSEC(),
|
|
21
20
|
]);
|
|
22
21
|
|
|
23
|
-
const spinnerName = 'IP info';
|
|
24
|
-
spinner.start(spinnerName, true);
|
|
25
|
-
|
|
26
22
|
const dnsIps = [
|
|
27
23
|
...new Set([
|
|
28
24
|
...Object.keys(leak.value?.ip || []),
|
|
@@ -32,9 +28,7 @@ const dnsIps = [
|
|
|
32
28
|
|
|
33
29
|
const dnsIpsInfo = await Promise.all(dnsIps.map(async ip => {
|
|
34
30
|
try {
|
|
35
|
-
|
|
36
|
-
spinner.count(spinnerName, dnsIps.length);
|
|
37
|
-
return data;
|
|
31
|
+
return await ip2geo(ip);
|
|
38
32
|
} catch {}
|
|
39
33
|
}));
|
|
40
34
|
|
|
@@ -85,5 +79,4 @@ if (location.value) {
|
|
|
85
79
|
);
|
|
86
80
|
}
|
|
87
81
|
|
|
88
|
-
spinner.stop(spinnerName);
|
|
89
82
|
log(`\n${output.join('\n\n')}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k03mad/dns-leak",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "DNS leak test",
|
|
5
5
|
"maintainers": [
|
|
6
6
|
"Kirill Molchanov <k03.mad@gmail.com"
|
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
"node": ">=20"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@k03mad/ip2geo": "
|
|
21
|
+
"@k03mad/ip2geo": "3.0.0",
|
|
22
22
|
"@k03mad/request": "5.4.1",
|
|
23
|
+
"@k03mad/simple-log": "2.1.0",
|
|
23
24
|
"chalk": "5.3.0",
|
|
24
25
|
"country-locale-map": "1.9.0",
|
|
25
26
|
"nanoid": "5.0.4",
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
"ora": "8.0.1"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
|
-
"@k03mad/eslint-config": "19.
|
|
31
|
+
"@k03mad/eslint-config": "19.3.0",
|
|
31
32
|
"eslint": "8.56.0",
|
|
32
33
|
"husky": "8.0.3"
|
|
33
34
|
},
|