From 13dd677a270c8444cd19e685425083342b2589c3 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 4 Nov 2015 09:22:00 +0000 Subject: [PATCH] Houston, this is big bird. We are multicore! --- bin/walnut | 26 +---- init.public/index.html | 17 ++++ lib/sni-server.js | 116 ++++++++++++++++++++++ lib/unlock-device.js | 83 ++++++++++++++++ lib/vhost-sni-server.js | 206 +--------------------------------------- master.js | 183 +++++++++++++++++++++++++++++++++++ walnut.js | 86 +---------------- worker.js | 46 +++++++++ 8 files changed, 457 insertions(+), 306 deletions(-) create mode 100644 init.public/index.html create mode 100644 lib/sni-server.js create mode 100644 lib/unlock-device.js create mode 100644 master.js create mode 100644 worker.js diff --git a/bin/walnut b/bin/walnut index 2d2f5d4..03ea920 100755 --- a/bin/walnut +++ b/bin/walnut @@ -12,33 +12,24 @@ function eagerLoad() { var PromiseA = require('bluebird').Promise; var promise = PromiseA.resolve(); - [ 'passport' - , 'knex' - , 'bookshelf' - , 'express' + [ 'express' , 'request' , 'sqlite3' , 'body-parser' - , 'express-session' , 'urlrouter' , 'express-lazy' , 'connect-send-error' , 'underscore.string' - , 'bookshelf' , 'secret-utils' , 'connect-cors' , 'uuid' , 'connect-recase' - , 'passport-local' - , 'passport-strategy' - , 'passport-http' - , 'passport-http-bearer' , 'escape-string-regexp' , 'connect-query' , 'recase' - ].forEach(function (name, i) { + ].forEach(function (name/*, i*/) { promise = promise.then(function () { - return new PromiseA(function (resolve, reject) { + return new PromiseA(function (resolve/*, reject*/) { setTimeout(function () { require(name); resolve(); @@ -48,17 +39,6 @@ function eagerLoad() { }); [ function () { - return require('knex').initialize({ - client: 'sqlite3' - , connection: { - filename : ':memory:' - } - }); - } - , function (knex) { - require('bookshelf').initialize(knex); - } - , function () { require('body-parser').json(); } /* diff --git a/init.public/index.html b/init.public/index.html new file mode 100644 index 0000000..0f303b3 --- /dev/null +++ b/init.public/index.html @@ -0,0 +1,17 @@ + + + Device Locked + + +

Device Locked

+

This device is locked and can only be unlocked with the device's encryption key.

+ +
+ + + +
+