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

https-proxied

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

https-proxied - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

28

lib/https-proxied.js

@@ -7,2 +7,3 @@ var tls = require('tls'),

http = require('http'),
HTTPParser = process.binding('http_parser').HTTPParser,
inherits = require('util').inherits;

@@ -14,3 +15,2 @@

var s;
if (options.proxy) {

@@ -97,3 +97,3 @@ s = clearTextSocket(port, host, options);

var parser = parsers.alloc(parser);
parser.reinitialize('response');
parser.reinitialize(HTTPParser.RESPONSE);
parser.socket = socket;

@@ -112,3 +112,3 @@ parser.incoming = null;

socket.ondata = function(data, start, end) {
var ret = parser.execute(data, start, end - start);
var ret = parser.execute(data, start, end - start);
if (ret instanceof Error) {

@@ -127,2 +127,3 @@ socket.destroy(ret);

parsers.free(parser);
parser = null;
if (cb) cb();

@@ -133,3 +134,6 @@ }

socket.on('close', function() {
parsers.free(parser);
if (parser) {
parsers.free(parser);
parser = null;
}
})

@@ -140,5 +144,8 @@

var globalAgent = new Agent();
// each proxy has a globalAgent
var globalAgents = {
null: new Agent()
};
exports.globalAgent = globalAgent;
exports.globalAgent = globalAgents[null];
exports.Agent = Agent;

@@ -152,3 +159,10 @@

if (options.agent === undefined) {
options.agent = globalAgent;
var key = options.proxy || null;
if (key && typeof(key) === 'object') {
key = url.format(key);
}
if (!globalAgents[key]) {
globalAgents[key] = new Agent({proxy: options.proxy});
}
options.agent = globalAgents[key];
}

@@ -155,0 +169,0 @@ options.createConnection = createConnection;

{
"name": "https-proxied",
"version": "0.0.4",
"version": "0.0.5",
"description": "A https client that works with SSL proxies",

@@ -5,0 +5,0 @@ "engines": { "node": ">=0.6.0" },

Sorry, the diff of this file is not supported yet

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