Skip to content

atd-schubert/node-tor-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-tor-control

A node library to communicate with tor-control

For basic information about tor-control please read the specs

How to use

npm install tor-control --save
var TorControl = require('tor-control');

var control = new TorControl({
    password: 'password',                     // Your password for tor-control
    persistent: false                         // Keep connection (persistent)
});

control.signalNewnym(function (err, status) { // Get a new circuit
   if (err) {
      return console.error(err);
   }
   console.log(status.messages[0]); // --> "OK"
});

control.getInfo(['version', 'exit-policy/ipv4'], function (err, status) { // Get info like describe in chapter 3.9 in tor-control specs.
   if (err) {
      return console.error(err);
   }
   console.log(status.messages.join(' - '));
});

All commands from spec are supported. For further information take a look at the source-code and the specs.

About

A node library to communicate with tor-control

Resources

License

Stars

Watchers

Forks

Packages

No packages published