Implement remote assistance

- It enables a VPN via n2n
- Remote assistance will be automatically disabled after 1 day
- Optionally it's possible to give admin access to the support
This commit is contained in:
emanuele-f 2018-11-23 13:03:11 +01:00
parent 578e1362da
commit eac278a28d
19 changed files with 857 additions and 59 deletions

View file

@ -13,6 +13,7 @@ sendHTTPHeader('application/json')
local callback_utils = require("callback_utils")
local recording_utils = require("recording_utils")
local remote_assistance = require("remote_assistance")
local function userHasRestrictions()
local allowed_nets = ntop.getPref("ntopng.user." .. (_SESSION["user"] or "") .. ".allowed_nets")
@ -139,6 +140,14 @@ function dumpInterfaceStats(interface_name)
res["breed"] = stats["breeds"]
if remote_assistance.isAvailable() then
if remote_assistance.isEnabled() then
res["remote_assistance"] = {
status = remote_assistance.getStatus(),
}
end
end
if recording_utils.isAvailable() then
if recording_utils.isEnabled(ifstats.id) then
if recording_utils.isActive(ifstats.id) then