<commit_before>var stream = require('stream');
var util = require('util');
var timers = require('timers');
var http = require('http');

var debug = util.debuglog('net');

var proxy = {
	protocol: (window.location.protocol == 'https:') ? 'wss' : 'ws',
	hostname: window.location.hostname,
	port: window.location.port,
        url: '/api/vm/net'
};
function getProxy() {
	return proxy;
}
function getProxyHost() {
	var host = getProxy().hostname;
	if (getProxy().port) {
		host += ':'+getProxy().port;
	}
	return host;
}
function getProxyOrigin() {
	return getProxy().protocol + '://' + getProxyHost();
}
exports.setProxy = function (options) {
	options = options || {};

	proxy.protocol = options.protocol;
	proxy.hostname = options.hostname;
	proxy.port = options.port;
        if (options.url) {
            proxy.url = options.url;
        }
};

exports.createServer = function () {
	throw new Error('Cannot create server in a browser');
};

exports.connect = exports.createConnection = function (/* options, connectListener */) {<commit_msg>Make all args in setProxy() optionnal<commit_after>var stream = require('stream');
var util = require('util');
var timers = require('timers');
var http = require('http');

var debug = util.debuglog('net');

var proxy = {
	protocol: (window.location.protocol == 'https:') ? 'wss' : 'ws',
	hostname: window.location.hostname,
	port: window.location.port,
        url: '/api/vm/net'
};
function getProxy() {
	return proxy;
}
function getProxyHost() {
	var host = getProxy().hostname;
	if (getProxy().port) {
		host += ':'+getProxy().port;
	}
	return host;
}
function getProxyOrigin() {
	return getProxy().protocol + '://' + getProxyHost();
}
exports.setProxy = function (options) {
	options = options || {};

	if (proxy.protocol) {
            proxy.protocol = options.protocol;
        }
        if (proxy.hostname) {
    	    proxy.hostname = options.hostname;
        }
        if (proxy.port) {
    	    proxy.port = options.port;
        }
        if (options.url) {
            proxy.url = options.url;
        }
};

exports.createServer = function () {
	throw new Error('Cannot create server in a browser');
};

exports.connect = exports.createConnection = function (/* options, connectListener */) {
{'fraction_non_alphanumeric': 0.16414590747330962, 'fraction_numerical': 0.0, 'mean_word_length': 3.418467583497053, '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': '2909038', 'n_tokens_mistral': 695, 'n_tokens_neox': 701, 'n_words': 167}