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

@applitools/eg-socks5-proxy-server

Package Overview
Dependencies
Maintainers
30
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/eg-socks5-proxy-server - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

package.json
{
"name": "@applitools/eg-socks5-proxy-server",
"version": "0.1.0",
"version": "0.1.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -15,6 +15,6 @@ const net = require('net')

function createRequestExecuter({originalSocket, proxyServer, args, clientHandshakeBuffer}) {
const host = proxyServer ? proxyServer.host : args.dst.addr
const address = proxyServer ? proxyServer.host : args.dst.addr
const port = proxyServer ? proxyServer.port : args.dst.port
const destination = net.createConnection(port, host, () => {
const destination = net.createConnection(port, address, () => {
// prepare a success response

@@ -32,2 +32,3 @@ let responseBuffer = Buffer.alloc(args.requestBuffer.length)

})
proxyServer.onHandShakeCompleted && proxyServer.onHandShakeCompleted()
})

@@ -66,5 +67,2 @@ })

destination.on('error', (err) => {
// exit the connection filter domain
//connectionFilterDomain.exit()
// notify of connection error

@@ -71,0 +69,0 @@ err.addr = args.dst.addr

@@ -32,6 +32,7 @@ const {

CONNECTED_TO_REMOTE_PROXY: 'connected-to-remote-proxy',
REMOTE_PROXY_HANDSHAKE_COMPLETED: 'remote-proxy-handshake-completed',
ORIGINAL_SOCKET_ERROR: 'orginal-socket-error',
DESTINATION_SOCKET_ERROR: 'destination-socket-error',
DESTINATION_TIMEOUT_CONNECTION_ERROR: 'destination-timeout-connection-error',
REMOTE_SOCKET_ERROR: 'remote-socket-error',
REMOTE_CONNECTION_TIMEOUT_ERROR: 'remote-connection-timeout-error',
},

@@ -263,2 +264,8 @@ LENGTH_RFC_1928_ATYP = 4

if (proxyServer){
proxyServer.onHandShakeCompleted = () => {
self.server.emit(EVENTS.REMOTE_PROXY_HANDSHAKE_COMPLETED, {originInfo, destinationInfo, proxyServer})
}
}
self.server.emit(EVENTS.ACCEPT_NEW_REQUEST, {

@@ -272,3 +279,3 @@ originInfo,

() =>
self.server.emit(EVENTS.DESTINATION_TIMEOUT_CONNECTION_ERROR, {
self.server.emit(EVENTS.REMOTE_CONNECTION_TIMEOUT_ERROR, {
originInfo,

@@ -304,2 +311,3 @@ destinationInfo,

})
const event = proxyServer

@@ -321,3 +329,3 @@ ? EVENTS.CONNECTED_TO_REMOTE_PROXY

self.server.emit(EVENTS.DESTINATION_SOCKET_ERROR, {
self.server.emit(EVENTS.REMOTE_SOCKET_ERROR, {
err,

@@ -324,0 +332,0 @@ destination,

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