Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

proxy-rotator-agent

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxy-rotator-agent - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

20

index.js

@@ -24,17 +24,7 @@ 'use strict'

const proxyOptions = self.proxies[self.index === self.maxIndex ? self.index = 0 : ++self.index]
// console.log(proxyOptions)
let tunnelAgentInstance = self.tunnelAgentsMap.get(proxyOptions)
if (!tunnelAgentInstance) {
// console.log(options)
const reqProtocol = options.protocol || options.uri?.protocol || options._defaultAgent?.protocol;
const uriProtocol = (reqProtocol === 'https:' ? 'https' : 'http')
const proxyProtocol = (proxyOptions.proxy.protocol === 'https:' ? 'Https' : 'Http')
const key = `${uriProtocol}Over${proxyProtocol}`
// console.log(key, uriProtocol, proxyProtocol, proxyOptions)
tunnelAgentInstance = tunnelAgent[key](proxyOptions);
self.tunnelAgentsMap.set(proxyOptions, tunnelAgentInstance);
}
tunnelAgentInstance.on('free', (socket, host, port) => {
self.emit('free', socket, host, port);
});
const reqProtocol = options.protocol || options.uri?.protocol || options._defaultAgent?.protocol;
const uriProtocol = (reqProtocol === 'https:' ? 'https' : 'http')
const proxyProtocol = (proxyOptions.proxy.protocol === 'https:' ? 'Https' : 'Http')
const key = `${uriProtocol}Over${proxyProtocol}`
const tunnelAgentInstance = tunnelAgent[key](proxyOptions);
tunnelAgentInstance.addRequest(req, options);

@@ -41,0 +31,0 @@ }

@@ -6,3 +6,3 @@ {

"description": "HTTP proxy rotator tunneling agent",
"version": "0.0.7",
"version": "0.0.8",
"repository": {

@@ -9,0 +9,0 @@ "url": "https://github.com/fabiel-leon/proxy-rotator-agent"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc