Evan Feenstra
4 years ago
20 changed files with 325 additions and 59 deletions
@ -1 +1 @@ |
|||
{"version":3,"file":"app.js","sourceRoot":"","sources":["../app.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAAkC;AAClC,0CAAyC;AACzC,iCAAgC;AAChC,8CAA6C;AAC7C,6BAA4B;AAC5B,+CAAuC;AACvC,mCAAoE;AACpE,6CAA4D;AAC5D,iDAAgD;AAChD,6CAA4C;AAC5C,yCAAwC;AACxC,qCAAiD;AACjD,mCAAkC;AAClC,yCAAwC;AACxC,+CAA6C;AAE7C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,mBAAU,EAAE,CAAA;AAC3B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,CAAC,cAAc,IAAI,IAAI,CAAA;AAE9D,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,CAAA;AAC3B,oCAAoC;AAEpC,OAAO,CAAC,GAAG,CAAC,sBAAsB,GAAG,YAAY,CAAA;AAEjD,eAAe;AACf,SAAe,KAAK;;QACnB,MAAM,qBAAa,EAAE,CAAA;QACrB,SAAS,EAAE,CAAA;QACX,IAAI,MAAM,CAAC,WAAW,EAAE;YACvB,qBAAe,CAAC,KAAK,CAAC,CAAA;SACtB;IACF,CAAC;CAAA;AACD,KAAK,EAAE,CAAA;AAEP,SAAe,SAAS;;QACvB,MAAM,QAAQ,EAAE,CAAA,CAAC,eAAe;QAChC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE;YAClC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;YAC9B,WAAW,EAAE,CAAA;QACd,CAAC,CAAC,CAAA,CAAC,YAAY;IAChB,CAAC;CAAA;AAED,SAAe,WAAW;;QACzB,MAAM,OAAO,CAAC,uBAAuB,EAAE,CAAA;QACvC,IAAI,MAA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,CAAA;SACb;aAAM;YACN,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,UAAgB,GAAG,EAAE,GAAG;;oBAC3C,MAAM,EAAE,GAAG,MAAM,eAAQ,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;oBACnC,IAAI,EAAE,EAAE;wBACP,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;wBACjC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;wBACrB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;wBACtB,OAAO,CAAC,IAAI,CAAC,CAAA;qBACb;gBACF,CAAC;aAAA,CAAC,CAAA;SACF;IAEF,CAAC,CAAA,CAAC,CAAA;AACH,CAAC"} |
After Width: | Height: | Size: 2.2 KiB |
@ -0,0 +1,89 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
|
|||
<head> |
|||
<style> |
|||
html { |
|||
font-family: Arial, Helvetica, sans-serif; |
|||
} |
|||
|
|||
body { |
|||
background: #292a2d; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
} |
|||
|
|||
.qr-wrap { |
|||
background: white; |
|||
width: 300px; |
|||
height: 300px; |
|||
border-radius: 5px; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
margin-top: 20px; |
|||
} |
|||
|
|||
canvas { |
|||
height: 280px; |
|||
width: 280px; |
|||
} |
|||
|
|||
pre { |
|||
margin-top: 20px; |
|||
border-radius: 10px; |
|||
max-width: 250px; |
|||
padding: 0px 25px; |
|||
border: 1px solid tan; |
|||
background: white; |
|||
overflow: hidden; |
|||
overflow-wrap: break-word; |
|||
display: block; |
|||
white-space: pre-wrap; |
|||
} |
|||
|
|||
img { |
|||
height: 100px; |
|||
width: 100px; |
|||
margin-top: 20px; |
|||
} |
|||
|
|||
p { |
|||
color: white; |
|||
margin-top: 30px; |
|||
max-width: 300px; |
|||
text-align: center; |
|||
} |
|||
</style> |
|||
</head> |
|||
|
|||
<body> |
|||
|
|||
<img src="/static/sphinx-logo.png" alt="logo" /> |
|||
|
|||
<div class="qr-wrap"> |
|||
<canvas id="qr"></canvas> |
|||
</div> |
|||
|
|||
<p> |
|||
Scan the QR or copy the connection string into your Sphinx app |
|||
</p> |
|||
|
|||
<pre> |
|||
CONNECTION_STRING |
|||
</pre> |
|||
|
|||
<script src="/static/js/qrious.js"></script> |
|||
<script> |
|||
(function () { |
|||
var qr = new QRious({ |
|||
element: document.getElementById('qr'), |
|||
value: 'CONNECTION_STRING', |
|||
size: 300 |
|||
}); |
|||
})(); |
|||
</script> |
|||
</body> |
|||
|
|||
</html> |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 43 KiB |
@ -1 +1 @@ |
|||
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/utils/config.ts"],"names":[],"mappings":";;AAAA,6BAA4B;AAE5B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAC1E,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;AAEvB,SAAgB,UAAU;IACxB,OAAO;QACL,SAAS,EAAE,GAAG,CAAC,SAAS,IAAI,MAAM,CAAC,SAAS;QAC5C,iBAAiB,EAAE,GAAG,CAAC,iBAAiB,IAAI,MAAM,CAAC,iBAAiB;QACpE,YAAY,EAAE,GAAG,CAAC,YAAY,IAAI,MAAM,CAAC,YAAY;QACrD,gBAAgB,EAAE,GAAG,CAAC,gBAAgB,IAAI,MAAM,CAAC,gBAAgB;QACjE,OAAO,EAAE,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO;QACtC,MAAM,EAAE,GAAG,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM;QACnC,kBAAkB,EAAE,GAAG,CAAC,kBAAkB,IAAI,MAA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CAAC,UAAU,IAAI,MAAM,CAAC,UAAU;KAChD,CAAA;AACH,CAAC;AA9BD,gCA8BC"} |
@ -0,0 +1,63 @@ |
|||
"use strict"; |
|||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { |
|||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } |
|||
return new (P || (P = Promise))(function (resolve, reject) { |
|||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } |
|||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } |
|||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } |
|||
step((generator = generator.apply(thisArg, _arguments || [])).next()); |
|||
}); |
|||
}; |
|||
Object.defineProperty(exports, "__esModule", { value: true }); |
|||
const publicIp = require("public-ip"); |
|||
const password_1 = require("../utils/password"); |
|||
const config_1 = require("./config"); |
|||
const fs = require('fs'); |
|||
const config = config_1.loadConfig(); |
|||
function getQR() { |
|||
return __awaiter(this, void 0, void 0, function* () { |
|||
let theIP; |
|||
const public_url = config.public_url; |
|||
if (public_url) |
|||
theIP = public_url; |
|||
if (!theIP) { |
|||
const ip = process.env.NODE_IP; |
|||
if (!ip) { |
|||
try { |
|||
theIP = yield publicIp.v4(); |
|||
} |
|||
catch (e) { } |
|||
} |
|||
else { |
|||
const port = config.node_http_port; |
|||
theIP = port ? `${ip}:${port}` : ip; |
|||
} |
|||
} |
|||
return Buffer.from(`ip::${theIP}::${password_1.default || ''}`).toString('base64'); |
|||
}); |
|||
} |
|||
exports.getQR = getQR; |
|||
function connect(req, res) { |
|||
return __awaiter(this, void 0, void 0, function* () { |
|||
fs.readFile("public/index.html", function (error, pgResp) { |
|||
return __awaiter(this, void 0, void 0, function* () { |
|||
if (error) { |
|||
res.writeHead(404); |
|||
res.write('Contents you are looking are Not Found'); |
|||
} |
|||
else { |
|||
console.log(pgResp, typeof pgResp); |
|||
const htmlString = Buffer.from(pgResp).toString(); |
|||
const qr = yield getQR(); |
|||
const rep = htmlString.replace(/CONNECTION_STRING/g, qr); |
|||
const final = Buffer.from(rep, 'utf8'); |
|||
res.writeHead(200, { 'Content-Type': 'text/html' }); |
|||
res.write(final); |
|||
} |
|||
res.end(); |
|||
}); |
|||
}); |
|||
}); |
|||
} |
|||
exports.connect = connect; |
|||
//# sourceMappingURL=connect.js.map
|
@ -0,0 +1 @@ |
|||
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../../src/utils/connect.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAqC;AACrC,gDAAwC;AACxC,qCAAmC;AACnC,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAExB,MAAM,MAAM,GAAG,mBAAU,EAAE,CAAA;AAE3B,SAAsB,KAAK;;QACzB,IAAI,KAAK,CAAA;QAET,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAA;QACpC,IAAI,UAAU;YAAE,KAAK,GAAG,UAAU,CAAA;QAElC,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAA;YAC9B,IAAI,CAAC,EAAE,EAAE;gBACP,IAAI;oBACF,KAAK,GAAG,MAAM,QAAQ,CAAC,EAAE,EAAE,CAAA;iBAC5B;gBAAC,OAAO,CAAC,EAAE,GAAG;aAChB;iBAAM;gBACL,MAAM,IAAI,GAAG,MAAM,CAAC,cAAc,CAAA;gBAClC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;aACpC;SACF;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,KAAK,KAAK,kBAAQ,IAAI,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC1E,CAAC;CAAA;AAlBD,sBAkBC;AAED,SAAsB,OAAO,CAAC,GAAG,EAAE,GAAG;;QACpC,EAAE,CAAC,QAAQ,CAAC,mBAAmB,EAAE,UAAgB,KAAK,EAAE,MAAM;;gBAC5D,IAAI,KAAK,EAAE;oBACT,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;oBACnB,GAAG,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;iBACrD;qBAAM;oBACL,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,MAAM,CAAC,CAAA;oBAClC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAA;oBACjD,MAAM,EAAE,GAAG,MAAM,KAAK,EAAE,CAAA;oBACxB,MAAM,GAAG,GAAG,UAAU,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAA;oBACxD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;oBACtC,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC,CAAC;oBACpD,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;iBAClB;gBACD,GAAG,CAAC,GAAG,EAAE,CAAC;YACZ,CAAC;SAAA,CAAC,CAAC;IACL,CAAC;CAAA;AAhBD,0BAgBC"} |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 2.2 KiB |
@ -0,0 +1,89 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
|
|||
<head> |
|||
<style> |
|||
html { |
|||
font-family: Arial, Helvetica, sans-serif; |
|||
} |
|||
|
|||
body { |
|||
background: #292a2d; |
|||
display: flex; |
|||
flex-direction: column; |
|||
align-items: center; |
|||
} |
|||
|
|||
.qr-wrap { |
|||
background: white; |
|||
width: 300px; |
|||
height: 300px; |
|||
border-radius: 5px; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
margin-top: 20px; |
|||
} |
|||
|
|||
canvas { |
|||
height: 280px; |
|||
width: 280px; |
|||
} |
|||
|
|||
pre { |
|||
margin-top: 20px; |
|||
border-radius: 10px; |
|||
max-width: 250px; |
|||
padding: 0px 25px; |
|||
border: 1px solid tan; |
|||
background: white; |
|||
overflow: hidden; |
|||
overflow-wrap: break-word; |
|||
display: block; |
|||
white-space: pre-wrap; |
|||
} |
|||
|
|||
img { |
|||
height: 100px; |
|||
width: 100px; |
|||
margin-top: 20px; |
|||
} |
|||
|
|||
p { |
|||
color: white; |
|||
margin-top: 30px; |
|||
max-width: 300px; |
|||
text-align: center; |
|||
} |
|||
</style> |
|||
</head> |
|||
|
|||
<body> |
|||
|
|||
<img src="/static/sphinx-logo.png" alt="logo" /> |
|||
|
|||
<div class="qr-wrap"> |
|||
<canvas id="qr"></canvas> |
|||
</div> |
|||
|
|||
<p> |
|||
Scan the QR or copy the connection string into your Sphinx app |
|||
</p> |
|||
|
|||
<pre> |
|||
CONNECTION_STRING |
|||
</pre> |
|||
|
|||
<script src="/static/js/qrious.js"></script> |
|||
<script> |
|||
(function () { |
|||
var qr = new QRious({ |
|||
element: document.getElementById('qr'), |
|||
value: 'CONNECTION_STRING', |
|||
size: 300 |
|||
}); |
|||
})(); |
|||
</script> |
|||
</body> |
|||
|
|||
</html> |
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 43 KiB |
@ -0,0 +1,44 @@ |
|||
import * as publicIp from 'public-ip' |
|||
import password from '../utils/password' |
|||
import {loadConfig} from './config' |
|||
const fs = require('fs') |
|||
|
|||
const config = loadConfig() |
|||
|
|||
export async function getQR():Promise<string> { |
|||
let theIP |
|||
|
|||
const public_url = config.public_url |
|||
if (public_url) theIP = public_url |
|||
|
|||
if (!theIP) { |
|||
const ip = process.env.NODE_IP |
|||
if (!ip) { |
|||
try { |
|||
theIP = await publicIp.v4() |
|||
} catch (e) { } |
|||
} else { |
|||
const port = config.node_http_port |
|||
theIP = port ? `${ip}:${port}` : ip |
|||
} |
|||
} |
|||
return Buffer.from(`ip::${theIP}::${password || ''}`).toString('base64') |
|||
} |
|||
|
|||
export async function connect(req, res) { |
|||
fs.readFile("public/index.html", async function (error, pgResp) { |
|||
if (error) { |
|||
res.writeHead(404); |
|||
res.write('Contents you are looking are Not Found'); |
|||
} else { |
|||
console.log(pgResp, typeof pgResp) |
|||
const htmlString = Buffer.from(pgResp).toString() |
|||
const qr = await getQR() |
|||
const rep = htmlString.replace(/CONNECTION_STRING/g, qr) |
|||
const final = Buffer.from(rep, 'utf8') |
|||
res.writeHead(200, { 'Content-Type': 'text/html' }); |
|||
res.write(final); |
|||
} |
|||
res.end(); |
|||
}); |
|||
} |
Loading…
Reference in new issue