proxy-rotator-js 1.0.7 → 1.0.8

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Proxy.js +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proxy-rotator-js",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "type": "module",
5
5
  "description": "Proxy Rotator",
6
6
  "main": "index.js",
package/src/Proxy.js CHANGED
@@ -4,10 +4,12 @@ class Proxy {
4
4
  if( proxy.includes('://') ){
5
5
  this.protocol = proxy.split('://')[0];
6
6
  this.ip = proxy.split('://')[1].split(':')[0];
7
+ this.host = this.ip;
7
8
  this.port = proxy.split('://')[1].split(':')[1];
8
9
  } else { // if proxy string does not start with protocol
9
10
  this.protocol = protocol;
10
11
  this.ip = proxy.split(':')[0];
12
+ this.host = this.ip;
11
13
  this.port = proxy.split(':')[1];
12
14
  }
13
15
  // the proxy
@@ -28,6 +30,7 @@ class Proxy {
28
30
  return {
29
31
  protocol: this.protocol,
30
32
  ip: this.ip,
33
+ host: this.host,
31
34
  port: this.port,
32
35
  };
33
36
  }
@@ -36,6 +39,7 @@ class Proxy {
36
39
  return {
37
40
  protocol: this.protocol,
38
41
  ip: this.ip,
42
+ host: this.host,
39
43
  port: this.port,
40
44
  status: this.status,
41
45
  changeTimeStamp: this.changeTimeStamp