RCAAS.Core 1.1.0.144

dotnet add package RCAAS.Core --version 1.1.0.144
                    
NuGet\Install-Package RCAAS.Core -Version 1.1.0.144
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RCAAS.Core" Version="1.1.0.144" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RCAAS.Core" Version="1.1.0.144" />
                    
Directory.Packages.props
<PackageReference Include="RCAAS.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RCAAS.Core --version 1.1.0.144
                    
#r "nuget: RCAAS.Core, 1.1.0.144"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RCAAS.Core@1.1.0.144
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RCAAS.Core&version=1.1.0.144
                    
Install as a Cake Addin
#tool nuget:?package=RCAAS.Core&version=1.1.0.144
                    
Install as a Cake Tool

RCAAS.Core

.NET License

Remote Command-line Application Administration Service - Core Library

RCAAS.Core is a comprehensive .NET 9 library that provides the essential infrastructure for managing, monitoring, and orchestrating command-line applications as background services. It offers a plugin-based architecture for wrapping various applications (game servers, utilities, etc.) with unified lifecycle management, configuration, logging, and scheduling capabilities.

Features

Application Wrapper System

  • Plugin Architecture: Extensible wrapper system for integrating any command-line application
  • Lifecycle Management: Start, stop, restart, and monitor applications with process tracking
  • Dynamic Loading: Discover and load wrapper plugins at runtime from external assemblies
  • Steam Integration: Built-in support for Steam-based game servers (SteamCMD integration)

Configuration & Persistence

  • Multi-Database Support: Entity Framework Core integration with SQL Server, MySQL, and PostgreSQL
  • Backup Management: Automated backup creation and cleanup with configurable retention policies

Scheduled Jobs

  • Cron-like Scheduling: Schedule tasks with minute and hour precision
  • Job Actions: Backup, cleanup, app lifecycle control, and custom commands
  • Flexible Configuration: Per-application job configuration with serialized arguments

Security & Authentication

  • Password Hashing: Modern Argon2id-based password hashing with secure defaults
  • Token Generation: Cryptographically secure token generation for API authentication
  • Password Encryption: AES-256 encryption for legacy password storage migration

Installation

Install via NuGet Package Manager:

Install-Package RCAAS.Core

Using .NET CLI:

dotnet add package RCAAS.Core

Package Manager Console:

PM> Install-Package RCAAS.Core

Target Framework: .NET 9.0

Quick Start

1. Initialize Core Services

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using RCAAS.Core.Helpers;
using RCAAS.Core.Interfaces;

var builder = Host.CreateApplicationBuilder(args);

// Register RCAAS core services
builder.Services.AddSingleton<IAppCoreService, AppCoreService>();
builder.Services.AddSingleton<WrapperManager>();

// Configure logging with NLog
builder.Logging.ClearProviders();
builder.Logging.AddNLog();

var host = builder.Build();
await host.RunAsync();

2. Load and Manage Wrappers

using RCAAS.Wrappers;

// Get the wrapper manager
var wrapperManager = serviceProvider.GetRequiredService<WrapperManager>();

// Load available wrapper plugins
await wrapperManager.LoadAvailableWrappersAsync(cancellationToken);

// Display loaded wrappers
foreach (var (name, info) in wrapperManager.Wrappers)
{
    Console.WriteLine($"Loaded: {name} v{info.Version} by {info.Author}");
}

3. Create and Start an Application

using RCAAS.Data;

// Define application configuration
var appConfig = new CmdAppItem
{
    Name = "My Game Server",
    WrapperName = "SteamWrapper",
    CmdArgs = @"{""AppId"":730,""InstallDir"":""./servers/csgo""}",
    Enabled = true
};

// Add and start the application
await wrapperManager.AddAppItemAsync(appConfig, cancellationToken);

4. Schedule Automated Backups

using RCAAS.Core.Data;
using Newtonsoft.Json;

// Create a backup job
var backupJob = new RCAASJobItem
{
    Name = "Daily Backup",
    Action = JobAction.Backup,
    CmdAppId = appConfig.Id,
    Hour = 3,  // 3 AM
    Minute = 0,
    Enabled = true
};

await DBHelper.AddJobAsync(backupJob, cancellationToken);

5. Work with Plugin Metadata

using System.Diagnostics;
using RCAAS.Wrappers;

// Extract plugin information from a DLL
var dllPath = "path/to/wrapper.dll";
var fileVersionInfo = FileVersionInfo.GetVersionInfo(dllPath);
var pluginInfo = RCAASPluginInfo.Create(dllPath, fileVersionInfo);

Console.WriteLine($"Plugin: {pluginInfo.Name}");
Console.WriteLine($"Version: {pluginInfo.Version}");
Console.WriteLine($"Description: {pluginInfo.Description}");
Console.WriteLine($"Author: {pluginInfo.Author}");

Architecture Overview

Core Components

Wrappers (RCAAS.Wrappers)
  • WrapperManager: Central management for wrapper discovery, loading, and lifecycle
  • RCAASPluginInfo: Plugin metadata extraction and management
  • BaseWrapper: Abstract base class for implementing custom wrappers
  • BaseArgs: Serializable argument models for wrapper configuration
Helpers (RCAAS.Core.Helpers)
  • AppCoreService: Application-wide service coordination and state management
  • DBHelper: Database operations and Entity Framework context management
  • WebHelper: HTTP operations with modern async/await patterns
  • BackupHelper: ZIP-based backup creation and management
  • JavaHelper: Java runtime detection and version management
  • PasswordHasher: Argon2id password hashing with secure defaults
  • TokenGenerator: Cryptographically secure token generation
Data Models (RCAAS.Core.Data)
  • CmdAppItem: Application configuration and metadata
  • ProcessLogItem: Process execution tracking
  • RCAASJobItem: Scheduled job definitions
  • JobConfig*: Specialized job configuration models
Interfaces (RCAAS.Core.Interfaces)
  • IAppCoreService: Core service contract
  • IRCAASContext: Application context and state
  • IAppWrapper: Wrapper implementation contract
  • IPluginHelper: Plugin helper contract

Extensibility

Create custom wrappers by implementing BaseWrapper:

public class MyCustomWrapper : BaseWrapper
{
    public override string Name => "MyCustomWrapper";

    public override Task<bool> StartAsync()
    {
        // Custom start logic
        return Task.FromResult(true);
    }

    public override Task<bool> StopAsync(int timeout = 30000)
    {
        // Custom stop logic
        return Task.FromResult(true);
    }

    // Implement other abstract members...
}

Key Namespaces

Namespace Purpose
RCAAS.Core.Wrappers Application wrappers, plugin management, and base classes
RCAAS.Core.Helpers Utility classes for common operations
RCAAS.Core.Data Data models and Entity Framework entities
RCAAS.Core.Interfaces Contracts and abstractions
RCAAS.Core.Util Utility classes (INI files, numeric helpers, context)
RCAAS.Core.Constants Application-wide constants

Configuration

Database Configuration

RCAAS.Core supports multiple database providers:

{
  "DatabaseProvider": "MSSQL",
  "ConnectionStrings": {
    "DefaultConnection": "Server=localhost;Database=RCAAS;Trusted_Connection=True;"
  }
}

Supported providers:

  • MSSQL: SQL Server (via RCAAS.Data.MSSQL)
  • MySQL: MySQL/MariaDB (via RCAAS.Data.MySQL)
  • PostgreSQL: PostgreSQL (via RCAAS.Data.PostgreSQL)

NLog Configuration

Configure structured logging with database targets:

<nlog>
  <targets>
    <target name="database" xsi:type="Database" 
            connectionString="${configsetting:ConnectionStrings.DefaultConnection}">
      <commandText>
        INSERT INTO CmdAppLog (CmdAppId, Message, Level, Timestamp, Exception)
        VALUES (@cmdAppId, @message, @level, @timestamp, @exception)
      </commandText>
      <parameter name="@cmdAppId" layout="${event-properties:ServerId}" />
      <parameter name="@message" layout="${message}" />
      <parameter name="@level" layout="${level}" />
      <parameter name="@timestamp" layout="${longdate}" />
      <parameter name="@exception" layout="${exception:format=tostring}" />
    </target>
  </targets>
</nlog>

Security Best Practices

Password Hashing

Use PasswordHasher for all password operations:

using RCAAS.Core.Helpers;

// Hash a password
string hashedPassword = PasswordHasher.HashPassword("userPassword123");

// Verify a password
bool isValid = PasswordHasher.VerifyPassword("userPassword123", hashedPassword);

// Check if rehashing is needed (e.g., after algorithm updates)
if (PasswordHasher.NeedsRehash(hashedPassword))
{
    hashedPassword = PasswordHasher.HashPassword("userPassword123");
}

Secure Token Generation

using RCAAS.Core.Helpers;

// Generate a secure token
string apiToken = TokenGenerator.GenerateSecureToken(length: 32);

Dependencies

Core Framework

  • Microsoft.Extensions.Hosting (^9.0.0) - Hosting infrastructure
  • Microsoft.Extensions.DependencyInjection (^9.0.0) - DI container
  • Microsoft.Extensions.Logging (^9.0.0) - Logging abstractions

Data & Persistence

  • Microsoft.EntityFrameworkCore (^9.0.0) - ORM framework
  • Microsoft.EntityFrameworkCore.SqlServer (^9.0.0) - SQL Server provider
  • Pomelo.EntityFrameworkCore.MySql (^9.0.0) - MySQL provider

Logging

  • NLog (^5.3.4) - Logging framework
  • NLog.Extensions.Logging (^5.3.14) - NLog integration
  • NLog.Database (^5.3.4) - Database logging target

Utilities

  • Newtonsoft.Json (^13.0.3) - JSON serialization
  • RestSharp (^112.2.0) - REST client
  • Konscious.Security.Cryptography.Argon2 (^1.3.1) - Password hashing

Testing

RCAAS.Core includes unit tests:

dotnet test RCAAS.Test/RCAAS.Test.csproj

Key test coverage:

  • ✅ Wrapper management and plugin loading
  • ✅ Password hashing and security
  • ✅ Web helper operations
  • ✅ Java detection
  • ✅ Configuration file parsing
  • ✅ Data model serialization

Version History

Current Version: 1.1.0.x

  • Major: Breaking API changes
  • Minor: New features
  • Patch: Bug fixes, backward compatible

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -m 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Open a Pull Request

Development Requirements

  • .NET 9 SDK
  • Visual Studio 2022 or VS Code with C# extension
  • SQL Server, MySQL, or PostgreSQL for database testing

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support & Community

For bugs, feature requests, or questions, please open an issue on GitHub.

Acknowledgments

Built with .NET best practices and leveraging the work of the .NET community, including:

  • Entity Framework Core team
  • NLog contributors
  • Argon2 cryptography implementation
  • RestSharp maintainers
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0.144 132 3/19/2026
1.0.0.143 120 3/19/2026
0.61.0.99 334 9/19/2025 0.61.0.99 is deprecated because it is no longer maintained.