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

under

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

under - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

test/headers_spec.js

4

benchmark.js
var needle = require('needle');
require('http').globalAgent.maxSockets = 500;
// var opts = { agent: agent };

@@ -8,4 +7,5 @@ var opts = { timeout: 0 };

var url = process.argv[2] || (console.log('Usage: [host] [count]') || process.exit(1));
var url = process.argv[2] || (console.log('Usage: [host] [url] [concurrency]') || process.exit(1));
var count = process.argv[3] || 1000;
require('http').globalAgent.maxSockets = process.argv[4] || 100;

@@ -12,0 +12,0 @@ var done = function() {

@@ -80,5 +80,5 @@ /*

var removed = remove_matching(defaults.backends, target);
if (removed.length == defaults.backends.length)
if (removed.length == defaults.backends.length)
return log('Unable to find matching backend.');
log('Flagging server in backend list!');

@@ -124,3 +124,3 @@ defaults.backends = removed;

var target = opts.backend || defaults.backend || get_target(opts.backends),
backend_name = (defaults.sign || opts.sign) === true ? get_backend_name(target) : null;
backend_name = opts.sign === true ? get_backend_name(target) : null;

@@ -142,9 +142,9 @@ var should_timeout = !is_socket_request(req),

var connection_data = {
'For' : req.connection.remoteAddress || req.socket.remoteAddress,
'Port' : req.connection.remotePort || req.socket.remotePort,
'Proto' : req.secure ? 'https' : 'http'
'for' : req.connection.remoteAddress || req.socket.remoteAddress,
'port' : req.connection.remotePort || req.socket.remotePort,
'proto' : req.secure ? 'https' : 'http'
}
for (var key in connection_data) {
var name = 'X-Forwarded-' + key;
var name = 'x-forwarded-' + key;
if (request_opts.headers[name])

@@ -151,0 +151,0 @@ request_opts.headers[name] += ', ' + connection_data[key];

{
"name": "under",
"version": "0.1.3",
"version": "0.1.4",
"description": "Fast reverse HTTP proxy with load balancing and queue support.",

@@ -5,0 +5,0 @@ "main": "index.js",

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