Skip to content

Commit

Permalink
deps: socks-proxy-agent@8.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Dec 12, 2024
1 parent 3b2951a commit d369c77
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
16 changes: 13 additions & 3 deletions node_modules/socks-proxy-agent/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,21 @@ const socks_1 = require("socks");
const agent_base_1 = require("agent-base");
const debug_1 = __importDefault(require("debug"));
const dns = __importStar(require("dns"));
const net = __importStar(require("net"));
const tls = __importStar(require("tls"));
const url_1 = require("url");
const debug = (0, debug_1.default)('socks-proxy-agent');
const setServernameFromNonIpHost = (options) => {
if (options.servername === undefined &&
options.host &&
!net.isIP(options.host)) {
return {
...options,
servername: options.host,
};
}
return options;
};
function parseSocksURL(url) {
let lookup = false;
let type = 5;
Expand Down Expand Up @@ -149,11 +161,9 @@ class SocksProxyAgent extends agent_base_1.Agent {
// The proxy is connecting to a TLS server, so upgrade
// this socket connection to a TLS connection.
debug('Upgrading socket connection to TLS');
const servername = opts.servername || opts.host;
const tlsSocket = tls.connect({
...omit(opts, 'host', 'path', 'port'),
...omit(setServernameFromNonIpHost(opts), 'host', 'path', 'port'),
socket,
servername,
});
tlsSocket.once('error', (error) => {
debug('Socket TLS error', error.message);
Expand Down
4 changes: 2 additions & 2 deletions node_modules/socks-proxy-agent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "socks-proxy-agent",
"version": "8.0.4",
"version": "8.0.5",
"description": "A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -107,7 +107,7 @@
"socks5h"
],
"dependencies": {
"agent-base": "^7.1.1",
"agent-base": "^7.1.2",
"debug": "^4.3.4",
"socks": "^2.8.3"
},
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -14282,13 +14282,13 @@
}
},
"node_modules/socks-proxy-agent": {
"version": "8.0.4",
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz",
"integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==",
"version": "8.0.5",
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz",
"integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==",
"inBundle": true,
"license": "MIT",
"dependencies": {
"agent-base": "^7.1.1",
"agent-base": "^7.1.2",
"debug": "^4.3.4",
"socks": "^2.8.3"
},
Expand Down

0 comments on commit d369c77

Please sign in to comment.