add DNSServer

This commit is contained in:
Zachary Boyd 2017-01-31 10:56:42 -05:00
parent f27694626d
commit 0ae136a9e8
21 changed files with 1295 additions and 30045 deletions

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
.git
node_modules
Dockerfile

19
Dockerfile Normal file
View file

@ -0,0 +1,19 @@
FROM ubuntu:16.10
EXPOSE 9050
EXPOSE 53
ADD https://deb.nodesource.com/setup_7.x /nodejs_install
RUN bash /nodejs_install
RUN apt install -y nodejs tor git
ADD . /app
WORKDIR /app
RUN npm install
CMD npm start

View file

@ -1,13 +0,0 @@
Copyright [2016] [Zachary Boyd]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View file

@ -1,63 +0,0 @@
#!/usr/bin/env node
'use strict';
const dir = __dirname+'/../';
const TorPool = require(dir+'/lib/TorPool.js');
const DockerPool = require(dir+'/lib/DockerPool');
const SOCKS = require(dir+'/lib/SOCKSServer.js');
const DNS = require(dir+'/lib/DNSServer.js');
const url = require('url');
const program = require('commander');
program
.version('0.0.1')
.option('-H, --docker [unix:///var/run/docker.sock]', 'Docker Host')
.option('-j, --tors [1]', 'Number of Tor Instances', parseInt)
.option('-p, --port [9050]', 'SOCKS Port', parseInt)
.option('-d, --dns [9053]', 'DNS Port', parseInt)
.parse(process.argv);
program.docker = program.docker || 'unix:///var/run/docker.sock';
program.tors = program.tors || 1;
program.port = program.port || 9050;
program.dns = program.dns || 9053;
var docker_url = (url.parse(program.docker));
var docker_cfg = {};
if (docker_url.protocol === 'unix:') {
docker_cfg.socketPath = docker_url.path;
} else if (docker_url.protocol === 'http:' || docker_url.protocol === 'tcp:') {
docker_cfg.host = docker_url.hostname;
docker_cfg.port = docker_url.port;
if (docker_url.protocol !== 'tcp:') {
docker_cfg.protocol = docker_url.protocol.replace(':', '');
}
} else {
throw new Error('Invalid docker protocol: '+docker_url.protocol);
}
var docker = new DockerPool();
var pool = new TorPool(program.tors, docker);
process.stdin.resume();
process.on('uncaughtException', function (err) {
console.error(err.stack);
});
pool.start(function () {
if (program.port) {
let socks = new SOCKS(pool);
socks.server.listen(program.port, function (err) {
if (err)
console.error(err);
});
}
if (program.dns) {
let dns = new DNS(pool, true);
dns.server.serve(program.dns);
}
});

29473
config/hosts

File diff suppressed because it is too large Load diff

View file

@ -1,7 +0,0 @@
Log notice stdout
SocksPort 0.0.0.0:9050
DataDirectory /data
DNSPort 0.0.0.0:9053
ExcludeSingleHopRelays 0
NewCircuitPeriod 10
EnforceDistinctSubnets 0

10
docker-compose.yaml Normal file
View file

@ -0,0 +1,10 @@
version: '2'
services:
tor_router:
build: .
volumes:
- "./src:/app/src"
- "./test:/app/test"
ports:
- "9050:9050"
- "53:53"

View file

@ -1,87 +0,0 @@
'use strict';
const dns = require('native-dns');
const async = require('async');
const winston = require('winston');
const HOSTS = require('./hosts');
const DNSServer = (function () {
const SERVER = Symbol('server');
const POOL = Symbol('pool');
const TOR_ALL_DOMAINS = Symbol('all domains');
const DEFAULT_DNS = Symbol('def dns');
return class DNSServer {
constructor(tor_pool, all_domains, default_dns) {
if (!tor_pool)
throw (new Error('no tor pool'));
this[SERVER] = dns.createUDPServer();
this[POOL] = tor_pool;
this[TOR_ALL_DOMAINS] = !!all_domains;
this[DEFAULT_DNS] = default_dns || { address: '8.8.8.8', port: 53, type: 'udp' };
var dns_srv = this;
this[SERVER].on('listening', function () {
})
this[SERVER].on('request', function (req, res) {
async.each(req.question, function (question, next) {
if (question.name.split('.').slice(-1).shift() === 'onion' || dns_srv[TOR_ALL_DOMAINS])
var srv = { address: dns_srv[POOL].next().host, port: dns_srv[POOL].next().dns_port, type: 'udp' };
else
var srv = dns_srv[DEFAULT_DNS];
var hosts_result = dns_srv.resolve(question.name);
if (hosts_result && ((hosts_result && hosts_result[0]) !== question.name)) {
res.answer.push(dns.A({
name: hosts_result[1],
address: hosts_result[0],
ttl: 600,
}));
res.send();
return;
}
var $req = dns.Request({
question: question,
server: srv,
timeout: 1000,
});
$req.once('timeout', function () {
res.send();
next && next();
next = null;
});
$req.on('message', function (err, answer) {
answer.answer.forEach((record) => winston.info('[DNS]: '+question.name+' => '+record.address));
answer.answer.forEach((record) => res.answer.push(record));
});
$req.once('end', function () {
res.send();
next && next();
next = null;
});
$req.send();
}, function () {
});
});
this[SERVER].on('error', function (err){
winston.error(err.stack);
});
}
get server() {
return this[SERVER];
}
resolve($host) {
let result = HOSTS.filter((line) => line.slice(1).some((host) => host === $host))[0];
return result || null;
}
};
})();
module.exports = DNSServer

View file

@ -1,37 +0,0 @@
'use strict';
const ejs = require('ejs');
const shell = require('shelljs');
const _ = require('lodash');
const Docker = require('dockerode');
const DockerPool = (function () {
const DEFAULT_DOCKER_OPTIONS = { socketPath: '/var/run/docker.sock' };
const HOSTS = Symbol('hosts');
return class DockerPool {
constructor(hosts) {
hosts = hosts || DEFAULT_DOCKER_OPTIONS;
this[HOSTS] = [].concat(hosts);
}
rotate(num) {
num = num || 1;
this[HOSTS].unshift.apply( this[HOSTS], this[HOSTS].splice( num, this[HOSTS].length ) );
return this[HOSTS];
}
get hosts() {
return this[HOSTS].map((host) => new Docker(host));
}
next() {
this.rotate(1);
return this.hosts[0];
}
valueOf() {
return this.next();
}
get host() {
return this.next();
}
};
})();
module.exports = DockerPool;

View file

@ -1,128 +0,0 @@
'use strict';
var socks = require('socksv5'),
winston = require('winston'),
ejs = require('ejs'),
domain = require('domain'),
shell = require('shelljs'),
HOSTS = require('./hosts');
const SOCKSServer = (function () {
const SERVER = Symbol('server');
const POOL = Symbol('pool');
return class SOCKSServer {
constructor(tor_pool) {
if (!tor_pool)
throw (new Error('no tor pool'));
var socks_srv = this;
this[SERVER] = socks.createServer(function (info, accept, deny) {
if (socks_srv.acl(info)){
var d = domain.create();
var socket = accept(true);
d.on('error', function (err) {
winston.warn(err.message);
socket && socket.end();
});
d.add(socket);
d.run(function () {
socks_srv.connection(info, socket);
});
} else {
deny();
}
});
this[SERVER].useAuth(socks.auth.None());
this[POOL] = tor_pool;
}
resolve($host) {
let result = HOSTS.filter((line) => line.slice(1).some((host) => host === $host))[0];
return result || $host;
}
acl(info) {
return true;
}
connection (info, socket) {
var socks_srv = this;
var incoming_socket = socket,
outgoing_socket = null;
var buffer = Array();
var onError = function (error) {
this.incoming_socket && (typeof(this.incoming_socket.end) === 'function') && this.incoming_socket.end();
this.outgoing_socket && (typeof(this.outgoing_socket.end) === 'function') && this.outgoing_socket.end();
socks_srv.error(error);
};
var onClose = function () {
if (!buffer)
return;
buffer = void(0);
};
incoming_socket.on('error', onError.bind({ incoming_socket: incoming_socket, outgoing_socket: outgoing_socket }));
incoming_socket.on('data', function (data) {
if (outgoing_socket) {
outgoing_socket.write(data);
} else {
buffer[buffer.length] = data;
}
});
incoming_socket.on('close', function () {
outgoing_socket && outgoing_socket.end();
onClose();
});
let srv = socks_srv[POOL].host;
winston.info(ejs.render("[SOCKS]: <%= info.srcAddr %>:<%= info.srcPort %> => <%= srv.host %>:<%= srv.port %> => <%= info.dstAddr %>:<%= info.dstPort %>", { info: info, srv: srv }));
info.dstAddr = socks_srv.resolve(info.dstAddr);
if (info.distAddr === '0.0.0.0') {
incoming_socket.end();
return;
}
socks.connect({
host: info.dstAddr,
port: info.dstPort,
proxyHost: srv.host,
proxyPort: srv.port,
localDNS: false,
auths: [ socks.auth.None() ]
}, (function (outgoing) {
var incoming_socket = this.incoming_socket;
var buffer = this.buffer;
outgoing.on('error', onError.bind({ incoming_socket: incoming_socket, outgoing_socket: outgoing }));
outgoing.on('close', (function () {
this.incoming_socket && (typeof(this.incoming_socket.end) === 'function') && this.incoming_socket.end();
onClose();
}).bind({ incoming_socket: (incoming_socket || null) }));
outgoing.on('data', function (data){
incoming_socket && incoming_socket.write(data);
});
while (buffer.length > 0) {
outgoing.write(buffer.shift());
}
outgoing_socket = outgoing;
}).bind({ incoming_socket: incoming_socket, buffer: buffer }));
}
error() {
}
get server() {
return this[SERVER];
}
};
})();
module.exports = SOCKSServer;

View file

@ -1,127 +0,0 @@
'use strict';
const ejs = require('ejs');
const shell = require('shelljs');
const _ = require('lodash');
const DockerPool = require('./DockerPool');
const child = require('child_process');
const uuid = require('uuid');
const es = require('event-stream');
const base32 = require('base32');
const winston = require('winston');
const temp = require('temp');
const async = require('async')
const fs = require('fs');
temp.track();
const Tor = (function () {
const TOR_IMAGE = 'znetstar/tor';
const NAME = Symbol('name');
const CONTAINER = Symbol('container');
const LOG_MESSAGES = Symbol('log messages');
const LOG_MESSAGE = '[Tor Client <%= id %>]: <%= message %>';
return class Tor {
constructor(options, pool, log, data_dir) {
if (!pool) {
pool = new DockerPool();
}
if (!(pool instanceof DockerPool)) {
throw new Error('Second argument is not a DockerPool');
}
this.pool = pool;
this.data_dir = data_dir || temp.mkdirSync();
this.docker = pool.host;
this[LOG_MESSAGES] = !!log;
this[NAME] = 'tor-'+(function () {
let buf = new Buffer(16);
uuid.v4(null, buf, 0);
return base32.encode(buf);
})();
}
get container() {
if (this[CONTAINER]) {
return this[CONTAINER];
} else {
return null;
}
}
srv(callback) {
var tor = this;
async.waterfall([
function ($next) {
let container = tor[CONTAINER];
container.inspect($next);
},
function (data, $next) {
let ip = data.NetworkSettings.IPAddress;
if (!ip || ip === '') {
return $next(new Error('no ip'));
}
$next(null, { host: (ip), port: 9050, dns_port: 9053 });
}
], callback)
}
create(callback) {
var tor = this;
async.waterfall([
function ($next) {
temp.open('txt',function (err, file) {
if (file) {
fs.write(file.fd, shell.cat(__dirname+'/../config/torrc'));
fs.close(file.fd)
}
$next(err, (file && file.path));
});
},
function (path, $next) {
tor.docker.run(TOR_IMAGE, [], null, { ExposedPorts: { '9050/tcp':{}, '9053/udp':{} } }, { Binds: [ path+':/etc/tor/torrc:ro' ] }, function (error, data, container) {
console.log(error)
container.remove();
}).on('container', (function (container) {
var tor = this;
this[CONTAINER] = container;
let remove_cont = (function (code) {
container.stop(function () {
container.remove(function (err) {
process.exit();
});
});
})
process.on('SIGINT', remove_cont);
process.on('uncaughtException', remove_cont);
process.on('exit', remove_cont);
container.attach({ stream: true, stdout: true }, function (err,stream) {
stream.pipe(es.map(function (data, cb){
if (tor[LOG_MESSAGES])
process.stdout.write(ejs.render(LOG_MESSAGE, { id: container.id, message: (data.toString('utf8')) }))
cb();
}));
});
var srv = null;
async.until((function () { return srv; }), function ($next) {
tor.srv(function (err, $srv) {
srv = $srv;
setTimeout($next, 1000);
});
}, function (err) {
callback(null, srv);
});
}).bind(tor));
}
], callback);
}
};
})();
module.exports = Tor;

View file

@ -1,62 +0,0 @@
'use strict';
const ejs = require('ejs');
const shell = require('shelljs');
const _ = require('lodash');
const Tor = require('./Tor');
const async = require('async');
const TorPool = (function () {
const HOSTS = Symbol('hosts');
const NUM_SERVERS = Symbol('num');
const DOCKER_POOL = Symbol('pool');
const TORS = Symbol('tors');
return class TorPool {
constructor(num, docker_pool) {
num = num || 1;
this[DOCKER_POOL] = docker_pool;
this[NUM_SERVERS] = num;
this[HOSTS] = [];
this[TORS] = [];
}
start(callback) {
let range = ((size) => Array.from(Array(size).keys()));
let srv_array = range(this[NUM_SERVERS]);
this[TORS] = [];
var pool = this;
async.map(srv_array, function (index, next) {
let tor = new Tor({}, pool[DOCKER_POOL]);
pool[TORS].push(tor);
tor.create(function (err) {
if (err) {
return next(err);
}
tor.srv(next);
});
}, function (err, srvs){
pool[HOSTS] = srvs;
callback(err, pool.hosts);
});
}
rotate(num) {
num = num || 1;
this[HOSTS].unshift.apply( this[HOSTS], this[HOSTS].splice( num, this[HOSTS].length ) );
return this[HOSTS];
}
get hosts() {
return this[HOSTS];
}
next() {
this.rotate(1);
return this.hosts[0];
}
valueOf() {
return this.next();
}
get host() {
return this.next();
}
};
})();
module.exports = TorPool;

View file

@ -1,7 +0,0 @@
const shell = require('shelljs');
const HOSTS = shell.cat(__dirname+'/../config/hosts')
.split("\n")
.filter((host) => (host[0] !== '#') && host.trim().length)
.map((line) => line.split(' '));
module.exports = HOSTS;

View file

@ -1,5 +0,0 @@
module.exports = {};
(require('shelljs').ls(__dirname).filter((f) => f !== 'index.js')).forEach(function (name) {
module.exports[name.replace('.js', '')] = require(__dirname+'/'+name);;
})

View file

@ -1,40 +1,27 @@
{
"name": "tor-router",
"version": "1.0.0",
"bin": "bin/tor-router.js",
"main": "lib/index.js",
"author": [
{
"name": "Zachary Boyd",
"email": "zacharyboyd@zacharyboyd.nyc"
}
],
"repository": [
{
"type": "docker",
"url": "http://registry.docker.io/znetstar"
},
{
"type": "git",
"url": "https://bitbucket.org/znetstar/tor-router"
}
],
"dependencies": {
"async": "^1.5.0",
"base32": "0.0.6",
"commander": "^2.9.0",
"dockerode": "^2.2.7",
"ejs": "^2.3.4",
"event-stream": "^3.3.2",
"lodash": "^3.10.1",
"native-dns": "^0.7.0",
"shelljs": "^0.5.3",
"socksv5": "0.0.6",
"temp": "^0.8.3",
"uuid": "^2.0.1",
"winston": "^2.1.1"
"version": "3.0.0",
"main": "src/index.js",
"repository": "git@github.com:znetstar/tor-router.git",
"author": "Zachary Boyd <zachary@zacharyboyd.nyc>",
"license": "MIT",
"scripts": {
"start": "bin/tor-router",
"test": "mocha test/test.js"
},
"scripts": {},
"devDependencies": {},
"license": "Apache License"
"devDependencies": {
"mocha": "^3.2.0",
"request": "^2.79.0",
"socks5-http-client": "^1.0.2"
},
"dependencies": {
"async": "^2.1.4",
"eventemitter2": "^3.0.0",
"get-port": "^2.1.0",
"lodash": "^4.17.4",
"native-dns": "https://github.com/znetstar/node-dns.git",
"socksv5": "^0.0.6",
"temp": "^0.8.3",
"winston": "^2.3.1"
}
}

39
src/DNSServer.js Normal file
View file

@ -0,0 +1,39 @@
const dns = require('native-dns');
const UDPServer = require('native-dns').UDPServer;
class DNSServer extends UDPServer {
constructor(tor_pool, options, timeout) {
super(options || {});
this.tor_pool = tor_pool;
this.on('request', (req, res) => {
for (let question of req.question) {
let outbound_req = dns.Request({
question,
server: { address: '127.0.0.1', port: (tor_pool.next().dns_port), type: 'udp' },
timeout: this.timeout
});
outbound_req.on('message', (err, answer) => {
if (!err && answer)
answer.answer.forEach((a) => res.answer.push(a));
});
outbound_req.on('error', (err) => {
});
outbound_req.on('end', () => {
res.send();
});
outbound_req.send();
}
});
}
};
module.exports = DNSServer;

77
src/TorPool.js Normal file
View file

@ -0,0 +1,77 @@
/* From http://stackoverflow.com/questions/1985260/javascript-array-rotate */
Array.prototype.rotate = (function() {
// save references to array functions to make lookup faster
var push = Array.prototype.push,
splice = Array.prototype.splice;
return function(count) {
var len = this.length >>> 0, // convert to uint
count = count >> 0; // convert to int
// convert count to value in range [0, len)
count = ((count % len) + len) % len;
// use splice.call() instead of this.splice() to make function generic
push.apply(this, splice.call(this, 0, count));
return this;
};
})();
const EventEmitter = require('eventemitter2').EventEmitter2;
const async = require('async');
const TorProcess = require('./TorProcess');
const temp = require('temp');
const _ = require('lodash');
temp.track();
class TorPool extends EventEmitter {
constructor(tor_path, config) {
super();
config = config || {};
this.tor_config = config;
this.tor_path = tor_path || 'tor';
this._instances = [];
}
get instances() { return this._instances.slice(0); }
create_instance(callback) {
let config = _.extend({}, this.tor_config)
let instance = new TorProcess(this.tor_path, config);
instance.create((error) => {
if (error) return callback(error);
this._instances.push(instance);
instance.once('error', callback)
instance.once('ready', () => {
callback(null, instance);
});
});
}
create(instances, callback) {
if (!Number(instances)) return callback(null, []);
async.map(Array.from(Array(Number(instances))), (nothing, next) => {
this.create_instance(next);
}, callback);
}
next() {
this._instances.rotate();
return this.instances[0];
}
exit() {
this.instances.forEach((tor) => tor.exit());
}
new_ips() {
this.instances.forEach((tor) => tor.new_ip());
}
};
module.exports = TorPool;

99
src/TorProcess.js Normal file
View file

@ -0,0 +1,99 @@
const spawn = require('child_process').spawn;
const _ = require('lodash');
const temp = require('temp');
const async = require('async');
const fs = require('fs');
const getPort = require('get-port');
const EventEmitter = require('eventemitter2').EventEmitter2;
temp.track();
class TorProcess extends EventEmitter {
constructor(tor_path, config) {
super();
this.tor_path = tor_path || 'tor';
this.tor_config = _.extend({
Log: 'notice stdout',
DataDirectory: temp.mkdirSync(),
ExcludeSingleHopRelays: '0',
NewCircuitPeriod: '10',
EnforceDistinctSubnets: '0'
}, (config || { }));
}
exit() {
this.process.kill('SIGKILL');
}
new_ip() {
this.process.kill('SIGHUP');
}
get dns_port() {
return this._dns_port || null;
}
get socks_port() {
return this._socks_port || null;
}
create(callback) {
async.auto({
dnsPort: (callback) => getPort().then(port => callback(null, port)),
socksPort: (callback) => getPort().then(port => callback(null, port)),
configPath: ['dnsPort', 'socksPort', (context, callback) => {
let options = {
DNSPort: `127.0.0.1:${context.dnsPort}`,
SocksPort: `127.0.0.1:${context.socksPort}`,
};
let config = _.extend(_.extend({}, this.tor_config), options);
let text = Object.keys(config).map((key) => `${key} ${config[key]}`).join("\n");
temp.open('tor-router', (err, info) => {
if (err) return callback(err);
fs.write(info.fd, text);
fs.close(info.fd, (err) => {
callback(err, info.path);
});
});
}]
}, (error, context) => {
if (error) callback(error);
this._dns_port = context.dnsPort;
this._socks_port = context.socksPort;
let tor = spawn(this.tor_path, ['-f', context.configPath], {
stdio: ['ignore', 'pipe', 'pipe'],
detached: false,
shell: '/bin/bash'
});
tor.stderr.on('data', (data) => {
let error_message = new Buffer(data).toString('utf8');
this.emit('error', new Error(error_message));
});
tor.stdout.on('data', (data) => {
let text = new Buffer(data).toString('utf8');
if (text.indexOf('Bootstrapped 100%: Done') !== -1){
this.emit('ready');
}
if (text.indexOf('[err]') !== -1) {
this.emit('error', new Error(text.split('] ').pop()));
}
});
this.process = tor;
callback && callback(null, tor);
});
}
};
module.exports = TorProcess;

5
src/index.js Normal file
View file

@ -0,0 +1,5 @@
module.exports = {
TorProcess: require('./TorProcess'),
TorPool: require('./TorPool'),
DNSServer: require('./DNSServer')
};

152
test/test.js Normal file
View file

@ -0,0 +1,152 @@
const SocksAgent = require('socks5-http-client/lib/Agent');
const request = require('request');
const async = require('async');
const temp = require('temp');
temp.track();
const TorRouter = require('../');
const getPort = require('get-port');
const dns = require('native-dns');
describe('TorProcess', function () {
const TOR_DATA_DIR = temp.mkdirSync();
const TorProcess = TorRouter.TorProcess;
describe('#create()', function () {
var tor = new TorProcess('tor', { DataDirectory: TOR_DATA_DIR });
this.timeout(Infinity);
it('should create the process without an error', function (done) {
tor.create(done);
});
it('should signal ready when bootstrapped', function (done) {
tor.once('error', done);
tor.once('ready', done);
});
after('shutdown tor', function () {
tor.exit();
});
});
describe('#new_ip()', function () {
var tor = new TorProcess('tor', { DataDirectory: TOR_DATA_DIR });
var old_ip = null;
this.timeout(Infinity);
var get_ip = (callback) => {
request({
url: 'http://monip.org',
agentClass: SocksAgent,
agentOptions: {
socksHost: '127.0.0.1',
socksPort: tor.socks_port
}
}, (error, res, body) => {
var ip;
if (body)
ip = body.split('IP : ').pop().split('<').shift();
callback(error || (!body && new Error("Couldn't grab IP")), ip)
});
};
before('create a tor instance', function (done) {
tor.once('error', done);
tor.once('ready', done);
tor.create();
});
it('should have an ip address', function (done) {
get_ip((err, ip) => {
if (err) return done(err);
old_ip = ip;
done(err);
});
});
it('should have a new ip address after sending HUP', function (done) {
tor.new_ip();
setTimeout(() => {
get_ip((err, ip) => {
if (err) return done(err);
if (ip === old_ip)
done(new Error(`IP hasn't changed ${old_ip} === ${ip}`));
else
done();
});
}, (10*1000));
});
after('shutdown tor', function () {
tor.exit();
});
});
});
describe('TorPool', function () {
var TorPool = TorRouter.TorPool;
var pool = new TorPool('tor');
describe('#create', function () {
this.timeout(Infinity);
it('should create two instances without any problems', function (done) {
pool.create(2, function (error) {
if (error) return done(error);
done((pool.instances.length !== 2) && new Error('pool does not have two instances'));
});
});
after(function () {
pool.exit();
});
});
})
describe('DNSServer', function () {
var TorPool = TorRouter.TorPool;
var DNSServer = TorRouter.DNSServer;
var pool = new TorPool('tor');
var dns_server = new DNSServer(pool);
describe('#on("request")', function () {
this.timeout(Infinity);
it('should startup a tor pool with two instances', function (done) {
pool.create(2, done);
});
it('should be able to resolve "google.com" ', function (done) {
getPort().then((port) => {
console.log(port)
dns_server.serve(port);
let req = dns.Request({
question: dns.Question({ name: 'google.com', type: 'A' }),
server: { address: '127.0.0.1', port: port, type: 'udp' },
timeout: 5000
});
req.on('timeout', () => {
done && done(new Error("Request timed out"));
done = null;
});
req.on('message', (e, m) => {
console.log(e,m)
done && done(((!m) || (!m.answer.length)) && new Error('Unable to resolve host'));
done = null;
});
req.send();
});
});
after(function () {
pool.exit();
dns_server.close();
});
});
});

868
yarn.lock Normal file
View file

@ -0,0 +1,868 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
ansi-regex@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
asn1@~0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86"
assert-plus@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234"
assert-plus@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
async@0.2.x:
version "0.2.10"
resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"
async@^2.1.4:
version "2.1.4"
resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4"
dependencies:
lodash "^4.14.0"
async@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/async/-/async-1.0.0.tgz#f8fc04ca3a13784ade9e1641af98578cfbd647a9"
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
aws-sign2@~0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f"
aws4@^1.2.1:
version "1.5.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755"
balanced-match@^0.4.1:
version "0.4.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
bcrypt-pbkdf@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4"
dependencies:
tweetnacl "^0.14.3"
boom@2.x.x:
version "2.10.1"
resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f"
dependencies:
hoek "2.x.x"
brace-expansion@^1.0.0:
version "1.1.6"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9"
dependencies:
balanced-match "^0.4.1"
concat-map "0.0.1"
browser-stdout@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f"
"buffercursor@>= 0.0.12":
version "0.0.12"
resolved "https://registry.yarnpkg.com/buffercursor/-/buffercursor-0.0.12.tgz#78a9a7f4343ae7d820a8999acc80de591e25a779"
dependencies:
verror "^1.4.0"
caseless@~0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7"
chalk@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
ansi-styles "^2.2.1"
escape-string-regexp "^1.0.2"
has-ansi "^2.0.0"
strip-ansi "^3.0.0"
supports-color "^2.0.0"
cli@0.4.x:
version "0.4.5"
resolved "https://registry.yarnpkg.com/cli/-/cli-0.4.5.tgz#78f9485cd161b566e9a6c72d7170c4270e81db61"
dependencies:
glob ">= 3.1.4"
cli@0.6.x:
version "0.6.6"
resolved "https://registry.yarnpkg.com/cli/-/cli-0.6.6.tgz#02ad44a380abf27adac5e6f0cdd7b043d74c53e3"
dependencies:
exit "0.1.2"
glob "~ 3.2.1"
cliff@0.1.x:
version "0.1.10"
resolved "https://registry.yarnpkg.com/cliff/-/cliff-0.1.10.tgz#53be33ea9f59bec85609ee300ac4207603e52013"
dependencies:
colors "~1.0.3"
eyes "~0.1.8"
winston "0.8.x"
colors@0.6.x:
version "0.6.2"
resolved "https://registry.yarnpkg.com/colors/-/colors-0.6.2.tgz#2423fe6678ac0c5dae8852e5d0e5be08c997abcc"
colors@1.0.x, colors@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b"
combined-stream@^1.0.5, combined-stream@~1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009"
dependencies:
delayed-stream "~1.0.0"
commander@2.9.0, commander@^2.9.0:
version "2.9.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4"
dependencies:
graceful-readlink ">= 1.0.0"
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
core-util-is@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
cryptiles@2.x.x:
version "2.0.5"
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
dependencies:
boom "2.x.x"
cycle@1.0.x:
version "1.0.3"
resolved "https://registry.yarnpkg.com/cycle/-/cycle-1.0.3.tgz#21e80b2be8580f98b468f379430662b046c34ad2"
dashdash@^1.12.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
dependencies:
assert-plus "^1.0.0"
debug@2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da"
dependencies:
ms "0.7.1"
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
diff@1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf"
ecc-jsbn@~0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
dependencies:
jsbn "~0.1.0"
escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
eventemitter2@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-3.0.0.tgz#fec69ba0b1cde27a1bb0bd52df549fd6f65b0f45"
exit@0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
extend@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4"
extsprintf@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550"
extsprintf@^1.2.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
eyes@0.1.x, eyes@~0.1.8:
version "0.1.8"
resolved "https://registry.yarnpkg.com/eyes/-/eyes-0.1.8.tgz#62cf120234c683785d902348a800ef3e0cc20bc0"
forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
form-data@~2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4"
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.5"
mime-types "^2.1.12"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
generate-function@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74"
generate-object-property@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0"
dependencies:
is-property "^1.0.0"
get-port@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/get-port/-/get-port-2.1.0.tgz#8783f9dcebd1eea495a334e1a6a251e78887ab1a"
dependencies:
pinkie-promise "^2.0.0"
getpass@^0.1.1:
version "0.1.6"
resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6"
dependencies:
assert-plus "^1.0.0"
glob@7.0.5, "glob@>= 3.1.4":
version "7.0.5"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95"
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.2"
once "^1.3.0"
path-is-absolute "^1.0.0"
"glob@~ 3.2.1":
version "3.2.11"
resolved "https://registry.yarnpkg.com/glob/-/glob-3.2.11.tgz#4a973f635b9190f715d10987d5c00fd2815ebe3d"
dependencies:
inherits "2"
minimatch "0.3"
"graceful-readlink@>= 1.0.0":
version "1.0.1"
resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
growl@1.9.2:
version "1.9.2"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"
har-validator@~2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d"
dependencies:
chalk "^1.1.1"
commander "^2.9.0"
is-my-json-valid "^2.12.4"
pinkie-promise "^2.0.0"
has-ansi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
dependencies:
ansi-regex "^2.0.0"
has-flag@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa"
hawk@~3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4"
dependencies:
boom "2.x.x"
cryptiles "2.x.x"
hoek "2.x.x"
sntp "1.x.x"
heap@^0.2.6:
version "0.2.6"
resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac"
hoek@2.x.x:
version "2.16.3"
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
http-signature@~1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf"
dependencies:
assert-plus "^0.2.0"
jsprim "^1.2.2"
sshpk "^1.7.0"
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
dependencies:
once "^1.3.0"
wrappy "1"
inherits@2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
ip-address@~4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-4.2.0.tgz#7162c2c94998ca296a38cd82bc23168d51efc272"
dependencies:
cli "0.6.x"
cliff "0.1.x"
jsbn "0.0.0"
lodash.find "^3.2.0"
lodash.merge "^3.2.1"
sprintf "0.1.x"
"ipaddr.js@>= 0.1.1", ipaddr.js@~0.1.3:
version "0.1.9"
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-0.1.9.tgz#a9c78ccc12dc9010f296ab9aef2f61f432d69efa"
ipv6@*:
version "3.1.3"
resolved "https://registry.yarnpkg.com/ipv6/-/ipv6-3.1.3.tgz#4d9064f9c2dafa0dd10b8b7d76ffca4aad31b3b9"
dependencies:
cli "0.4.x"
cliff "0.1.x"
sprintf "0.1.x"
is-my-json-valid@^2.12.4:
version "2.15.0"
resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b"
dependencies:
generate-function "^2.0.0"
generate-object-property "^1.1.0"
jsonpointer "^4.0.0"
xtend "^4.0.0"
is-property@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84"
is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
isstream@0.1.x, isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
jodid25519@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967"
dependencies:
jsbn "~0.1.0"
jsbn@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.0.0.tgz#c52701bdcedbdf7084e1cfc701a7f86464ad7828"
jsbn@~0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd"
json-schema@0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
json-stringify-safe@~5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
json3@3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1"
jsonpointer@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9"
jsprim@^1.2.2:
version "1.3.1"
resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252"
dependencies:
extsprintf "1.0.2"
json-schema "0.2.3"
verror "1.3.6"
lodash._arraycopy@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz#76e7b7c1f1fb92547374878a562ed06a3e50f6e1"
lodash._arrayeach@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz#bab156b2a90d3f1bbd5c653403349e5e5933ef9e"
lodash._baseassign@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e"
dependencies:
lodash._basecopy "^3.0.0"
lodash.keys "^3.0.0"
lodash._basecallback@^3.0.0:
version "3.3.1"
resolved "https://registry.yarnpkg.com/lodash._basecallback/-/lodash._basecallback-3.3.1.tgz#b7b2bb43dc2160424a21ccf26c57e443772a8e27"
dependencies:
lodash._baseisequal "^3.0.0"
lodash._bindcallback "^3.0.0"
lodash.isarray "^3.0.0"
lodash.pairs "^3.0.0"
lodash._basecopy@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
lodash._basecreate@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821"
lodash._baseeach@^3.0.0:
version "3.0.4"
resolved "https://registry.yarnpkg.com/lodash._baseeach/-/lodash._baseeach-3.0.4.tgz#cf8706572ca144e8d9d75227c990da982f932af3"
dependencies:
lodash.keys "^3.0.0"
lodash._basefind@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash._basefind/-/lodash._basefind-3.0.0.tgz#b2bba05cc645f972de2cf925fa2bf63a0f60c8ae"
lodash._basefindindex@^3.0.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/lodash._basefindindex/-/lodash._basefindindex-3.6.0.tgz#f083360a1b022418ed81bc899beb312e21e74a4f"
lodash._basefor@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2"
lodash._baseisequal@^3.0.0:
version "3.0.7"
resolved "https://registry.yarnpkg.com/lodash._baseisequal/-/lodash._baseisequal-3.0.7.tgz#d8025f76339d29342767dcc887ce5cb95a5b51f1"
dependencies:
lodash.isarray "^3.0.0"
lodash.istypedarray "^3.0.0"
lodash.keys "^3.0.0"
lodash._bindcallback@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e"
lodash._createassigner@^3.0.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11"
dependencies:
lodash._bindcallback "^3.0.0"
lodash._isiterateecall "^3.0.0"
lodash.restparam "^3.0.0"
lodash._getnative@^3.0.0:
version "3.9.1"
resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
lodash._isiterateecall@^3.0.0:
version "3.0.9"
resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
lodash.create@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7"
dependencies:
lodash._baseassign "^3.0.0"
lodash._basecreate "^3.0.0"
lodash._isiterateecall "^3.0.0"
lodash.find@^3.2.0:
version "3.2.1"
resolved "https://registry.yarnpkg.com/lodash.find/-/lodash.find-3.2.1.tgz#046e319f3ace912ac6c9246c7f683c5ec07b36ad"
dependencies:
lodash._basecallback "^3.0.0"
lodash._baseeach "^3.0.0"
lodash._basefind "^3.0.0"
lodash._basefindindex "^3.0.0"
lodash.isarray "^3.0.0"
lodash.keys "^3.0.0"
lodash.isarguments@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
lodash.isarray@^3.0.0:
version "3.0.4"
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
lodash.isplainobject@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-3.2.0.tgz#9a8238ae16b200432960cd7346512d0123fbf4c5"
dependencies:
lodash._basefor "^3.0.0"
lodash.isarguments "^3.0.0"
lodash.keysin "^3.0.0"
lodash.istypedarray@^3.0.0:
version "3.0.6"
resolved "https://registry.yarnpkg.com/lodash.istypedarray/-/lodash.istypedarray-3.0.6.tgz#c9a477498607501d8e8494d283b87c39281cef62"
lodash.keys@^3.0.0:
version "3.1.2"
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
dependencies:
lodash._getnative "^3.0.0"
lodash.isarguments "^3.0.0"
lodash.isarray "^3.0.0"
lodash.keysin@^3.0.0:
version "3.0.8"
resolved "https://registry.yarnpkg.com/lodash.keysin/-/lodash.keysin-3.0.8.tgz#22c4493ebbedb1427962a54b445b2c8a767fb47f"
dependencies:
lodash.isarguments "^3.0.0"
lodash.isarray "^3.0.0"
lodash.merge@^3.2.1:
version "3.3.2"
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-3.3.2.tgz#0d90d93ed637b1878437bb3e21601260d7afe994"
dependencies:
lodash._arraycopy "^3.0.0"
lodash._arrayeach "^3.0.0"
lodash._createassigner "^3.0.0"
lodash._getnative "^3.0.0"
lodash.isarguments "^3.0.0"
lodash.isarray "^3.0.0"
lodash.isplainobject "^3.0.0"
lodash.istypedarray "^3.0.0"
lodash.keys "^3.0.0"
lodash.keysin "^3.0.0"
lodash.toplainobject "^3.0.0"
lodash.pairs@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/lodash.pairs/-/lodash.pairs-3.0.1.tgz#bbe08d5786eeeaa09a15c91ebf0dcb7d2be326a9"
dependencies:
lodash.keys "^3.0.0"
lodash.restparam@^3.0.0:
version "3.6.1"
resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
lodash.toplainobject@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash.toplainobject/-/lodash.toplainobject-3.0.0.tgz#28790ad942d293d78aa663a07ecf7f52ca04198d"
dependencies:
lodash._basecopy "^3.0.0"
lodash.keysin "^3.0.0"
lodash@^4.14.0, lodash@^4.17.4:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
lru-cache@2:
version "2.7.3"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"
mime-db@~1.26.0:
version "1.26.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff"
mime-types@^2.1.12, mime-types@~2.1.7:
version "2.1.14"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee"
dependencies:
mime-db "~1.26.0"
minimatch@0.3:
version "0.3.0"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.3.0.tgz#275d8edaac4f1bb3326472089e7949c8394699dd"
dependencies:
lru-cache "2"
sigmund "~1.0.0"
minimatch@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
dependencies:
brace-expansion "^1.0.0"
minimist@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
mkdirp@0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
dependencies:
minimist "0.0.8"
mocha@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.2.0.tgz#7dc4f45e5088075171a68896814e6ae9eb7a85e3"
dependencies:
browser-stdout "1.3.0"
commander "2.9.0"
debug "2.2.0"
diff "1.4.0"
escape-string-regexp "1.0.5"
glob "7.0.5"
growl "1.9.2"
json3 "3.3.2"
lodash.create "3.1.1"
mkdirp "0.5.1"
supports-color "3.1.2"
ms@0.7.1:
version "0.7.1"
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
"native-dns-cache@https://github.com/znetstar/native-dns-cache.git":
version "0.0.2"
resolved "https://github.com/znetstar/native-dns-cache.git#7743c19bd1b70d0ec32a364aadc77fbcfd5a67ad"
dependencies:
heap "^0.2.6"
native-dns-packet ">= 0.0.1"
"native-dns-packet@>= 0.0.1", native-dns-packet@~0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/native-dns-packet/-/native-dns-packet-0.1.1.tgz#97da90570b8438a00194701ce24d011fd3cc109a"
dependencies:
buffercursor ">= 0.0.12"
ipaddr.js ">= 0.1.1"
"native-dns@https://github.com/znetstar/node-dns.git":
version "0.7.0"
resolved "https://github.com/znetstar/node-dns.git#336f1d3027b2a3da719b5cd65380219267901aeb"
dependencies:
ipaddr.js "~0.1.3"
native-dns-cache "https://github.com/znetstar/native-dns-cache.git"
native-dns-packet "~0.1.1"
oauth-sign@~0.8.1:
version "0.8.2"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
dependencies:
wrappy "1"
os-tmpdir@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
pinkie-promise@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa"
dependencies:
pinkie "^2.0.0"
pinkie@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
pkginfo@0.3.x:
version "0.3.1"
resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.3.1.tgz#5b29f6a81f70717142e09e765bbeab97b4f81e21"
punycode@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
qs@~6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442"
request@^2.79.0:
version "2.79.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de"
dependencies:
aws-sign2 "~0.6.0"
aws4 "^1.2.1"
caseless "~0.11.0"
combined-stream "~1.0.5"
extend "~3.0.0"
forever-agent "~0.6.1"
form-data "~2.1.1"
har-validator "~2.0.6"
hawk "~3.1.3"
http-signature "~1.1.0"
is-typedarray "~1.0.0"
isstream "~0.1.2"
json-stringify-safe "~5.0.1"
mime-types "~2.1.7"
oauth-sign "~0.8.1"
qs "~6.3.0"
stringstream "~0.0.4"
tough-cookie "~2.3.0"
tunnel-agent "~0.4.1"
uuid "^3.0.0"
rimraf@~2.2.6:
version "2.2.8"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582"
sigmund@~1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
sntp@1.x.x:
version "1.0.9"
resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198"
dependencies:
hoek "2.x.x"
socks5-client@~1.1.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/socks5-client/-/socks5-client-1.1.2.tgz#0878eeef0654102cf4239b13b5e68c214311c6b8"
dependencies:
ip-address "~4.2.0"
socks5-http-client@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/socks5-http-client/-/socks5-http-client-1.0.2.tgz#d4cabbe47e5bc58de43850110bd17b55c0c1fd2a"
dependencies:
socks5-client "~1.1.0"
socksv5@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/socksv5/-/socksv5-0.0.6.tgz#1327235ff7e8de21ac434a0a579dc69c3f071061"
dependencies:
ipv6 "*"
sprintf@0.1.x:
version "0.1.5"
resolved "https://registry.yarnpkg.com/sprintf/-/sprintf-0.1.5.tgz#8f83e39a9317c1a502cb7db8050e51c679f6edcf"
sshpk@^1.7.0:
version "1.10.2"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.2.tgz#d5a804ce22695515638e798dbe23273de070a5fa"
dependencies:
asn1 "~0.2.3"
assert-plus "^1.0.0"
dashdash "^1.12.0"
getpass "^0.1.1"
optionalDependencies:
bcrypt-pbkdf "^1.0.0"
ecc-jsbn "~0.1.1"
jodid25519 "^1.0.0"
jsbn "~0.1.0"
tweetnacl "~0.14.0"
stack-trace@0.0.x:
version "0.0.9"
resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.9.tgz#a8f6eaeca90674c333e7c43953f275b451510695"
stringstream@~0.0.4:
version "0.0.5"
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
strip-ansi@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
dependencies:
ansi-regex "^2.0.0"
supports-color@3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5"
dependencies:
has-flag "^1.0.0"
supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
temp@^0.8.3:
version "0.8.3"
resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59"
dependencies:
os-tmpdir "^1.0.0"
rimraf "~2.2.6"
tough-cookie@~2.3.0:
version "2.3.2"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a"
dependencies:
punycode "^1.4.1"
tunnel-agent@~0.4.1:
version "0.4.3"
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb"
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
version "0.14.5"
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
uuid@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1"
verror@1.3.6:
version "1.3.6"
resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c"
dependencies:
extsprintf "1.0.2"
verror@^1.4.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/verror/-/verror-1.9.0.tgz#107a8a2d14c33586fc4bb830057cd2d19ae2a6ee"
dependencies:
assert-plus "^1.0.0"
core-util-is "1.0.2"
extsprintf "^1.2.0"
winston@0.8.x:
version "0.8.3"
resolved "https://registry.yarnpkg.com/winston/-/winston-0.8.3.tgz#64b6abf4cd01adcaefd5009393b1d8e8bec19db0"
dependencies:
async "0.2.x"
colors "0.6.x"
cycle "1.0.x"
eyes "0.1.x"
isstream "0.1.x"
pkginfo "0.3.x"
stack-trace "0.0.x"
winston@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/winston/-/winston-2.3.1.tgz#0b48420d978c01804cf0230b648861598225a119"
dependencies:
async "~1.0.0"
colors "1.0.x"
cycle "1.0.x"
eyes "0.1.x"
isstream "0.1.x"
stack-trace "0.0.x"
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
xtend@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"