enable forwarding of random domain
This commit is contained in:
parent
ebe4003d27
commit
22339275bb
|
@ -251,15 +251,18 @@ module.exports.create = function (state) {
|
||||||
token.dynamicPorts.push(serviceport);
|
token.dynamicPorts.push(serviceport);
|
||||||
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();
|
var hrname = hri.random() + '.telebit.cloud';
|
||||||
|
// TODO restrict to authenticated device
|
||||||
|
// TODO pull servername from config
|
||||||
|
Devices.add(state.deviceLists, hrname, token);
|
||||||
sendTunnelMsg(
|
sendTunnelMsg(
|
||||||
null
|
null
|
||||||
, [ 2
|
, [ 2
|
||||||
, 'grant'
|
, 'grant'
|
||||||
, [ ['ssh+https', hrname + '.telebit.cloud', 443 ]
|
, [ ['ssh+https', hrname, 443 ]
|
||||||
, ['ssh', 'ssh.telebit.cloud', serviceport ]
|
, ['ssh', 'ssh.telebit.cloud', serviceport ]
|
||||||
, ['tcp', 'tcp.telebit.cloud', serviceport]
|
, ['tcp', 'tcp.telebit.cloud', serviceport]
|
||||||
, ['https', hrname + '.telebit.cloud' ]
|
, ['https', hrname ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
, 'control'
|
, 'control'
|
||||||
|
|
Loading…
Reference in New Issue