From 4740230115e841fbd8c8d69a933393b0c76e1830 Mon Sep 17 00:00:00 2001 From: Eric Martindale Date: Thu, 13 Apr 2017 22:07:52 -0700 Subject: [PATCH 1/2] Disable SPDY startup --- lib/Service/http.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Service/http.js b/lib/Service/http.js index fc0d1149..5d5e8fe5 100644 --- a/lib/Service/http.js +++ b/lib/Service/http.js @@ -1029,10 +1029,10 @@ HTTP.prototype.start = function( started ) { //self.maki.config.services.spdy.port = sslPort; //self.maki.httpd = require('http').createServer( self.maki.app ); - self.maki.spdyd = require('spdy').createServer({ + /* self.maki.spdyd = require('spdy').createServer({ key: keys.serviceKey, cert: keys.certificate - }, self.maki.app ); + }, self.maki.app ); */ self.maki.socks.bind( self.maki ); @@ -1060,7 +1060,7 @@ HTTP.prototype.start = function( started ) { self.address = address; - self.maki.serverSPDY = self.maki.spdyd.listen( sslPort , function() { + /*self.maki.serverSPDY = self.maki.spdyd.listen( sslPort , function() { var address = self.maki.spdyd.address(); if (!self.maki.supress) console.log('[SERVICE]'.bold.green , '[HTTP]'.bold , 'listening'.green, 'for', '[https,spdy]'.bold, 'on' , 'https://' + address.address + ':' + address.port ); @@ -1068,7 +1068,7 @@ HTTP.prototype.start = function( started ) { self.maki.emit('service:http:started'); return started(); - }); + });*/ }); From f6c4c591ac681069c0244cae740e44d798292f56 Mon Sep 17 00:00:00 2001 From: Eric Martindale Date: Thu, 13 Apr 2017 23:44:52 -0700 Subject: [PATCH 2/2] Disable certificate generation --- lib/Service/http.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/Service/http.js b/lib/Service/http.js index 5d5e8fe5..b04c0486 100644 --- a/lib/Service/http.js +++ b/lib/Service/http.js @@ -1020,12 +1020,12 @@ HTTP.prototype.start = function( started ) { // TODO: spdy/https should be the default. Make it so, with optional http. // TODO: allow configurable certificate, supplied by config // this will allow for standalone mode, as well as a "backend worker" mode. - pem.createCertificate({ + /* pem.createCertificate({ days: 90, selfSigned: true - }, function(err, keys) { + }, function(err, keys) { */ - var sslPort = self.maki.config.services.http.port + 443 - 80; + //var sslPort = self.maki.config.services.http.port + 443 - 80; //self.maki.config.services.spdy.port = sslPort; //self.maki.httpd = require('http').createServer( self.maki.app ); @@ -1059,6 +1059,10 @@ HTTP.prototype.start = function( started ) { if (!self.maki.supress) console.log('[SERVICE]'.bold.green , '[HTTP]'.bold , 'listening'.green, 'for', '[http] '.bold, 'on ' , 'http://' + address.address + ':' + address.port ); self.address = address; + + self.emit('started'); + self.maki.emit('service:http:started'); + return started(); /*self.maki.serverSPDY = self.maki.spdyd.listen( sslPort , function() { var address = self.maki.spdyd.address(); @@ -1079,7 +1083,7 @@ HTTP.prototype.start = function( started ) { HTTP.prototype.destroy = function( cb ) { this.maki.server.stop(); - this.maki.serverSPDY.stop(); + //this.maki.serverSPDY.stop(); }; module.exports = HTTP;