Question

I am using dnode as an RPC-style library within my Node.js application.

Now I would like to have secure dnode's connection using public-key-cryptography. I guess that this should be possible anyhow using Node.js' TLS module, but I have never used that, hence I am missing some experience with that.

Has anybody already done this, and can provide a small, but complete example on how to set up an encrypted and secured dnode connection?

Was it helpful?

Solution 2

Okay, I got it.

All you need to do is to create a TLS server / client and pipe its stream to dnode.

For an example see my question How to verify that a connection is actually TLS secured?

OTHER TIPS

Substack has an example on the upnode page

https://github.com/substack/upnode/#ssl-stream-example

So for if you want to use dnode, just swap upnode out

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top