grant tcp, ssh, and https by default

This commit is contained in:
AJ ONeal 2018-06-01 09:04:58 +00:00
parent d0ae3a1c0f
commit 846590e648
2 changed files with 5 additions and 2 deletions

View File

@ -41,6 +41,7 @@
"cluster-store": "^2.0.8",
"finalhandler": "^1.1.1",
"greenlock": "^2.2.4",
"human-readable-ids": "^1.0.4",
"js-yaml": "^3.11.0",
"jsonwebtoken": "^8.2.1",
"proxy-packer": "^1.4.3",

View File

@ -250,12 +250,14 @@ module.exports.create = function (state) {
console.info('[DynTcpConn] Port', serviceport, 'now open for', token.deviceId);
token.dynamicPorts.push(serviceport);
Devices.add(state.deviceLists, serviceport, token);
var hri = require('human-readable-ids').hri;
sendTunnelMsg(
null
, [ 2
, 'grant'
, [ ['tcp', serviceport]
, ['https', 'ssh.test.telebit.cloud' ]
, [ ['tcp', 'tcp.telebit.cloud', serviceport]
, ['ssh', 'ssh.telebit.cloud', serviceport ]
, ['https', hri.random() + '.telebit.cloud' ]
]
]
, 'control'