diff --git a/bin/stunnel.js b/bin/stunnel.js index 5eaf513..9812114 100755 --- a/bin/stunnel.js +++ b/bin/stunnel.js @@ -80,7 +80,8 @@ program program.url = url; }) .option('-k --insecure', 'Allow TLS connections to stunneld without valid certs (rejectUnauthorized: false)') - .option('--locals ', 'comma separated list of :: to which matching incoming http and https should forward (reverse proxy). Ex: https://john.example.com,tls:*:1337', collectProxies, [ ]) // --reverse-proxies + .option('--locals ', 'comma separated list of : to which matching incoming http and https should forward (reverse proxy). Ex: https:8443,smtps:8465', collectProxies, [ ]) // --reverse-proxies + .option('--domains ', 'comma separated list of domain names to set to the tunnel (to caputer a specific protocol to a specific local port use the format https:example.com:1337 instead). Ex: example.com,example.net', collectProxies, [ ]) .option('--device [HOSTNAME]', 'Tunnel all domains associated with this device instead of specific domainnames. Use with --locals :*:. Ex: macbook-pro.local (the output of `hostname`)') .option('--stunneld ', 'the domain (or ip address) at which you are running stunneld.js (the proxy)') // --proxy .option('--secret ', 'the same secret used by stunneld (used for JWT authentication)') @@ -179,6 +180,8 @@ function daplieTunnel() { } var domainsMap = {}; + +program.locals = program.locals.concat(program.domains); program.locals.forEach(function (proxy) { domainsMap[proxy.hostname] = true; });