grant tcp, ssh, and https by default
This commit is contained in:
parent
d0ae3a1c0f
commit
846590e648
|
@ -41,6 +41,7 @@
|
||||||
"cluster-store": "^2.0.8",
|
"cluster-store": "^2.0.8",
|
||||||
"finalhandler": "^1.1.1",
|
"finalhandler": "^1.1.1",
|
||||||
"greenlock": "^2.2.4",
|
"greenlock": "^2.2.4",
|
||||||
|
"human-readable-ids": "^1.0.4",
|
||||||
"js-yaml": "^3.11.0",
|
"js-yaml": "^3.11.0",
|
||||||
"jsonwebtoken": "^8.2.1",
|
"jsonwebtoken": "^8.2.1",
|
||||||
"proxy-packer": "^1.4.3",
|
"proxy-packer": "^1.4.3",
|
||||||
|
|
|
@ -250,12 +250,14 @@ module.exports.create = function (state) {
|
||||||
console.info('[DynTcpConn] Port', serviceport, 'now open for', token.deviceId);
|
console.info('[DynTcpConn] Port', serviceport, 'now open for', token.deviceId);
|
||||||
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;
|
||||||
sendTunnelMsg(
|
sendTunnelMsg(
|
||||||
null
|
null
|
||||||
, [ 2
|
, [ 2
|
||||||
, 'grant'
|
, 'grant'
|
||||||
, [ ['tcp', serviceport]
|
, [ ['tcp', 'tcp.telebit.cloud', serviceport]
|
||||||
, ['https', 'ssh.test.telebit.cloud' ]
|
, ['ssh', 'ssh.telebit.cloud', serviceport ]
|
||||||
|
, ['https', hri.random() + '.telebit.cloud' ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
, 'control'
|
, 'control'
|
||||||
|
|
Loading…
Reference in New Issue