-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add setting to disable tcp/udp server (inbound) #3931
base: dev
Are you sure you want to change the base?
Conversation
First thoughts: Do we want a flag for all possible options (tcp, udp, ....), or just one overall flag that can be easily shared across any nodes. E.g. we may want to disable the SMTP server option in the node-red-node-email at the same time. |
I would (personally) say no in that regard Ben. It can be valid for a provider/implementor to prohibit SNMP/SMTP but allow TCP/UDP for example. That said, if it was an overall/overriding flag (e.g "InhibitAllIncomingConnections") that we could later iterate to have additional (more scoped) flags then maybe - BUT - I do fear the insinuation would be someone sees "InhibitAllIncomingConnections" and thinks they are covered for all nodes (even contrib nodes). So I would probably edge towards specific node options. |
In principle, I'm mostly happy with these proposed changes, but would like @dceejay's view on it. To summarise:
|
Only thought so far... does it need to show red triangle error ? Is it really misconfigured if it is disabled ? - the status should be enough I think. (and of course that then begs the question from the user... "so how do I enable it ?" - so maybe the config panel needs some Tip text as well) |
@dceejay I removed validation red triangle. I will revisit this today, will check to see if I included the suggested info and convert draft to ready. |
Looks good to me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good here
fixes #3902
Types of changes
Proposed changes
As per issue #3902
TODO 2022/12/04
Notes and concerns... (updated 2022/12/04)
tcpInAllowInboundConnections
andudpInAllowInboundConnections
RED.nodes.registerType("tcp in",TCPin, { settings: {...} }
). However this forces the name of the setting to match the node e.g.tcpInSomething
ortcpOutSomething
. For now,tcpInAllowInboundConnections
was chosen but since it is used for the TCP In and TCP Out it looks a little odd asking users to settcpInAllowInboundConnections
for the TCP In and Out nodes?Alternative: map a nicer setting name through to editor programmaticallyUse 2 variablestcpInAllowInboundConnections
/tcpOutAllowInboundConnections
It may be better to NOT indicate a design time error since a specific installation may permit these nodes for "offline flow building" (for later export to a remote device)Alternatively, additional flags oftcpInValidateAllowInboundConnections
andudpInValidateAllowInboundConnections
could be employed to turn on/off design time validationNew settings, for now, have deliberately NOT been included in the default settings file (merits to discuss)Screenshots (Updated 2022/12/04)
TCP
NOTE: The help comment is improved to read: NOTE: If your node shows "inbound connections are disabled", then it has been disabled in the Node-RED settings file.
UDP
NOTE: The help comment is improved to read: NOTE: If your node shows "inbound connections are disabled", then it has been disabled in the Node-RED settings file.
Screenshots (OUTDATED 2022/12/04)
Flow status
TCP In node
TCP Out node
UDP In node
Checklist
grunt
to verify the unit tests pass