No, why are you complicating things when are so simple.
- Set a static IP for each node machine
- Use the each IP to access your nodes or just add in your local PC hosts file a different name for each node, like umbre1.local and umbrel2.local
Done. No complicated changes into node code.