Skip to content

Commit

Permalink
Release 1.0.3
Browse files Browse the repository at this point in the history
- Added ability to password protect HTTPs tunnels
- More secure manifest creation for private builds
  • Loading branch information
biocross committed Jul 5, 2018
1 parent e2f0650 commit 66fec1e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
13 changes: 10 additions & 3 deletions librarian.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,18 @@ program
let tunnelURL;

try {
let options = { addr: webPort, region: 'ap' };

if (prefs.ngrok_token && prefs.ngrok_token !== "") {
tunnelURL = await ngrok.connect({ authtoken: prefs.ngrok_token, addr: webPort });
} else {
tunnelURL = await ngrok.connect({ addr: webPort });
options.authtoken = prefs.ngrok_token;
}

if (prefs.private_web) {
options.auth = `${prefs.web_username}:${prefs.web_password}`
}

tunnelURL = await ngrok.connect(options);

} catch (error) {
log(JSON.stringify(error));
fatalError("\nFailed to start the ngrok tunnel.\nPlease make sure your ngRok token is valid.");
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "librarian-server",
"version": "1.0.2",
"version": "1.0.3",
"description": "Librarian is a local server for your iOS & Android builds, cause local is best!",
"homepage": "https://github.com/biocross/Librarian",
"repository": "https://github.com/biocross/Librarian",
Expand Down
18 changes: 18 additions & 0 deletions setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,24 @@ const setupQuestions = [
message: 'Which port should the Librarian Website run at? (Default: 5000)',
default: '5000'
},
{
type: 'confirm',
name: 'private_web',
message: 'Do you want Librarian\'s Website to be password protected (when accessed over the internet)?',
default: false
},
{
type: 'input',
name: 'web_username',
message: 'Please enter the username for the web interface:',
when: (answers) => { return answers.private_web === true; }
},
{
type: 'input',
name: 'web_password',
message: 'Please enter the password for the web interface:',
when: (answers) => { return answers.private_web === true; }
},
{
type: 'confirm',
name: 'existing_token',
Expand Down

0 comments on commit 66fec1e

Please sign in to comment.