metarhia / impress

Enterprise application server for Node.js and Metarhia private cloud ⚡
https://metarhia.com
MIT License
969 stars 129 forks source link

JSTP ignores address and always listens to all interfaces #740

Closed dmitrystas closed 5 years ago

dmitrystas commented 7 years ago

Server with protocol 'jstp' ignores the setting 'address' and always listens to all interfaces.

For example, in \config\servers.js we have

master: { protocol: 'jstp', transport: 'tcp', address: '127.0.0.1', ports: [250], slowTime: '1s' },

but after start port 250 is open not only on the local interface.

It`s happens because when we creating server we does not specify the host. For examle in \node_modules\metarhia-jstp\lib\transport.socket.js we have only this.port

this.server.listen(this.port, callback);

and no hostname or ip

tshemsedinov commented 7 years ago

@aqrln please check this

aqrln commented 7 years ago

@dmitrystas yeah, that's a known issue which will be fixed in the upcoming release of metarhia/jstp as a part of https://github.com/metarhia/jstp/pull/209. If you need a quick fix, I think we can make a patch for v0.6 too. Thanks for reporting it!

tshemsedinov commented 5 years ago

@belochub please review this to close or reassign