Shallot
Small-scale onion routing over WebRTC, built on top of Conductor-Chord in ES6.
DISCLAIMER: THIS PROJECT IS A PROOF-OF-CONCEPT, AND SHOULD NOT BE USED WHERE SERIOUS SECURITY IS DESIRED!
Overview
Shallot uses the chord network to allow opening of an onion route to any other node of a known ID. The idea is that this can allow for security-focused apps to be designed around Chord's File System and ownership of keys, allowing you to tie usernames in an app to node IDs if desired.
Routes in the system are one-way; this approach is taken to minimize the risk of route failure affecting both directions of traffic flow, similarly to I2P.
Standard Usage
Shallot can be used either as a module for an existing Chord system, or as the basis of such a system:
var Shallot = require("shallot").Shallot;
var Module = require("shallot").ShallotModule;
window.s = new Shallot({
chordConfig: {
},
shallotConfig: {
routeLength: 3,
callTimeout: 1500,
maxCallRetries: 3,
rcCacheDuration: 20000
}
});
s.join("ws://mcfelix.me:7171")
.then(
() => {
s.on("receiveConnection", conn => {
conn.on("data", data => console.log(`[DATA] ${conn.startId}): ${data}`))
})
s.connectTo()
.then(
session => session.send("Hello World!"),
error => console.log("Error encountered while opening! " + error)
)
},
error => {
alert("Couldn't join chord server: " + error);
}
)
For a server node, using my modified wrtc:
var Shallot = require("shallot").Shallot,
wrtc = require("wrtc"),
SegfaultHandler = require("segfault-handler");
SegfaultHandler.registerHandler("crash.log");
var s = new Shallot(
{
chordConfig:{
conductorConfig: {
rtc_facade: wrtc
},
isServer: true,
debug: true
}
}
);
Changelog
1.0.0