important notes
This commit is contained in:
parent
22339275bb
commit
5a34b39ff3
|
@ -244,6 +244,7 @@ module.exports.create = function (state) {
|
||||||
if (!firstToken || firstToken === jwtoken) {
|
if (!firstToken || firstToken === jwtoken) {
|
||||||
firstToken = jwtoken;
|
firstToken = jwtoken;
|
||||||
token.dynamicPorts = [];
|
token.dynamicPorts = [];
|
||||||
|
token.dynamicNames = [];
|
||||||
|
|
||||||
function onDynTcpReady() {
|
function onDynTcpReady() {
|
||||||
var serviceport = this.address().port;
|
var serviceport = this.address().port;
|
||||||
|
@ -252,8 +253,10 @@ module.exports.create = function (state) {
|
||||||
Devices.add(state.deviceLists, serviceport, token);
|
Devices.add(state.deviceLists, serviceport, token);
|
||||||
var hri = require('human-readable-ids').hri;
|
var hri = require('human-readable-ids').hri;
|
||||||
var hrname = hri.random() + '.telebit.cloud';
|
var hrname = hri.random() + '.telebit.cloud';
|
||||||
|
token.dynamicNames.push(hrname);
|
||||||
// TODO restrict to authenticated device
|
// TODO restrict to authenticated device
|
||||||
// TODO pull servername from config
|
// TODO pull servername from config
|
||||||
|
// TODO remove hrname on disconnect
|
||||||
Devices.add(state.deviceLists, hrname, token);
|
Devices.add(state.deviceLists, hrname, token);
|
||||||
sendTunnelMsg(
|
sendTunnelMsg(
|
||||||
null
|
null
|
||||||
|
|
Loading…
Reference in New Issue