diff --git a/backend/README.md b/backend/README.md
index deda57d..efba2f1 100644
--- a/backend/README.md
+++ b/backend/README.md
@@ -1,67 +1,90 @@
-# Network resurrector
+# Network Resurrector
-Everything must be able to be managed remotely. Even the powered off servers. That's how Network resurrector appeared, the tool I wrote specifically to be able to wake up my machines that I don't need to be powered on all the time.
+Everything should be manageable remotely—even powered-off servers. This need led to the creation of **Network Resurrector**, a tool I developed to wake up machines that don't need to be powered on at all times.
-Network Resurrector is a system that comprises of five essential services which allow for the execution of its core functionality. To enable various additional features, such as the notification mechanism, supplementary components may be added to the system as an option.
+The system consists of five core components that provide essential functionality. Additional components can be integrated to enhance features like notifications and logging.
-## Main components
+## Core Components
### Frontend
-* The [frontend](https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector-frontend) component is a web application written in React JS that has the role of providing the user with a friendly visual interface through which to interact with the system.
+The [frontend](https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector-frontend) is a **React.js**-based web application that provides a user-friendly interface for managing the system.
### API
-* The API component is a .NET 6 REST API that has the role of mediating the exchange of data and commands between the frontend component and the database or server component.
-
-### Server
-* The server component is a .NET 6 service specialized in executing 'WakeOnLAN', 'Ping' and 'Shutdown' actions for the machines in its network.
+The API is a **.NET 8 REST API** responsible for handling communication between the frontend, database, and server components. It facilitates data exchange and enables actions such as waking or shutting down machines.
+
+### Server
+The server component is a **.NET 8** service that performs **Wake-on-LAN**, **Ping**, and **Shutdown** actions for machines within its network or any accessible network.
### Agent
-* The agent is a .NET 6 service specialized in executing 'Shutdown', 'Restart', 'Sleep', 'Logout' and 'Lock' actions on the host machine on which it is installed. Each action can be executed at the time of launch or with a certain delay. If an action is requested with a delay and later the user changes his mind, he can cancel the action by executing the separate 'Cancel' type action.
-* The need for the agent appeared after I realized that the server cannot perform any action on a machine, being outside of it.
-* The agent solves this problem because it is installed directly on the targeted machine. Later, the API component can delegate the resolution of an action directly to the agent.
-* Most of the time, the execution flow of an action is realized in the following way:
- * The user initiates an action, such as starting or stopping a machine, by pressing the corresponding button in the user interface.
- * The frontend component sends the command to the API.
- * The API checks who is configured as performer for the respective action for the machine and sends the command to it.
- * The performer of the action (Agent or Server) executes the command and responds on the flow with status.
- * In most cases, the Server component handles the machine startup action while the Agent component manages the machine shutdown action.
-* As is probably already obvious, the agent can be installed on as many machines as desired.
+The agent is a **.NET 8** service that can execute various power-related actions on the host machine, including:
+- **Shutdown**
+- **Restart**
+- **Sleep**
+- **Logout**
+- **Lock**
+
+These actions can be executed immediately or scheduled with a delay, allowing cancellation before execution.
+
+#### How It Works
+1. A user triggers an action (e.g., wake or shutdown) via the UI.
+2. The frontend sends the request to the API.
+3. The API determines whether the **Agent** or **Server** should execute the action and forwards the request.
+4. The responsible component executes the action and returns the result.
+
+The agent can be installed on multiple machines as needed.
### Tuitio
-* [Tuitio](https://lab.code-rove.com/gitea/tudor.stanciu/tuitio) is my personal identity server. It manages user authentication within the application and authorizes requests made by it. Further information about [Tuitio](https://lab.code-rove.com/gitea/tudor.stanciu/tuitio/src/branch/master/README.md) can be found on its dedicated page.
+[Tuitio](https://lab.code-rove.com/gitea/tudor.stanciu/tuitio) is my personal identity server, handling user authentication and request authorization. For more details, refer to the [Tuitio documentation](https://lab.code-rove.com/gitea/tudor.stanciu/tuitio/src/branch/master/README.md).
-All communication between the five main components is done exclusively through HTTP.
+All communication between the core components is done via **HTTP**.
-## Secondary components
+## Secondary Components
-* NATS Streaming - Used to publish notifications about executed actions.
-* Correo - Used to send by email the notifications generated by the system.
-* Seq - Used to collect and view system logs.
+- **NATS Streaming**: Publishes notifications regarding executed actions.
+- **Correo**: Handles email notifications.
+- **Seq**: Collects and displays system logs.
-## Notification system
+## Notification System
-The notification system is focused on system actions (Wake, Shutdown, etc), and the configuration of notifications is done in structures of the following form:
+The notification system is designed to inform users about system actions (e.g., wake, shutdown). Notifications are configurable and follow a customizable template structure, as shown below:
-```
+```json
{
"To": [ "user@homelab.com" ],
- "Subject": "Network resurrector: Machine {MACHINE_NAME} has been waked. Status: {ACTION_STATUS}",
- "Body": "Hello,{NEWLINE:2}Network resurrector processed a command to start machine {MACHINE_FULLNAME} with IP {MACHINE_IP} at {SYSTEM_DATETIME}.{NEWLINE}The performer who was delegated for this action was {ACTION_PERFORMER}.{NEWLINE}Action status: {ACTION_STATUS}{NEWLINE:2}Have a nice day,{NEWLINE}Network resurrector notification system."
+ "Subject": "Network Resurrector: Machine {MACHINE_NAME} has been powered on. Status: {ACTION_STATUS}",
+ "Body": "Hello,{NEWLINE:2}Network Resurrector processed a command to start machine {MACHINE_FULLNAME} with IP {MACHINE_IP} at {SYSTEM_DATETIME}.{NEWLINE}The assigned performer for this action was {ACTION_PERFORMER}.{NEWLINE}Action status: {ACTION_STATUS}{NEWLINE:2}Best regards,{NEWLINE}Network Resurrector Notification System."
}
```
-The texts can be written at the user's free choice, and the following placeholders can be used in their composition: ```{MACHINE_NAME}```, ```{MACHINE_FULLNAME}```, ```{MACHINE_IP}```, ```{ACTION_STATUS}```, ```{ACTION_PERFORMER}```, ```{SYSTEM_DATETIME}```, ```{ERROR_MESSGE}```, ```{NEWLINE}```, ```{NEWLINE:2}```
+### Placeholders
-```{NEWLINE:x}``` is a dynamic placeholder. Any number can be written in place of the 'x' character and the notification system will add that many new lines.
+Users can customize notification texts using the following placeholders:
+
+- `{MACHINE_NAME}`
+- `{MACHINE_FULLNAME}`
+- `{MACHINE_IP}`
+- `{ACTION_STATUS}`
+- `{ACTION_PERFORMER}`
+- `{SYSTEM_DATETIME}`
+- `{ERROR_MESSAGE}`
+- `{NEWLINE}` (Adds a single newline)
+- `{NEWLINE:x}` (Adds `x` new lines)
## Database
-Currently, the database server supported by the system is only Microsoft SQL Server. In the following versions, the system will also be compatible with PostgreSQL and SQLite.
+
+Currently, **Microsoft SQL Server** is the only supported database. Future versions will include support for **PostgreSQL** and **SQLite**.
## Logging
-The logging functionality is managed with Serilog, and its configuration is done in the ```appsettings.json``` file. In addition to its standard configuration, Network resurrector also has a preconfigured area where two destinations for logs are available: SqlServer database and Seq. Each of the destinations can be activated or not. If logging in the console is sufficient, all additional logging destinations can be disabled.
-This configuration area is:
-```
+Logging is managed with **Serilog**, configurable via `appsettings.json`. Logs can be stored in:
+- **SQL Server**
+- **Seq**
+
+These logging destinations can be enabled or disabled based on requirements. If console logging is sufficient, all additional logging can be disabled.
+
+### Configuration Example
+
+```json
"Logs": {
"SqlServer": {
"Enabled": false,
@@ -76,4 +99,6 @@ This configuration area is:
```
## Hosting
-All the components of the system are written in cross-platform technologies, so its host can be any environment.
\ No newline at end of file
+
+All components of **Network Resurrector** are built using cross-platform technologies, allowing deployment in any environment that supports them.
+
diff --git a/backend/dependencies.props b/backend/dependencies.props
index cb965a6..fbd54b9 100644
--- a/backend/dependencies.props
+++ b/backend/dependencies.props
@@ -1,20 +1,19 @@
- 6.0.0
- 6.0.1
- 6.1.0
- 5.2.2
- 5.6.1
- 12.0.1
- 12.0.0
- 9.0.0
- 6.0.30
- 6.0.1
- 1.0.7
- 2.2.1
- 1.2.0
- 1.0.1
- 1.0.1
+ 8.0.0
+ 8.0.1
+ 8.0.3
+ 8.0.0
+ 8.2.0
+ 14.0.0
+ 12.4.1
+ 8.0.4
+ 8.0.14
+ 1.1.0
+ 2.3.0
+ 1.3.0
+ 1.1.0
+ 1.1.0
4.2.2
\ No newline at end of file
diff --git a/backend/src/agent/NetworkResurrector.Agent.Application/NetworkResurrector.Agent.Application.csproj b/backend/src/agent/NetworkResurrector.Agent.Application/NetworkResurrector.Agent.Application.csproj
index 6f35d26..5175f1d 100644
--- a/backend/src/agent/NetworkResurrector.Agent.Application/NetworkResurrector.Agent.Application.csproj
+++ b/backend/src/agent/NetworkResurrector.Agent.Application/NetworkResurrector.Agent.Application.csproj
@@ -1,16 +1,16 @@
- net6.0
+ net8.0
+
-
-
-
-
+
+
+
diff --git a/backend/src/agent/NetworkResurrector.Agent.Domain/NetworkResurrector.Agent.Domain.csproj b/backend/src/agent/NetworkResurrector.Agent.Domain/NetworkResurrector.Agent.Domain.csproj
index dbc1517..58990cd 100644
--- a/backend/src/agent/NetworkResurrector.Agent.Domain/NetworkResurrector.Agent.Domain.csproj
+++ b/backend/src/agent/NetworkResurrector.Agent.Domain/NetworkResurrector.Agent.Domain.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
diff --git a/backend/src/agent/NetworkResurrector.Agent.PublishedLanguage/NetworkResurrector.Agent.PublishedLanguage.csproj b/backend/src/agent/NetworkResurrector.Agent.PublishedLanguage/NetworkResurrector.Agent.PublishedLanguage.csproj
index 4c35683..826546c 100644
--- a/backend/src/agent/NetworkResurrector.Agent.PublishedLanguage/NetworkResurrector.Agent.PublishedLanguage.csproj
+++ b/backend/src/agent/NetworkResurrector.Agent.PublishedLanguage/NetworkResurrector.Agent.PublishedLanguage.csproj
@@ -1,15 +1,34 @@

- net6.0
- Network resurrector agent published language nuget package
+ net8.0
+ NetworkResurrector.Agent.PublishedLanguage is a NuGet package that contains the published language of NetworkResurrector.Agent. It simplifies communication with an agent instance within a .NET environment by providing essential DTOs (Data Transfer Objects) and constants.
https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector
https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector
Git
+ $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/ReleaseNotes.txt"))
+ 1.2.1
+ logo.png
+ README.md
+ Toodle HomeLab
+ Toodle NetworkResurrector
+ NetworkResurrector HomeLab CodeRove
+ MIT
-
+
+
+
+
+
+ True
+ \
+
+
+ True
+ \
+
diff --git a/backend/src/agent/NetworkResurrector.Agent.PublishedLanguage/README.md b/backend/src/agent/NetworkResurrector.Agent.PublishedLanguage/README.md
new file mode 100644
index 0000000..2c04650
--- /dev/null
+++ b/backend/src/agent/NetworkResurrector.Agent.PublishedLanguage/README.md
@@ -0,0 +1,56 @@
+# NetworkResurrector.Agent.PublishedLanguage
+
+[NetworkResurrector.Agent](https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector/src/branch/master/backend/src/agent) is a .NET service specialized in executing **Shutdown**, **Restart**, **Sleep**, **Logout**, and **Lock** actions on the host machine on which it is installed.
+
+**NetworkResurrector.Agent.PublishedLanguage** is a NuGet package that contains the published language of **NetworkResurrector.Agent**. It simplifies communication with an agent instance within a .NET environment by providing essential **DTOs (Data Transfer Objects)** and constants. This package helps developers easily integrate the agent's functionality into their applications by defining clear and consistent data structures.
+
+## Features
+
+- Contains DTOs for exchanging data with **NetworkResurrector.Agent**.
+- Provides constants that facilitate integration with the agent's API.
+- Enables easy integration within .NET environments.
+
+## Package Repository
+
+You can install **NetworkResurrector.Agent.PublishedLanguage** from my self-hosted NuGet feed: [https://lab.code-rove.com/public-nuget-server/](https://lab.code-rove.com/public-nuget-server/)
+
+## Installation
+
+### Visual Studio
+
+#### NuGet.config File
+
+To integrate the package, configure your Visual Studio solution with the following `NuGet.config` file:
+```xml=!
+
+
+
+
+
+
+
+
+```
+
+Add this NuGet.config file to your solution directory, or alternatively, configure the new NuGet feed in the NuGet Package Manager within Visual Studio. After doing this, you can install NetworkResurrector.Agent.PublishedLanguage using the NuGet Package Manager.
+
+
+### CLI
+
+```bash=!
+dotnet add package NetworkResurrector.Agent.PublishedLanguage --source https://lab.code-rove.com/public-nuget-server/v3/index.json
+```
+
+Run the above command in a console open in a .NET project directory.
+
+## Usage
+Once installed, you can use the DTOs and constants provided by the package to communicate with the agent’s API effectively. Here's an example of how to use a DTO in your application:
+
+```csharp
+using NetworkResurrector.Agent.PublishedLanguage;
+
+// Example usage of a DTO from the package
+var shutdownDto = new ShutdownDto { Action = "Shutdown", Force = true };
+
+// Your logic here to send the DTO to the agent
+```
\ No newline at end of file
diff --git a/backend/src/agent/NetworkResurrector.Agent.PublishedLanguage/ReleaseNotes.txt b/backend/src/agent/NetworkResurrector.Agent.PublishedLanguage/ReleaseNotes.txt
new file mode 100644
index 0000000..208d91c
--- /dev/null
+++ b/backend/src/agent/NetworkResurrector.Agent.PublishedLanguage/ReleaseNotes.txt
@@ -0,0 +1,13 @@
+1.2.1 release [2025-03-29 01:59]
+â—¾ Readme content update
+
+1.2.0 release [2025-03-29 00:38]
+â—¾ Added support for .NET 8.0
+â—¾ Added release notes, icon and readme files
+
+1.1.0 release [2023-01-29 1:53]
+â—¾ Code refactoring
+â—¾ .NET6 upgrade
+
+1.0.0 release [2021-12-21 23:52]
+â—¾ Initial release of NetworkResurrector.Agent.PublishedLanguage
\ No newline at end of file
diff --git a/backend/src/agent/NetworkResurrector.Agent.PublishedLanguage/logo.png b/backend/src/agent/NetworkResurrector.Agent.PublishedLanguage/logo.png
new file mode 100644
index 0000000..e741ef4
Binary files /dev/null and b/backend/src/agent/NetworkResurrector.Agent.PublishedLanguage/logo.png differ
diff --git a/backend/src/agent/NetworkResurrector.Agent.Wrapper/NetworkResurrector.Agent.Wrapper.csproj b/backend/src/agent/NetworkResurrector.Agent.Wrapper/NetworkResurrector.Agent.Wrapper.csproj
index c2df0d3..ec59913 100644
--- a/backend/src/agent/NetworkResurrector.Agent.Wrapper/NetworkResurrector.Agent.Wrapper.csproj
+++ b/backend/src/agent/NetworkResurrector.Agent.Wrapper/NetworkResurrector.Agent.Wrapper.csproj
@@ -1,21 +1,42 @@

- net6.0
- Network resurrector agent wrapper nuget package
+ net8.0
+ NetworkResurrector.Agent.Wrapper is a NuGet package that simplifies the integration of the agent within a .NET environment. It registers a service, IResurrectorAgentService, in the application’s service collection, providing methods for each supported action.
https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector
Git
https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector
- 1.1.0
+ $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/ReleaseNotes.txt"))
+ 1.2.0
+ logo.png
+ README.md
+ Toodle HomeLab
+ Toodle NetworkResurrector
+ NetworkResurrector HomeLab CodeRove
+ MIT
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ \
+
+
+ True
+ \
+
+
diff --git a/backend/src/agent/NetworkResurrector.Agent.Wrapper/README.md b/backend/src/agent/NetworkResurrector.Agent.Wrapper/README.md
new file mode 100644
index 0000000..328f98f
--- /dev/null
+++ b/backend/src/agent/NetworkResurrector.Agent.Wrapper/README.md
@@ -0,0 +1,72 @@
+# NetworkResurrector.Agent.Wrapper
+
+[NetworkResurrector.Agent](https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector/src/branch/master/backend/src/agent) is a .NET service designed to execute various host machine actions, including **Shutdown**, **Restart**, **Sleep**, **Logout**, and **Lock**.
+
+**NetworkResurrector.Agent.Wrapper** is a NuGet package that simplifies the integration of the agent within a .NET environment. It registers a service, `IResurrectorAgentService`, in the application's service collection, providing methods for each supported action. The package communicates with the agent's API, offering a convenient interface for developers to manage host machines through the agent.
+
+Once installed, the only additional step is to call the `UseResurrectorAgentServices` method during application startup. After this, `IResurrectorAgentService` can be injected into any class within the application.
+
+## Features
+
+- Simple integration with **NetworkResurrector.Agent**.
+- Provides easy-to-use methods for host machine actions (Shutdown, Restart, Sleep, Logout, Lock).
+- Registers `IResurrectorAgentService` for dependency injection in the application.
+- Facilitates communication with the agent's API controller.
+
+## Package Repository
+
+You can install **NetworkResurrector.Agent.Wrapper** from my self-hosted NuGet feed: [https://lab.code-rove.com/public-nuget-server/](https://lab.code-rove.com/public-nuget-server/)
+
+## Installation
+
+### Visual Studio
+
+#### NuGet.config File
+
+Add the following to your `NuGet.config` file:
+
+```xml
+
+
+
+
+
+
+
+
+```
+Place this file in your Visual Studio solution directory or configure the new NuGet feed in the NuGet Package Manager. After this, you can install **NetworkResurrector.Agent.Wrapper** using the NuGet Package Manager.
+
+### CLI
+To install via the .NET CLI, run the following command in your project directory:
+```bash
+dotnet add package NetworkResurrector.Agent.Wrapper --source https://lab.code-rove.com/public-nuget-server/v3/index.json
+```
+
+## Usage
+Once installed, call the UseResurrectorAgentServices method in your application startup code to register the service:
+
+```csharp
+public void ConfigureServices(IServiceCollection services)
+{
+ services.UseResurrectorAgentServices();
+}
+```
+After this, the `IResurrectorAgentService` will be available for injection into any class:
+```csharp
+public class MyService
+{
+ private readonly IResurrectorAgentService _resurrectorAgentService;
+
+ public MyService(IResurrectorAgentService resurrectorAgentService)
+ {
+ _resurrectorAgentService = resurrectorAgentService;
+ }
+
+ public void ShutdownHost()
+ {
+ _resurrectorAgentService.Shutdown();
+ }
+}
+```
+
diff --git a/backend/src/agent/NetworkResurrector.Agent.Wrapper/ReleaseNotes.txt b/backend/src/agent/NetworkResurrector.Agent.Wrapper/ReleaseNotes.txt
new file mode 100644
index 0000000..f702daf
--- /dev/null
+++ b/backend/src/agent/NetworkResurrector.Agent.Wrapper/ReleaseNotes.txt
@@ -0,0 +1,10 @@
+1.2.0 release [2025-03-29 02:01]
+â—¾ Added support for .NET 8.0
+â—¾ Added release notes, icon and readme files
+
+1.1.0 release [2023-01-29 1:53]
+â—¾ Code refactoring
+â—¾ .NET6 upgrade
+
+1.0.0 release [2021-12-09 15:42]
+â—¾ Initial release of NetworkResurrector.Agent.Wrapper
\ No newline at end of file
diff --git a/backend/src/agent/NetworkResurrector.Agent.Wrapper/logo.png b/backend/src/agent/NetworkResurrector.Agent.Wrapper/logo.png
new file mode 100644
index 0000000..e741ef4
Binary files /dev/null and b/backend/src/agent/NetworkResurrector.Agent.Wrapper/logo.png differ
diff --git a/backend/src/agent/NetworkResurrector.Agent/Extensions/StartupExtensions.cs b/backend/src/agent/NetworkResurrector.Agent/Extensions/StartupExtensions.cs
index 9d4c0ee..9ce24b9 100644
--- a/backend/src/agent/NetworkResurrector.Agent/Extensions/StartupExtensions.cs
+++ b/backend/src/agent/NetworkResurrector.Agent/Extensions/StartupExtensions.cs
@@ -21,7 +21,7 @@ namespace NetworkResurrector.Agent.Extensions
services.AddTuitioAuthentication(configuration.GetSection("Tuitio")["BaseAddress"]);
// MediatR
- services.AddMediatR(GetMediatRAssemblies());
+ services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining());
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(RequestPreProcessorBehavior<,>));
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(RequestPostProcessorBehavior<,>));
@@ -39,12 +39,6 @@ namespace NetworkResurrector.Agent.Extensions
services.AddApplicationServices();
}
- private static Assembly[] GetMediatRAssemblies()
- {
- var assembly = typeof(Application.Queries.GetSystemVersion).Assembly;
- return new Assembly[] { assembly };
- }
-
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public static void Configure(this IApplicationBuilder app, IConfiguration configuration)
{
diff --git a/backend/src/agent/NetworkResurrector.Agent/NetworkResurrector.Agent.csproj b/backend/src/agent/NetworkResurrector.Agent/NetworkResurrector.Agent.csproj
index 384e3c3..34ddccc 100644
--- a/backend/src/agent/NetworkResurrector.Agent/NetworkResurrector.Agent.csproj
+++ b/backend/src/agent/NetworkResurrector.Agent/NetworkResurrector.Agent.csproj
@@ -1,22 +1,18 @@
- net6.0
+ net8.0
-
+
-
-
-
+
-
-
diff --git a/backend/src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj b/backend/src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj
index e14826d..0a603c1 100644
--- a/backend/src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj
+++ b/backend/src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj
@@ -1,16 +1,16 @@

- net6.0
+ net8.0
-
-
-
+
+
+
diff --git a/backend/src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj b/backend/src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj
index 36278ec..1624690 100644
--- a/backend/src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj
+++ b/backend/src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
diff --git a/backend/src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj b/backend/src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj
index dbc1517..58990cd 100644
--- a/backend/src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj
+++ b/backend/src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
diff --git a/backend/src/api/NetworkResurrector.Api.PublishedLanguage/NetworkResurrector.Api.PublishedLanguage.csproj b/backend/src/api/NetworkResurrector.Api.PublishedLanguage/NetworkResurrector.Api.PublishedLanguage.csproj
index 1feb30b..57e3800 100644
--- a/backend/src/api/NetworkResurrector.Api.PublishedLanguage/NetworkResurrector.Api.PublishedLanguage.csproj
+++ b/backend/src/api/NetworkResurrector.Api.PublishedLanguage/NetworkResurrector.Api.PublishedLanguage.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
diff --git a/backend/src/api/NetworkResurrector.Api/Dockerfile b/backend/src/api/NetworkResurrector.Api/Dockerfile
index d6927a2..2318397 100644
--- a/backend/src/api/NetworkResurrector.Api/Dockerfile
+++ b/backend/src/api/NetworkResurrector.Api/Dockerfile
@@ -1,10 +1,11 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
-FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim AS base
+FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
-FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim AS build
+FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
+ARG BUILD_CONFIGURATION=Release
WORKDIR /buildspace
COPY ["dependencies.props", "."]
COPY ["Directory.Build.props", "."]
@@ -17,10 +18,11 @@ COPY ["src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.
RUN dotnet restore "src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj"
COPY . .
WORKDIR "/buildspace/src/api/NetworkResurrector.Api"
-RUN dotnet build "NetworkResurrector.Api.csproj" -c Release -o /app/build
+RUN dotnet build "NetworkResurrector.Api.csproj" -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
-RUN dotnet publish "NetworkResurrector.Api.csproj" -c Release -o /app/publish /p:UseAppHost=false
+ARG BUILD_CONFIGURATION=Release
+RUN dotnet publish "NetworkResurrector.Api.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
diff --git a/backend/src/api/NetworkResurrector.Api/Extensions/StartupExtensions.cs b/backend/src/api/NetworkResurrector.Api/Extensions/StartupExtensions.cs
index 85f7d1e..93be7a0 100644
--- a/backend/src/api/NetworkResurrector.Api/Extensions/StartupExtensions.cs
+++ b/backend/src/api/NetworkResurrector.Api/Extensions/StartupExtensions.cs
@@ -35,7 +35,7 @@ namespace NetworkResurrector.Api.Extensions
services.AddCacheService();
// MediatR
- services.AddMediatR(typeof(Application.Queries.GetMachines).Assembly);
+ services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining());
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(RequestPreProcessorBehavior<,>));
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(RequestPostProcessorBehavior<,>));
diff --git a/backend/src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj b/backend/src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj
index efa7bd8..2b99749 100644
--- a/backend/src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj
+++ b/backend/src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj
@@ -1,7 +1,7 @@

- net6.0
+ net8.0
Linux
@@ -12,19 +12,15 @@
-
+
-
-
-
+
-
-
diff --git a/backend/src/server/NetworkResurrector.Server.Abstractions/NetworkResurrector.Server.Abstractions.csproj b/backend/src/server/NetworkResurrector.Server.Abstractions/NetworkResurrector.Server.Abstractions.csproj
index 2b1cffb..17b4f89 100644
--- a/backend/src/server/NetworkResurrector.Server.Abstractions/NetworkResurrector.Server.Abstractions.csproj
+++ b/backend/src/server/NetworkResurrector.Server.Abstractions/NetworkResurrector.Server.Abstractions.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
diff --git a/backend/src/server/NetworkResurrector.Server.Application/NetworkResurrector.Server.Application.csproj b/backend/src/server/NetworkResurrector.Server.Application/NetworkResurrector.Server.Application.csproj
index a696523..f2102c2 100644
--- a/backend/src/server/NetworkResurrector.Server.Application/NetworkResurrector.Server.Application.csproj
+++ b/backend/src/server/NetworkResurrector.Server.Application/NetworkResurrector.Server.Application.csproj
@@ -1,17 +1,17 @@

- net6.0
+ net8.0
-
-
-
-
+
+
+
+
diff --git a/backend/src/server/NetworkResurrector.Server.Application/Services/ShutdownService.cs b/backend/src/server/NetworkResurrector.Server.Application/Services/ShutdownService.cs
index c04992a..2f4df90 100644
--- a/backend/src/server/NetworkResurrector.Server.Application/Services/ShutdownService.cs
+++ b/backend/src/server/NetworkResurrector.Server.Application/Services/ShutdownService.cs
@@ -66,6 +66,11 @@ namespace NetworkResurrector.Server.Application.Services
* and replace DOMAIN with the remote computer's domain. You can also use Kerberos instead of ntlmdomain.
*/
+ if (!OperatingSystem.IsWindows())
+ {
+ throw new PlatformNotSupportedException("ShutdownMachineWithManagementScope is only supported on Windows.");
+ }
+
ConnectionOptions options = new ConnectionOptions
{
Username = user,
diff --git a/backend/src/server/NetworkResurrector.Server.Domain/NetworkResurrector.Server.Domain.csproj b/backend/src/server/NetworkResurrector.Server.Domain/NetworkResurrector.Server.Domain.csproj
index 2b1cffb..17b4f89 100644
--- a/backend/src/server/NetworkResurrector.Server.Domain/NetworkResurrector.Server.Domain.csproj
+++ b/backend/src/server/NetworkResurrector.Server.Domain/NetworkResurrector.Server.Domain.csproj
@@ -1,7 +1,7 @@
- net6.0
+ net8.0
diff --git a/backend/src/server/NetworkResurrector.Server.PublishedLanguage/NetworkResurrector.Server.PublishedLanguage.csproj b/backend/src/server/NetworkResurrector.Server.PublishedLanguage/NetworkResurrector.Server.PublishedLanguage.csproj
index 09d50d9..58a493d 100644
--- a/backend/src/server/NetworkResurrector.Server.PublishedLanguage/NetworkResurrector.Server.PublishedLanguage.csproj
+++ b/backend/src/server/NetworkResurrector.Server.PublishedLanguage/NetworkResurrector.Server.PublishedLanguage.csproj
@@ -1,15 +1,33 @@
-
+
- net6.0
- Network resurrector server published language nuget package
+ net8.0
+ NetworkResurrector.Server.PublishedLanguage is a NuGet package that encapsulates the published language of NetworkResurrector.Server. It streamlines communication with the server in a .NET environment by offering essential DTOs (Data Transfer Objects) and constants.
https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector
Git
https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector
- 1.1.1
+ $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/ReleaseNotes.txt"))
+ 1.2.0
+ logo.png
+ README.md
+ Toodle HomeLab
+ Toodle NetworkResurrector
+ NetworkResurrector HomeLab CodeRove
+ MIT
-
+
+
+
+
+
+ True
+ \
+
+
+ True
+ \
+
diff --git a/backend/src/server/NetworkResurrector.Server.PublishedLanguage/README.md b/backend/src/server/NetworkResurrector.Server.PublishedLanguage/README.md
new file mode 100644
index 0000000..d4aa6c0
--- /dev/null
+++ b/backend/src/server/NetworkResurrector.Server.PublishedLanguage/README.md
@@ -0,0 +1,58 @@
+# NetworkResurrector.Server.PublishedLanguage
+
+[NetworkResurrector.Server](https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector/src/branch/master/backend/src/server) is a .NET service designed to perform network-related actions such as **WakeOnLAN**, **Ping**, and **Shutdown** for machines within the same network or in networks where it has access.
+
+**NetworkResurrector.Server.PublishedLanguage** is a NuGet package that encapsulates the published language of **NetworkResurrector.Server**. It streamlines communication with the server in a .NET environment by offering essential **DTOs (Data Transfer Objects)** and constants. This package provides developers with the necessary tools to integrate the server's functionality into their applications, using clear and consistent data structures for seamless integration.
+
+## Key Features
+
+- Supports network management actions like **WakeOnLAN**, **Ping**, and **Shutdown** for local and remote machines.
+- Provides DTOs and constants for efficient communication with the server's API.
+- Simplifies integration into .NET applications with predefined data structures.
+
+By leveraging **NetworkResurrector.Server.PublishedLanguage**, developers can easily incorporate network-related functionalities into their applications, improving system management and control over the networked devices.
+
+## Package Repository
+
+You can install **NetworkResurrector.Server.PublishedLanguage** from my self-hosted NuGet feed: [https://lab.code-rove.com/public-nuget-server/](https://lab.code-rove.com/public-nuget-server/)
+
+## Installation
+
+### Visual Studio
+
+#### NuGet.config File
+
+To integrate the package, configure your Visual Studio solution with the following `NuGet.config` file:
+```xml=!
+
+
+
+
+
+
+
+
+```
+
+Add this NuGet.config file to your solution directory, or alternatively, configure the new NuGet feed in the NuGet Package Manager within Visual Studio. After doing this, you can install NetworkResurrector.Agent.PublishedLanguage using the NuGet Package Manager.
+
+
+### CLI
+
+```bash=!
+dotnet add package NetworkResurrector.Server.PublishedLanguage --source https://lab.code-rove.com/public-nuget-server/v3/index.json
+```
+
+Run the above command in a console open in a .NET project directory.
+
+## Usage
+Once installed, you can use the DTOs and constants provided by the package to communicate with the servers’s API effectively. Here's an example of how to use a DTO in your application:
+
+```csharp
+using NetworkResurrector.Server.PublishedLanguage;
+
+// Example usage of a DTO from the package
+var wakeMachine = new WakeMachine { MacAddress = "xx:xx:xx" };
+
+// Your logic here to send the DTO to the server
+```
\ No newline at end of file
diff --git a/backend/src/server/NetworkResurrector.Server.PublishedLanguage/ReleaseNotes.txt b/backend/src/server/NetworkResurrector.Server.PublishedLanguage/ReleaseNotes.txt
new file mode 100644
index 0000000..341fafe
--- /dev/null
+++ b/backend/src/server/NetworkResurrector.Server.PublishedLanguage/ReleaseNotes.txt
@@ -0,0 +1,13 @@
+1.2.0 release [2025-03-29 02:14]
+â—¾ Added support for .NET 8.0
+â—¾ Added release notes, icon and readme files
+
+1.1.1 release [2023-03-25 02:58]
+â—¾ Server version query update
+
+1.1.0 release [2023-01-15 2:15]
+â—¾ Code refactoring
+â—¾ .NET6 upgrade
+
+1.0.0 release [2022-01-13 10:39]
+â—¾ Initial release of NetworkResurrector.Server.PublishedLanguage
\ No newline at end of file
diff --git a/backend/src/server/NetworkResurrector.Server.PublishedLanguage/logo.png b/backend/src/server/NetworkResurrector.Server.PublishedLanguage/logo.png
new file mode 100644
index 0000000..e741ef4
Binary files /dev/null and b/backend/src/server/NetworkResurrector.Server.PublishedLanguage/logo.png differ
diff --git a/backend/src/server/NetworkResurrector.Server.Wrapper/NetworkResurrector.Server.Wrapper.csproj b/backend/src/server/NetworkResurrector.Server.Wrapper/NetworkResurrector.Server.Wrapper.csproj
index b8e9a0f..0bec72f 100644
--- a/backend/src/server/NetworkResurrector.Server.Wrapper/NetworkResurrector.Server.Wrapper.csproj
+++ b/backend/src/server/NetworkResurrector.Server.Wrapper/NetworkResurrector.Server.Wrapper.csproj
@@ -1,24 +1,42 @@

- net6.0
- Network resurrector server wrapper nuget package
+ net8.0
+ NetworkResurrector.Server.Wrapper is a NuGet package that simplifies the integration of the server within a .NET environment. It registers a service, IResurrectorService, in the application’s service collection, providing methods for each supported action.
https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector
https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector
Git
- 1.1.1
+ $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/ReleaseNotes.txt"))
+ 1.2.0
+ logo.png
+ README.md
+ Toodle HomeLab
+ Toodle NetworkResurrector
+ NetworkResurrector HomeLab CodeRove
+ MIT
-
-
-
-
-
+
+
+
+
+
+
+
+ True
+ \
+
+
+ True
+ \
+
+
+
diff --git a/backend/src/server/NetworkResurrector.Server.Wrapper/README.md b/backend/src/server/NetworkResurrector.Server.Wrapper/README.md
new file mode 100644
index 0000000..9234ef4
--- /dev/null
+++ b/backend/src/server/NetworkResurrector.Server.Wrapper/README.md
@@ -0,0 +1,71 @@
+# NetworkResurrector.Server.Wrapper
+
+[NetworkResurrector.Server](https://lab.code-rove.com/gitea/tudor.stanciu/network-resurrector/src/branch/master/backend/src/server) is a .NET service designed to perform network-related actions such as **WakeOnLAN**, **Ping**, and **Shutdown** for machines within the same network or in networks where it has access.
+
+**NetworkResurrector.Server.Wrapper** is a NuGet package that simplifies the integration of the server within a .NET environment. It registers a service, `IResurrectorService`, in the application's service collection, providing methods for each supported action. The package communicates with the server's API, offering a convenient interface for developers to manage the machines in the network through the server.
+
+Once installed, the only additional step is to call the `UseResurrectorServices` method during application startup. After this, `IResurrectorService` can be injected into any class within the application.
+
+## Features
+
+- Simple integration with **NetworkResurrector.Server**.
+- Provides easy-to-use methods for the machines in the network (WakeOnLAN, Ping, Shutdown).
+- Registers `IResurrectorService` for dependency injection in the application.
+- Facilitates communication with the server's API controller.
+
+## Package Repository
+
+You can install **NetworkResurrector.Server.Wrapper** from my self-hosted NuGet feed: [https://lab.code-rove.com/public-nuget-server/](https://lab.code-rove.com/public-nuget-server/)
+
+## Installation
+
+### Visual Studio
+
+#### NuGet.config File
+
+Add the following to your `NuGet.config` file:
+
+```xml
+
+
+
+
+
+
+
+
+```
+Place this file in your Visual Studio solution directory or configure the new NuGet feed in the NuGet Package Manager. After this, you can install **NetworkResurrector.Server.Wrapper** using the NuGet Package Manager.
+
+### CLI
+To install via the .NET CLI, run the following command in your project directory:
+```bash
+dotnet add package NetworkResurrector.Server.Wrapper --source https://lab.code-rove.com/public-nuget-server/v3/index.json
+```
+
+## Usage
+Once installed, call the UseResurrectorServices method in your application startup code to register the service:
+
+```csharp
+public void ConfigureServices(IServiceCollection services)
+{
+ services.UseResurrectorServices();
+}
+```
+After this, the `IResurrectorService` will be available for injection into any class:
+```csharp
+public class MyService
+{
+ private readonly IResurrectorService _resurrectorService;
+
+ public MyService(IResurrectorService resurrectorService)
+ {
+ _resurrectorService = resurrectorService;
+ }
+
+ public void WakeMachine()
+ {
+ _resurrectorService.WakeMachine();
+ }
+}
+```
diff --git a/backend/src/server/NetworkResurrector.Server.Wrapper/ReleaseNotes.txt b/backend/src/server/NetworkResurrector.Server.Wrapper/ReleaseNotes.txt
new file mode 100644
index 0000000..230e7dc
--- /dev/null
+++ b/backend/src/server/NetworkResurrector.Server.Wrapper/ReleaseNotes.txt
@@ -0,0 +1,13 @@
+1.2.0 release [2025-03-29 02:30]
+â—¾ Added support for .NET 8.0
+â—¾ Added release notes, icon and readme files
+
+1.1.1 release [2023-03-25 02:58]
+â—¾ Server version query update
+
+1.1.0 release [2023-01-15 2:15]
+â—¾ Code refactoring
+â—¾ .NET6 upgrade
+
+1.0.0 release [2022-01-13 10:39]
+â—¾ Initial release of NetworkResurrector.Server.Wrapper
\ No newline at end of file
diff --git a/backend/src/server/NetworkResurrector.Server.Wrapper/logo.png b/backend/src/server/NetworkResurrector.Server.Wrapper/logo.png
new file mode 100644
index 0000000..e741ef4
Binary files /dev/null and b/backend/src/server/NetworkResurrector.Server.Wrapper/logo.png differ
diff --git a/backend/src/server/NetworkResurrector.Server/Extensions/StartupExtensions.cs b/backend/src/server/NetworkResurrector.Server/Extensions/StartupExtensions.cs
index 9ec81d6..e06af59 100644
--- a/backend/src/server/NetworkResurrector.Server/Extensions/StartupExtensions.cs
+++ b/backend/src/server/NetworkResurrector.Server/Extensions/StartupExtensions.cs
@@ -25,7 +25,7 @@ namespace NetworkResurrector.Server.Extensions
services.AddHttpContextAccessor();
// MediatR
- services.AddMediatR(GetMediatRAssemblies());
+ services.AddMediatR(cfg => cfg.RegisterServicesFromAssemblyContaining());
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(RequestPreProcessorBehavior<,>));
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(RequestPostProcessorBehavior<,>));
@@ -61,11 +61,5 @@ namespace NetworkResurrector.Server.Extensions
});
app.ConfigureSwagger("NetworkResurrector Server API");
}
-
- private static Assembly[] GetMediatRAssemblies()
- {
- var assembly = typeof(Application.CommandHandlers.PingMachineHandler).Assembly;
- return new Assembly[] { assembly };
- }
}
}
diff --git a/backend/src/server/NetworkResurrector.Server/NetworkResurrector.Server.csproj b/backend/src/server/NetworkResurrector.Server/NetworkResurrector.Server.csproj
index 9ce661f..99fdef8 100644
--- a/backend/src/server/NetworkResurrector.Server/NetworkResurrector.Server.csproj
+++ b/backend/src/server/NetworkResurrector.Server/NetworkResurrector.Server.csproj
@@ -1,22 +1,18 @@

- net6.0
+ net8.0
-
+
-
-
-
+
-
-
diff --git a/backend/src/server/NetworkResurrector.WakeOnLan.Inhouse/NetworkResurrector.WakeOnLan.Inhouse.csproj b/backend/src/server/NetworkResurrector.WakeOnLan.Inhouse/NetworkResurrector.WakeOnLan.Inhouse.csproj
index 4a9af5c..6f36713 100644
--- a/backend/src/server/NetworkResurrector.WakeOnLan.Inhouse/NetworkResurrector.WakeOnLan.Inhouse.csproj
+++ b/backend/src/server/NetworkResurrector.WakeOnLan.Inhouse/NetworkResurrector.WakeOnLan.Inhouse.csproj
@@ -1,12 +1,12 @@

- net6.0
+ net8.0
-
-
+
+
diff --git a/backend/src/server/NetworkResurrector.WakeOnLan.Inhouse/WolClient.cs b/backend/src/server/NetworkResurrector.WakeOnLan.Inhouse/WolClient.cs
index 46f7e9d..58672e8 100644
--- a/backend/src/server/NetworkResurrector.WakeOnLan.Inhouse/WolClient.cs
+++ b/backend/src/server/NetworkResurrector.WakeOnLan.Inhouse/WolClient.cs
@@ -35,7 +35,7 @@ namespace NetworkResurrector.WakeOnLan.Inhouse
catch (Exception ex)
{
broadcast = false;
- _logger.LogError("WolClient => SetClientInBrodcastMode failed.", ex);
+ _logger.LogError(ex, "WolClient => SetClientInBrodcastMode failed.");
}
}
diff --git a/backend/src/server/NetworkResurrector.WakeOnLan.Nikeee/NetworkResurrector.WakeOnLan.Nikeee.csproj b/backend/src/server/NetworkResurrector.WakeOnLan.Nikeee/NetworkResurrector.WakeOnLan.Nikeee.csproj
index 0145147..bd37052 100644
--- a/backend/src/server/NetworkResurrector.WakeOnLan.Nikeee/NetworkResurrector.WakeOnLan.Nikeee.csproj
+++ b/backend/src/server/NetworkResurrector.WakeOnLan.Nikeee/NetworkResurrector.WakeOnLan.Nikeee.csproj
@@ -1,13 +1,13 @@

- net6.0
+ net8.0
-
-
+
+