From 608aace286bc62b327954d369023412c40e8e83d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 2 Aug 2023 16:37:21 -0400 Subject: [PATCH] fix: pass remoteAddress and remotePort as part of socket options --- src/proxies/multiSocket.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/proxies/multiSocket.ts b/src/proxies/multiSocket.ts index d0b0ff0..eb63ffb 100644 --- a/src/proxies/multiSocket.ts +++ b/src/proxies/multiSocket.ts @@ -190,7 +190,10 @@ export default class MultiSocketProxy extends Proxy { const peer = this._nextPeer(); const socketId = nextSocketId(); - const socket = new this.socketClass(socketId, this, peer, options); + const socket = new this.socketClass(socketId, this, peer, options, { + remoteAddress: options.host, + remotePort: options.port, + }); this._sockets.set(socketId, socket); return socket;