initial customizations

This commit is contained in:
Stanimir Stoyanov 2024-10-11 17:23:19 +03:00
parent e69fa4d01b
commit e41cf5014b
6 changed files with 11 additions and 21 deletions

View File

@ -232,7 +232,7 @@ public class AgentHubConnection : IAgentHubConnection, IDisposable
senderUsername,
senderConnectionId,
ScriptInputType.Terminal,
TimeSpan.FromSeconds(30),
TimeSpan.FromSeconds(30), // TODO
_hubConnection)
.ConfigureAwait(false);
}

View File

@ -29,8 +29,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shared", "Shared\Shared.csp
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Desktop.Linux", "Desktop.Linux\Desktop.Linux.csproj", "{FF7FD66A-B3E2-4D39-A457-A00C94EDE9E6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Desktop.Win", "Desktop.Win\Desktop.Win.csproj", "{6B726FC4-A907-4813-BF38-3342E02AA8D2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server.Tests", "Tests\Server.Tests\Server.Tests.csproj", "{48D9D0E6-5781-44A9-84C0-56F56C2A1193}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LoadTester", "Tests\LoadTester\LoadTester.csproj", "{6C25240C-613D-4A86-A04E-784BA6726094}"
@ -108,18 +106,6 @@ Global
{FF7FD66A-B3E2-4D39-A457-A00C94EDE9E6}.Release|x64.Build.0 = Release|x64
{FF7FD66A-B3E2-4D39-A457-A00C94EDE9E6}.Release|x86.ActiveCfg = Release|x86
{FF7FD66A-B3E2-4D39-A457-A00C94EDE9E6}.Release|x86.Build.0 = Release|x86
{6B726FC4-A907-4813-BF38-3342E02AA8D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6B726FC4-A907-4813-BF38-3342E02AA8D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B726FC4-A907-4813-BF38-3342E02AA8D2}.Debug|x64.ActiveCfg = Debug|x64
{6B726FC4-A907-4813-BF38-3342E02AA8D2}.Debug|x64.Build.0 = Debug|x64
{6B726FC4-A907-4813-BF38-3342E02AA8D2}.Debug|x86.ActiveCfg = Debug|x86
{6B726FC4-A907-4813-BF38-3342E02AA8D2}.Debug|x86.Build.0 = Debug|x86
{6B726FC4-A907-4813-BF38-3342E02AA8D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B726FC4-A907-4813-BF38-3342E02AA8D2}.Release|Any CPU.Build.0 = Release|Any CPU
{6B726FC4-A907-4813-BF38-3342E02AA8D2}.Release|x64.ActiveCfg = Release|x64
{6B726FC4-A907-4813-BF38-3342E02AA8D2}.Release|x64.Build.0 = Release|x64
{6B726FC4-A907-4813-BF38-3342E02AA8D2}.Release|x86.ActiveCfg = Release|x86
{6B726FC4-A907-4813-BF38-3342E02AA8D2}.Release|x86.Build.0 = Release|x86
{48D9D0E6-5781-44A9-84C0-56F56C2A1193}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48D9D0E6-5781-44A9-84C0-56F56C2A1193}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48D9D0E6-5781-44A9-84C0-56F56C2A1193}.Debug|x64.ActiveCfg = Debug|x64

View File

@ -104,7 +104,9 @@ public class ScriptingController : ControllerBase
command,
User?.Identity?.Name ?? "API Key");
var success = await WaitHelper.WaitForAsync(() => AgentHub.ApiScriptResults.TryGetValue(requestID, out _), TimeSpan.FromSeconds(30));
var success = await WaitHelper.WaitForAsync(
() => AgentHub.ApiScriptResults.TryGetValue(requestID, out _),
TimeSpan.FromSeconds(30)); // TODO
if (!success)
{
return NotFound();

View File

@ -339,9 +339,9 @@ public class AgentHub : Hub<IAgentHubClient>
await _messenger.Send(message, $"{result.Value.SenderConnectionID}");
}
public void ScriptResultViaApi(string commandID, string requestID)
public void ScriptResultViaApi(string requestID) // PROBLEMATIC
{
ApiScriptResults.Set(requestID, commandID, DateTimeOffset.Now.AddHours(1));
ApiScriptResults.Set(requestID, requestID, DateTimeOffset.Now.AddHours(1));
}
public Task SendConnectionFailedToViewers(List<string> viewerIDs)

View File

@ -11,13 +11,15 @@ networks:
services:
remotely:
image: immybot/remotely:latest
build:
context: ../
dockerfile: ./Server/Dockerfile
container_name: remotely
volumes:
- /var/www/remotely:/app/AppData
- /home/bot/remotely:/app/AppData
restart: unless-stopped
ports:
- "5000:5000"
- "5001:5000"
networks:
- remotely
environment: