Socket
Socket
Sign inDemoInstall

@applitools/eg-socks5-proxy-server

Package Overview
Dependencies
10
Maintainers
34
Versions
45
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.0 to 0.5.1

6

lib/index.js

@@ -40,3 +40,3 @@ "use strict";

const net_1 = __importDefault(require("net"));
const private_ip_1 = __importDefault(require("private-ip"));
const is_localhost_ip_1 = __importDefault(require("is-localhost-ip"));
const _alwaysTrue = (data) => true;

@@ -142,3 +142,3 @@ /**

port: socket.remotePort,
}, connectionFilterDomain.intercept(() => {
}, connectionFilterDomain.intercept(async () => {
var _a;

@@ -154,3 +154,3 @@ const destinationInfo = {

if (self.options.shouldBlockPrivateAddresses &&
(0, private_ip_1.default)(destinationInfo.address)) {
(await (0, is_localhost_ip_1.default)(destinationInfo.address))) {
self.server.emit(EVENTS.PRIVATE_ADDRESS_WAS_BLOCKED, {

@@ -157,0 +157,0 @@ destinationInfo,

{
"name": "@applitools/eg-socks5-proxy-server",
"version": "0.5.0",
"version": "0.5.1",
"description": "",

@@ -17,3 +17,3 @@ "main": "lib/index.js",

"test": "npm run eslint && npm run test:mocha-parallel",
"test:mocha": "ts-mocha --exit -p tsconfig.json 'test/it/*.test.ts'",
"test:mocha": "ts-mocha --timeout 10000 --exit -p tsconfig.json 'test/it/*.test.ts'",
"eslint": "eslint '**/*.js'",

@@ -36,2 +36,3 @@ "build": "tsc"

"binary": "^0.3.0",
"is-localhost-ip": "^2.0.0",
"private-ip": "^2.3.4"

@@ -38,0 +39,0 @@ },

@@ -22,3 +22,3 @@ import {

import net, {Socket} from 'net'
import isIpPrivate from 'private-ip'
import isLocalhostIp from 'is-localhost-ip'

@@ -139,3 +139,3 @@ import {ISocksServer, ProxyServers, SetProxyServerOptions, Socks5ProxyOptions} from '../types'

},
connectionFilterDomain.intercept(() => {
connectionFilterDomain.intercept(async () => {
const destinationInfo: AddressInfo = {

@@ -153,3 +153,3 @@ address: args.dst.addr,

self.options.shouldBlockPrivateAddresses &&
isIpPrivate(destinationInfo.address!)
(await isLocalhostIp(destinationInfo.address!))
) {

@@ -156,0 +156,0 @@ self.server.emit(EVENTS.PRIVATE_ADDRESS_WAS_BLOCKED, {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc