This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var net = require("net"); | |
process.on("uncaughtException", function(error) { | |
console.error(error); | |
}); | |
if (process.argv.length != 5) { | |
console.log("usage: %s <localport> <remotehost> <remoteport>", process.argv[1]); | |
process.exit(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'), | |
cluster = require('cluster'); | |
var numCPUs = require('os').cpus().length; | |
var host = process.argv[2] || '3.0.0.2'; | |
var port = process.argv[3] || 80; | |
if (cluster.isMaster) { | |
// this is the master, so spawn workers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kernel sysctl configuration file for Red Hat Linux | |
# | |
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and | |
# sysctl.conf(5) for more details. | |
# Controls source route verification | |
net.ipv4.conf.default.rp_filter = 1 | |
# Do not accept source routing | |
net.ipv4.conf.default.accept_source_route = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'), | |
tls = require('tls'); | |
var host = process.argv[2] || '3.0.0.2'; | |
var port = process.argv[3] || 443; | |
var options = { | |
key: fs.readFileSync('./certs/serverA_512.key'), | |
cert: fs.readFileSync('./certs/serverA_512.crt'), | |
ca: [ |
NewerOlder