add /api/tunnels/:id/status endpoint

Provides connected_sockets information for a tunnel.
This commit is contained in:
Roman Shtylman
2018-05-16 16:41:05 -04:00
parent 317db73bdc
commit cf070d4ce9
7 changed files with 89 additions and 11 deletions

View File

@@ -39,6 +39,12 @@ class TunnelAgent extends Agent {
this.closed = false;
}
stats() {
return {
connectedSockets: this.connectedSockets,
};
}
listen() {
const server = this.server;
if (this.started) {