mirror of
https://git.coolaj86.com/coolaj86/telebit-relay.js.git
synced 2025-04-22 03:20:37 +00:00
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…
x
Reference in New Issue
Block a user