Required module:
Tor control protocol specification
- create GUI tool for
OS X, Linux, and Windows - Set timer so that every n interval the circuit is rotated
button for manaully switching circuit / getting new identity- button for stopping TOR
I made a simple nw.js app just to test the concept of making an application that would allow you to control the onion router and request a new exit node / identity.
Example functions:
/*
This script uses the tor-control module to talk to the TOR control protocol.
You must start TOR with the control protocol flag in order for this to work:
$ tor -controlport 9051
See full protocol spec here:
https://gitweb.torproject.org/torspec.git/tree/control-spec.txt
*/
var TorControl = require('tor-control');
var control = new TorControl();
/*
NEWNYM -- Switch to clean circuits, so new application requests
don't share any circuits with old ones. Also clears
the client-side DNS cache. (Tor MAY rate-limit its
response to this signal.)
*/
function newIdent(){
control.signalNewnym(function (err, status) { // Get a new circuit
console.log(status); // --> "OK"
});
}
/*
SHUTDOWN -- Controlled shutdown: if server is an OP, exit immediately.
If it's an OR, close listeners and exit after
ShutdownWaitLength seconds. (like INT)
*/
function shutDown(){
control.signalHalt(function (err, status) { // Get a new circuit
console.log(status);
});
}
/*
DUMP -- Dump stats: log information about open connections and
circuits. (like USR1)
*/
function dump(){
control.signalDump(function (err, status) { // Get a new circuit
console.log(status);
});
}
/*
DEBUG -- Debug: switch all open logs to loglevel debug. (like USR2)
*/
function debug(){
control.signalDebug(function (err, status) { // Get a new circuit
console.log(status);
});
}