@k03mad/dns-leak 3.7.0 → 4.1.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/app/api/_index.js CHANGED
@@ -1,5 +1,5 @@
1
- export {default as CloudPing} from './CloudPing.js';
2
- export {default as IPLeak} from './IPLeak.js';
3
- export {default as IPWhois} from './IPWhois.js';
4
- export {default as NextDNS} from './NextDNS.js';
5
- export {default as Wander} from './Wander.js';
1
+ export {default as CloudPing} from './cloud-ping.js';
2
+ export {default as IPLeak} from './ip-leak.js';
3
+ export {default as IPWhois} from './ip-whois.js';
4
+ export {default as NextDNS} from './next-dns.js';
5
+ export {default as Wander} from './wander.js';
@@ -14,7 +14,7 @@ export default class CloudPing {
14
14
  }
15
15
 
16
16
  /** */
17
- get _endpoints() {
17
+ static get endpoints() {
18
18
  return {
19
19
 
20
20
  /** */
@@ -29,7 +29,7 @@ export default class CloudPing {
29
29
  * @returns {Promise<string>}
30
30
  */
31
31
  async getCurrentIataCode() {
32
- const testEndpoint = this._endpoints.edge();
32
+ const testEndpoint = CloudPing.endpoints.edge();
33
33
 
34
34
  const {headers} = await request(testEndpoint, {}, {
35
35
  rps: this._requestsRps,
@@ -42,7 +42,7 @@ export default class CloudPing {
42
42
  * @returns {Promise<object>}
43
43
  */
44
44
  async getAllLocations() {
45
- const locationsEndpoint = this._endpoints.locations();
45
+ const locationsEndpoint = CloudPing.endpoints.locations();
46
46
 
47
47
  const {body} = await request(locationsEndpoint, {}, {
48
48
  rps: this._requestsRps,
@@ -34,7 +34,7 @@ export default class IPLeak {
34
34
  }
35
35
 
36
36
  /** */
37
- get _endpoints() {
37
+ static get endpoints() {
38
38
  return {
39
39
 
40
40
  /** @param {string} ip */
@@ -64,7 +64,7 @@ export default class IPLeak {
64
64
  * @returns {Promise<object>}
65
65
  */
66
66
  async getIpInfo({ip = ''} = {}) {
67
- const ipEndpoint = this._endpoints.ip(ip);
67
+ const ipEndpoint = IPLeak.endpoints.ip(ip);
68
68
 
69
69
  const {body} = await requestCache(ipEndpoint, {}, {
70
70
  expire: this._ipRequestsCacheExpireMs,
@@ -81,7 +81,7 @@ export default class IPLeak {
81
81
  * @returns {Promise<object>}
82
82
  */
83
83
  async getDnsInfoOnce({session = this._dnsSessionString, uniqString = this._dnsUniqString} = {}) {
84
- const dnsEndpoint = this._endpoints.dns(session, uniqString);
84
+ const dnsEndpoint = IPLeak.endpoints.dns(session, uniqString);
85
85
 
86
86
  const {body} = await request(dnsEndpoint, {}, {
87
87
  queueBy: session,
@@ -17,7 +17,7 @@ export default class IPWhois {
17
17
  }
18
18
 
19
19
  /** */
20
- get _endpoints() {
20
+ static get endpoints() {
21
21
  return {
22
22
 
23
23
  /** @param {string} ip */
@@ -31,7 +31,7 @@ export default class IPWhois {
31
31
  * @returns {Promise<object>}
32
32
  */
33
33
  async getIpInfo({ip = ''} = {}) {
34
- const ipEndpoint = this._endpoints.ip(ip);
34
+ const ipEndpoint = IPWhois.endpoints.ip(ip);
35
35
 
36
36
  const {body} = await requestCache(ipEndpoint, {}, {
37
37
  expire: this._ipRequestsCacheExpireMs,
@@ -14,7 +14,7 @@ export default class NextDNS {
14
14
  }
15
15
 
16
16
  /** */
17
- get _endpoints() {
17
+ static get endpoints() {
18
18
  return {
19
19
 
20
20
  /** */
@@ -26,7 +26,7 @@ export default class NextDNS {
26
26
  * @returns {Promise<object>}
27
27
  */
28
28
  async getTest() {
29
- const testEndpoint = this._endpoints.test();
29
+ const testEndpoint = NextDNS.endpoints.test();
30
30
 
31
31
  const {body} = await request(testEndpoint, {}, {
32
32
  rps: this._requestsRps,
@@ -17,7 +17,7 @@ export default class Wander {
17
17
  }
18
18
 
19
19
  /** */
20
- get _endpoints() {
20
+ static get endpoints() {
21
21
  return {
22
22
 
23
23
  /** */
@@ -29,7 +29,7 @@ export default class Wander {
29
29
  * @returns {Promise<object>}
30
30
  */
31
31
  async checkDNSSEC() {
32
- const testEndpoint = this._endpoints.sigfail();
32
+ const testEndpoint = Wander.endpoints.sigfail();
33
33
 
34
34
  try {
35
35
  await request(testEndpoint, {}, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k03mad/dns-leak",
3
- "version": "3.7.0",
3
+ "version": "4.1.0",
4
4
  "description": "DNS leak test",
5
5
  "maintainers": [
6
6
  "Kirill Molchanov <k03.mad@gmail.com"
@@ -14,7 +14,7 @@
14
14
  "node": ">=20"
15
15
  },
16
16
  "dependencies": {
17
- "@k03mad/request": "4.5.0",
17
+ "@k03mad/request": "5.1.0",
18
18
  "chalk": "5.3.0",
19
19
  "country-locale-map": "1.9.0",
20
20
  "nanoid": "5.0.4",
@@ -22,7 +22,7 @@
22
22
  "ora": "8.0.1"
23
23
  },
24
24
  "devDependencies": {
25
- "@k03mad/eslint-config": "16.8.0",
25
+ "@k03mad/eslint-config": "17.11.0",
26
26
  "eslint": "8.56.0",
27
27
  "husky": "8.0.3"
28
28
  },