node-tcp-proxy
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"main": "index.js", | ||
@@ -8,0 +8,0 @@ "repository": { |
#!/usr/bin/env node | ||
var argv = require("commander"); | ||
var packageConfig = require('./package.json'); | ||
argv | ||
.usage("[options]") | ||
.version("0.0.9") | ||
.version(packageConfig.version) | ||
.option("-p, --proxyPort <number>", "Proxy port number", parseInt) | ||
@@ -13,3 +13,6 @@ .option("-h, --hostname [name]", "Name or IP address of host") | ||
.option("-q, --q", "Be quiet") | ||
.option("-t, --tls [both]", "Use TLS", false) | ||
.option("-t, --tls [both]", "Use TLS 1.2 with clients; " + | ||
"specify both to also use TLS 1.2 with service", false) | ||
.option("-u, --rejectUnauthorized [value]", | ||
"Do not accept invalid certificate", false) | ||
.option("-c, --pfx [file]", "Private key file", | ||
@@ -24,3 +27,4 @@ require.resolve("./cert.pfx")) | ||
quiet: argv.q, | ||
tls: argv.tls, | ||
tls: argv.tls, | ||
rejectUnauthorized: argv.rejectUnauthorized !== "false", | ||
pfx: argv.pfx, | ||
@@ -27,0 +31,0 @@ passphrase: argv.passphrase |
@@ -31,3 +31,4 @@ var net = require("net"); | ||
pfx: fs.readFileSync(proxy.options.pfx), | ||
passphrase: proxy.options.passphrase | ||
passphrase: proxy.options.passphrase, | ||
secureProtocol: "TLSv1_2_method" | ||
}; | ||
@@ -73,3 +74,4 @@ proxy.server = tls.createServer(tlsOptions, function(socket) { | ||
tls.connect(proxy.servicePort, proxy.serviceHost, { | ||
rejectUnauthorized: proxy.options.rejectUnauthorized | ||
rejectUnauthorized: proxy.options.rejectUnauthorized, | ||
secureProtocol: "TLSv1_2_method" | ||
}, function() { | ||
@@ -76,0 +78,0 @@ proxy.writeBuffer(context); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12352
168