diff --git a/lib/cli/local/index.js b/lib/cli/local/index.js index 4e1b0b97..e1b2e92c 100644 --- a/lib/cli/local/index.js +++ b/lib/cli/local/index.js @@ -40,6 +40,10 @@ module.exports.builder = function(yargs) { , type: 'number' , default: 7105 }) + .option('app-url', { + describe: 'Publicly accessible URL to the app unit.' + , type: 'string' + }) .option('auth-options', { describe: 'JSON array of options to pass to the auth unit.' , type: 'string' @@ -166,6 +170,11 @@ module.exports.builder = function(yargs) { , type: 'boolean' , default: true }) + .option('screen-ws-url-pattern', { + describe: 'Publicly accessible URL pattern to use for the screen WebSocket.' + , type: 'string' + , default: 'ws://${publicIp}:${publicPort}' + }) .option('serial', { describe: 'Only use devices with these serial numbers.' , type: 'array' @@ -213,6 +222,10 @@ module.exports.builder = function(yargs) { , type: 'number' , default: 7110 }) + .option('websocket-url', { + describe: 'Publicly accessible URL to the websocket unit.' + , type: 'string' + }) .epilog('Each option can be be overwritten with an environment variable ' + 'by converting the option to uppercase, replacing dashes with ' + 'underscores and prefixing it with `STF_LOCAL_` (e.g. ' + @@ -288,6 +301,7 @@ module.exports.handler = function(argv) { , '--adb-port', argv.adbPort , '--vnc-initial-size', argv.vncInitialSize.join('x') , '--mute-master', argv.muteMaster + , '--screen-ws-url-pattern', argv.screenWsUrlPattern ] .concat(argv.allowRemote ? ['--allow-remote'] : []) .concat(argv.lockRotation ? ['--lock-rotation'] : []) @@ -300,7 +314,7 @@ module.exports.handler = function(argv) { util.format('auth-%s', argv.authType) , '--port', argv.authPort , '--secret', argv.authSecret - , '--app-url', util.format( + , '--app-url', argv.appUrl || util.format( 'http://%s:%d/' , argv.publicIp , argv.port @@ -321,7 +335,7 @@ module.exports.handler = function(argv) { , saml2: 'saml' }[argv.authType] || argv.authType ) - , '--websocket-url', util.format( + , '--websocket-url', argv.websocketUrl || util.format( 'http://%s:%d/' , argv.publicIp , argv.websocketPort