SOCKS5 proxy support for Kad, preconfigured for using Tor


Keywords
kad, tor, onion, hidden, service, kadtools
License
AGPL-3.0
Install
npm install kad-onion@2.0.2

Documentation

Kad Onion

Build Status Coverage Status NPM

Tor plugin for Kad! Automatically run your DHT node as a hidden service and communicate with peers over the Tor network.

Usage

GRANAX_USE_TOR_ALPHA=1 npm install kad-onion --save

Note! Until Version 3 Hidden Services are included in the stable release of Tor, you must include the GRANAX_USE_TOR_ALPHA=1 environment variable on installation! This applies to any package that wishes to make use of this kad-onion!

If you want to use Version 2 hidden services, see the documentation for kad-onion@1.8.0.

npm install kad-onion@1.8.0 --save
const kad = require('kad');
const onion = require('kad-onion');

const node = kad({
  // ...
  transport: new kad.HTTPTransport()
});

node.plugin(onion({
  dataDirectory: '/tmp/kad-onion', // Set to persist onion hostname
  virtualPort: 80,
  localMapping: '127.0.0.1:8080'
}));

node.listen(8080, function() {
  console.log(node.contact); // { hostname: 'kadl4viaeoutiv2e.onion', port: 80 }
});

License

Kad Onion - SOCKS5 proxy support for Kad, preconfigured for using Tor
Copyright (C) 2017 Gordon Hall

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.