From 5a34b39ff317246d564bd812a793f8238807ae1d Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 1 Jun 2018 09:29:48 +0000 Subject: [PATCH] important notes --- telebitd.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/telebitd.js b/telebitd.js index 63a5139..fbbf21c 100644 --- a/telebitd.js +++ b/telebitd.js @@ -244,6 +244,7 @@ module.exports.create = function (state) { if (!firstToken || firstToken === jwtoken) { firstToken = jwtoken; token.dynamicPorts = []; + token.dynamicNames = []; function onDynTcpReady() { var serviceport = this.address().port; @@ -252,8 +253,10 @@ module.exports.create = function (state) { Devices.add(state.deviceLists, serviceport, token); var hri = require('human-readable-ids').hri; var hrname = hri.random() + '.telebit.cloud'; + token.dynamicNames.push(hrname); // TODO restrict to authenticated device // TODO pull servername from config + // TODO remove hrname on disconnect Devices.add(state.deviceLists, hrname, token); sendTunnelMsg( null