There is generally three ways to inspect ssl connection:
- view at the client
- view at the server
- execute MitM
Pick any one you want.
Here's traffic dumping monkeypatch for server-side node v0.11.x:
var tmp = require('_http_server')._connectionListener
require('_http_server')._connectionListener = function(socket) {
socket.on('data', function(data) {
console.log(data.toString('utf8'))
})
var w = socket.write
socket.write = function(data) {
console.log(data.toString('utf8'))
w.apply(socket, arguments)
}
tmp.apply(this, arguments)
}