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

tunnel-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

tunnel-agent - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

.jshintrc

15

index.js

@@ -70,5 +70,14 @@ 'use strict'

TunnelingAgent.prototype.addRequest = function addRequest(req, host, port) {
TunnelingAgent.prototype.addRequest = function addRequest(req, options) {
var self = this
// Legacy API: addRequest(req, host, port, path)
if (typeof options === 'string') {
options = {
host: options,
port: arguments[2],
path: arguments[3]
};
}
if (self.sockets.length >= this.maxSockets) {

@@ -81,3 +90,3 @@ // We are over limit so we'll add it to the queue.

// If we are under maxSockets create a new one.
self.createSocket({host: host, port: port, request: req}, function(socket) {
self.createSocket({host: options.host, port: options.port, request: req}, function(socket) {
socket.on('free', onFree)

@@ -89,3 +98,3 @@ socket.on('close', onCloseOrRemove)

function onFree() {
self.emit('free', socket, host, port)
self.emit('free', socket, options.host, options.port)
}

@@ -92,0 +101,0 @@

2

package.json

@@ -5,3 +5,3 @@ {

"description": "HTTP proxy tunneling agent. Formerly part of mikeal/request, now a standalone module.",
"version": "0.3.0",
"version": "0.4.0",
"repository": {

@@ -8,0 +8,0 @@ "url": "https://github.com/mikeal/tunnel-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