bind on IP does not work
fas3r opened this issue · comments
Hello,
I might misunderstand but I always see 127.0.0.1 with the port 9229 when using netstat -nltp
even when giving the appropriate options
to getServer
method of stream-node-ipc
, it's not possible to bind it to a different interface/port ?
Thanks
This should work as intended, options
just overrides any default value:
Could you share the config that you are using? I would test it to see if I can get the same behaviour.
Hello @magne4000 ,
Thanks for your feedback, indeed it should, I did something like that for the server :
const ipcServer = getServer('my-namespace', {
requestCert: false,
rejectUnauthorized:false,
interface: {
localAddress: '127.0.0.1',
localPort: 8888,
family: 4
}
});
I guess it should be enough.
Btw great repos
I just saw you had a typo, it's interfaces:
not interface:
. Nevertheless, I only created helpers for UNIX sockets (ipc.connect()
and ipc.server()
) and not net sockets (ipc.connectNet()
and ipc.serveNet()
).
You can easily implement your own helpers by copying and modifying the following functions in your own code
stream-json-rpc/packages/stream-node-ipc/src/index.ts
Lines 61 to 87 in 295bcaf
Hello @magne4000 ,
Yes sorry, I tought I updated the comment regarding the typo.
Yes I will do so, I just wanted to avoid modifications as you might make changes in the futures.
Feel free to close the ticket,
Thanks
Hello @magne4000 ,
Do you think it's something that you could implement ? Or maybe are you open to PR for that ?
Thanks
I'm open to PR for that ! 👍
@magne4000 you are amazing, thank you very much