4.0.0 • Published 1 month ago

@tacticalchihuahua/bulb v4.0.0

Weekly downloads
-
License
LGPL-3.0
Repository
github
Last release
1 month ago

🧅 bulb ~ embedded tor for node.js

Bulb is a complete client implementation of the Tor Control Protocol. It is designed to allow developers simple integration of the privacy-preserving properties of the Tor network into their applications. This library is focused on completeness of the protocol as well as simplicity and idiomatic interfaces for common use cases (see the ~8 LOC example hidden echo server).

install

npm install @tacticalchihuahua/bulb --save

As part of the installation process, it will download the Tor Expert Bundle and use the included Tor executable.

usage

Complete documentation can be found here.

example: hidden tcp echo server

const { TorContext } = require('@tacticalchihuahua/bulb');

const tor = await TorContext.create();
const server = tor.createServer((socket) => socket.pipe(socket)); 
const address = await server.listen(); // { host, port}
const client = tor.createConnection();

client.write('hello from bulb');
client.pipe(process.stdout); // hello from bulb

await client.connect(address);

links

copying

bulb - embedded tor for node.js
anti-copyright 2025, tactical chihuahua

Licensed under the GNU Lesser General Public License 3.0.