Connect http/websockets node.js client using arbitrary duplex stream