New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

socks5-https-client

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socks5-https-client - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

31

lib/Agent.js

@@ -12,2 +12,3 @@ /**

var tls = require('tls');
var http = require('http');

@@ -17,3 +18,2 @@ var inherits = require('util').inherits;

var socksClient = require('socks5-client');
var starttls = require('starttls');

@@ -27,31 +27,10 @@ function createConnection(options) {

socksSocket.handleSocksConnectToHost = function() {
var verifyHost, securePair;
options.socket = socksSocket.socket;
options.servername = options.hostname;
if (options.rejectUnauthorized !== false) {
verifyHost = options.hostname;
}
securePair = starttls({
socket: socksSocket.socket,
host: verifyHost
}, function(err) {
var clearText;
// Add authorization properties to the client object as libraries like 'request' expect them there.
clearText = this.cleartext;
socksSocket.authorized = clearText.authorized;
socksSocket.authorizationError = clearText.authorizationError;
if (err) {
return socksSocket.emit('error', err);
}
socksSocket.socket = clearText;
socksSocket.socket = tls.connect(options, function() {
handleSocksConnectToHost.call(socksSocket);
});
// The Socks5ClientSocket constructor adds an 'error' event listener to the original socket.
// That behaviour needs to be mimicked by adding a similar listener to the cleartext stream, which replaces the original socket.
securePair.cleartext.on('error', function(err) {
socksSocket.socket.on('error', function(err) {
socksSocket.emit('error', err);

@@ -58,0 +37,0 @@ });

6

package.json
{
"name": "socks5-https-client",
"description": "SOCKS v5 HTTPS client.",
"version": "1.0.1",
"version": "1.1.0",
"main": "index.js",

@@ -23,4 +23,3 @@ "homepage": "https://github.com/mattcg/socks5-https-client",

"dependencies": {
"socks5-client": "~1.0.0",
"starttls": "~1.0.0"
"socks5-client": "~1.1.0"
},

@@ -37,3 +36,2 @@ "devDependencies": {

},
"engineStrict": true,
"licenses": [

@@ -40,0 +38,0 @@ {

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