use sharedDomain from config

This commit is contained in:
AJ ONeal 2018-06-15 06:13:26 +00:00
parent 13a9e77998
commit c8c06d1b99
1 changed files with 3 additions and 3 deletions

View File

@ -264,7 +264,7 @@ 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() + '.telebit.cloud'; //var hrname = hri.random() + '.' + state.config.sharedDomain;
//token.dynamicNames.push(hrname); //token.dynamicNames.push(hrname);
// TODO restrict to authenticated device // TODO restrict to authenticated device
// TODO pull servername from config // TODO pull servername from config
@ -275,8 +275,8 @@ module.exports.create = function (state) {
, [ 2 , [ 2
, 'grant' , 'grant'
, [ ['ssh+https', token.domains[0], 443 ] , [ ['ssh+https', token.domains[0], 443 ]
, ['ssh', 'ssh.telebit.cloud', serviceport ] , ['ssh', 'ssh.' + state.config.sharedDomain, serviceport ]
, ['tcp', 'tcp.telebit.cloud', serviceport] , ['tcp', 'tcp.' + state.config.sharedDomain, serviceport]
, ['https', token.domains[0] ] , ['https', token.domains[0] ]
] ]
] ]