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.1.3 to 1.2.0

2

index.js

@@ -24,2 +24,4 @@ /**

options.protocol = 'https:';
// Node v0.12.0 requires the port to be specified.

@@ -26,0 +28,0 @@ if (!options.port) {

17

lib/Agent.js

@@ -13,3 +13,3 @@ /**

var tls = require('tls');
var http = require('http');
var https = require('https');
var inherits = require('util').inherits;

@@ -20,8 +20,8 @@

function createConnection(options) {
var socksSocket, handleSocksConnectToHost;
var socksSocket, onProxied;
socksSocket = socksClient.createConnection(options);
handleSocksConnectToHost = socksSocket.handleSocksConnectToHost;
socksSocket.handleSocksConnectToHost = function() {
onProxied = socksSocket.onProxied;
socksSocket.onProxied = function() {
options.socket = socksSocket.socket;

@@ -34,3 +34,3 @@ options.servername = options.hostname || options.host;

socksSocket.authorized = socksSocket.socket.authorized;
handleSocksConnectToHost.call(socksSocket);
onProxied.call(socksSocket);
});

@@ -47,3 +47,3 @@

function Agent(options) {
http.Agent.call(this, options);
https.Agent.call(this, options);

@@ -53,10 +53,7 @@ this.socksHost = options.socksHost || 'localhost';

this.defaultPort = 443;
this.protocol = 'https:';
this.createConnection = createConnection;
}
inherits(Agent, http.Agent);
inherits(Agent, https.Agent);
module.exports = Agent;
{
"name": "socks5-https-client",
"description": "SOCKS v5 HTTPS client.",
"version": "1.1.3",
"version": "1.2.0",
"main": "index.js",

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

"dependencies": {
"socks5-client": "~1.1.0"
"socks5-client": "~1.2.3"
},
"devDependencies": {
"mocha": "~2.5.3",
"mocha": "~3.1.2",
"node-socks": "~0.1.0",

@@ -35,5 +35,5 @@ "request": "~2.72.0"

"engines": {
"node": ">= 0.10.0"
"node": ">= 6.4.0"
},
"license": "MIT"
}

@@ -24,2 +24,4 @@ # SOCKS5 HTTPS Client #

Username and password authentication is supported with the `socksUsername` and `socksPassword` options.
You may also pass a URL as the first argument to `get` or `request`, which will be parsed using `url.parse`.

@@ -26,0 +28,0 @@

@@ -21,5 +21,2 @@ /**

var version = process.version.substr(1).split('.');
var readableStreams = version[0] > 0 || version[1] > 8;
suite('socks5-https-client tests', function() {

@@ -66,6 +63,3 @@ var server;

req = https.request({
hostname: 'encrypted.google.com',
path: '/'
}, function(res, err) {
req = https.request('https://en.wikipedia.org/wiki/Main_Page', function(res, err) {
var data = '';

@@ -77,17 +71,6 @@

res.setEncoding('utf8');
res.on('readable', function() {
data += res.read();
});
if (readableStreams) {
// The new way, using the readable stream interface (Node >= 0.10.0):
res.on('readable', function() {
data += res.read();
});
} else {
// The old way, using 'data' listeners (Node <= 0.8.22):
res.on('data', function(chunk) {
data += chunk;
});
}
res.on('end', function() {

@@ -94,0 +77,0 @@ assert(-1 !== data.indexOf('<html'));

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