puppyproxy 1.1.0 → 1.1.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 CHANGED
@@ -26,14 +26,16 @@ const config = {
26
26
  },
27
27
  scraper: {
28
28
  use: true,
29
- timeBetweenScrapes: 45 * 60e3,
29
+ timeBetweenScrapes: 45, // minutes
30
30
  maxProxiesToCheck: 5000, // the higher this is, the longer it takes, but the more proxies you get
31
31
  limitProxies: 500000,
32
- timeoutPerProxy: 5,
32
+ timeoutPerProxy: 15, // seconds
33
33
  timeoutMax: 5,
34
34
  verbose: true, // for logging purposes
35
35
  logStatus: true, // shows a convenient summary every so often
36
36
  proxyTypes: ['socks4', 'socks5'], //['socks4', 'socks5', 'http', 'https']
37
+ method: 'ws', // 'ws' or 'http'
38
+ wsUrl: wsUrl,
37
39
 
38
40
  timeoutFetch: 10000, // ms
39
41
  timeoutWs: 7000,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "puppyproxy",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Node.js library for managing, scraping, and using proxies with fetch and WebSocket support",
5
5
  "type": "module",
6
6
  "types": "./src/index.d.ts",
@@ -96,7 +96,7 @@ export default class Scraper {
96
96
  let lastSaved = (Date.now() - getLastSavedTimestamp(this.outputPath)) / 1000;
97
97
  if (lastSaved && !force) {
98
98
  console.log("lastSaved", lastSaved);
99
- let timeBetweenScrapes = this.config.scraper.timeBetweenScrapes * 60; // 25 mins
99
+ let timeBetweenScrapes = this.config.scraper.timeBetweenScrapes * 60e3; // 25 mins
100
100
  if (lastSaved < timeBetweenScrapes) {
101
101
  console.log(`Proxies saved < ${timeBetweenScrapes}s ago, skipping.`);
102
102
  return;