Comparing version 0.1.3 to 0.1.4
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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
1
5
16130
11
500