I've written a JS library consisting of a WebRTC client and node.js signaling server that keeps track of availability and maintains connections with a whitelisted set of peers, and am moving on to writing an additional library to leverage this WebRTC client and build an onion routing layer on top of it for sending secure messages.
Bit of a simple overview, but drop me a line if I’ve piqued your interest at all and want to chat further — tommy2030@gmail.com