| 1253 | int BridgeApp::ticks() { return QDateTime::currentSecsSinceEpoch(); } |
| 1254 | |
| 1255 | QJSValue BridgeApp::tunnels() |
| 1256 | { |
| 1257 | QVariantMap list; |
| 1258 | auto tunnels = scriptEngine->manager()->GetTunnels(); |
| 1259 | |
| 1260 | for (const auto& tun : tunnels) { |
| 1261 | QVariantMap map; |
| 1262 | map["id"] = tun.TunnelId; |
| 1263 | map["agent_id"] = tun.AgentId; |
| 1264 | map["username"] = tun.Username; |
| 1265 | map["computer"] = tun.Computer; |
| 1266 | map["process"] = tun.Process; |
| 1267 | map["type"] = tun.Type; |
| 1268 | map["info"] = tun.Info; |
| 1269 | map["interface"] = tun.Interface; |
| 1270 | map["port"] = tun.Port; |
| 1271 | map["client"] = tun.Client; |
| 1272 | map["f_port"] = tun.Fport; |
| 1273 | map["f_host"] = tun.Fhost; |
| 1274 | list[tun.TunnelId] = map; |
| 1275 | } |
| 1276 | |
| 1277 | return this->scriptEngine->engine()->toScriptValue(list); |
| 1278 | } |
| 1279 | |
| 1280 | QJSValue BridgeApp::validate_command(const QString &id, const QString &command) const |
| 1281 | { |
nothing calls this directly
no test coverage detected