From 4a2199dc7156ac13516fc418afc201ffaf56180b Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 24 Apr 2018 16:34:51 +0000 Subject: [PATCH] begin install script --- bin/generate-secret.js | 4 ++++ bin/install-stunneld-js.sh | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 bin/generate-secret.js create mode 100644 bin/install-stunneld-js.sh diff --git a/bin/generate-secret.js b/bin/generate-secret.js new file mode 100755 index 0000000..003b247 --- /dev/null +++ b/bin/generate-secret.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +'use strict' + +console.log(require('crypto').randomBytes(16).toString('hex')); diff --git a/bin/install-stunneld-js.sh b/bin/install-stunneld-js.sh new file mode 100644 index 0000000..38620ce --- /dev/null +++ b/bin/install-stunneld-js.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +rm -rf ./node-installer.sh +curl -fsSL bit.ly/node-installer -o ./node-installer.sh +bash ./node-installer.sh --dev-deps + +git clone https://git.coolaj86.com/coolaj86/tunnel-server.js.git +pushd tunnel-server.js/ + npm install + my_secret=$(node bin/generate-secret.js) + echo "Your secret is:\n\n\t"$my_secret + echo "node bin/server.js --servernames tunnel.example.com --secret $my_secret" +popd