If I am not mistaken, it will use the primary interface, or first or something - not sure how the decision is made - it may listen on all interfaces actually?
But behind the scenes it's using the net class, which has a listen method, that allows to specify the address (interface)
So is it possible - yes, just needs a Feature Request to expose the ablity
ok, good to know - I would have assumed only localhost but that makes absolutely no sense (when I think about it).
I find that weird that no one has wanted that feature - I mean it is really not unusual for servers to have multiple interfaces, basically every server has localhost and external interface but in that case binding to all interfaces makes no difference.
won't be that hard since everything is there - host configuration is only hidden if listen to is selected, so basically don't hide the input field! In fact, I can enter a host to connnect to, then switch to listen to and the host is still there in the configuration even if the field is hidden
on the other hand, I assume that if it's not been an issue in the past ten years, it ain't that important - unless you're like me and like to dissect nodes ...
EDIT: sorry forgot: thanks to both of you for the answers
I can’t check right now but you may be able to see where the incoming connection is coming from so even if all interfaces are allowed then you could filter if necessary. ( maybe )
I think that it would be reasonable to add an input to the node to allow restricting to a specific interface? Node-RED itself can be restricted via settings.js and it is good practice to only allow access on a specific interface.
exactly and that's why I asked whether that was possible with the tcp in node. I never thought of a global configuration for something that is relatively specific to the tcp in node.