<commit_before>/* jshint node: true */
'use strict';

require('newrelic');
var args = process.argv,
    https = require('https'),
    fs = require('fs'),
    proxy = require('http-proxy').createProxy(),
    target,
    port,
    server;

// Get command line arguments.
target = args[2] || 'localhost';
port = parseInt(args[3]) || 443;

server = https.createServer({
    key: fs.readFileSync('/etc/ssl/server.key'),
    cert: fs.readFileSync('/etc/ssl/server.crt')
}, function(req, res) {
    // console.log(req);
    req.on('error', function(e) {
        console.log(e);
    });
    proxy.web(req, res, {'target': 'http://' + target});
    proxy.on('error', function(e) {
        res.statusCode = res.statusCode || 500;
        res.end();
    });
});

server.listen(port);
<commit_msg>Added cipher config to Node proxy.<commit_after>/* jshint node: true */
'use strict';

require('newrelic');
var args = process.argv,
    https = require('https'),
    fs = require('fs'),
    proxy = require('http-proxy').createProxy(),
    target,
    port,
    server;

// Get command line arguments.
target = args[2] || 'localhost';
port = parseInt(args[3]) || 443;

server = https.createServer({
    key: fs.readFileSync('/etc/ssl/server.key'),
    cert: fs.readFileSync('/etc/ssl/server.crt'),
    ciphers: 'AES128+EECDH:AES128+EDH'
}, function(req, res) {
    // console.log(req);
    req.on('error', function(e) {
        console.log(e);
    });
    proxy.web(req, res, {'target': 'http://' + target});
    proxy.on('error', function(e) {
        res.statusCode = res.statusCode || 500;
        res.end();
    });
});

server.listen(port);

{'fraction_non_alphanumeric': 0.20110361741263028, 'fraction_numerical': 0.0134886572654813, 'mean_word_length': 3.131645569620253, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4563468', 'n_tokens_mistral': 573, 'n_tokens_neox': 554, 'n_words': 113}