diff --git a/.gitmodules b/.gitmodules index caa9037..75adf64 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "packages/assets/org.oauth3"] - path = packages/assets/org.oauth3 - url = git@git.daplie.com:OAuth3/oauth3.js.git + path = packages/assets/org.oauth3 + url = git@git.daplie.com:OAuth3/oauth3.js.git diff --git a/lib/modules/http.js b/lib/modules/http.js index 57a6c8d..3631cd5 100644 --- a/lib/modules/http.js +++ b/lib/modules/http.js @@ -5,30 +5,30 @@ module.exports.create = function (deps, conf) { // no-www redirect, and transpilation of static assets (i.e. cached versions of raw html) // but right now it's a very dumb proxy - function createConnection(conn) { - var opts = conn.__opts; - var newConn = deps.net.createConnection({ - port: conf.http.proxy.port - , host: '127.0.0.1' + function createConnection(conn) { + var opts = conn.__opts; + var newConn = deps.net.createConnection({ + port: conf.http.proxy.port + , host: '127.0.0.1' - , servername: opts.servername - , data: opts.data - , remoteFamily: opts.family || conn.remoteFamily - , remoteAddress: opts.address || conn.remoteAddress - , remotePort: opts.port || conn.remotePort - }, function () { - //console.log("[=>] first packet from tunneler to '" + cid + "' as '" + opts.service + "'", opts.data.byteLength); - // this will happen before 'data' is triggered - //newConn.write(opts.data); - }); + , servername: opts.servername + , data: opts.data + , remoteFamily: opts.family || conn.remoteFamily + , remoteAddress: opts.address || conn.remoteAddress + , remotePort: opts.port || conn.remotePort + }, function () { + //console.log("[=>] first packet from tunneler to '" + cid + "' as '" + opts.service + "'", opts.data.byteLength); + // this will happen before 'data' is triggered + //newConn.write(opts.data); + }); newConn.pipe(conn); conn.pipe(newConn); - } + } - return { - emit: function (type, conn) { - createConnection(conn); - } - }; + return { + emit: function (type, conn) { + createConnection(conn); + } + }; };