feat(ops-dashboard): implement OpsServer and dashboard component with initial rendering

This commit is contained in:
2025-06-01 19:46:10 +00:00
parent f877ad9676
commit 6ee1d6e917
17 changed files with 215 additions and 21 deletions

View File

@ -12,6 +12,8 @@ import { configureEmailStorage, configureEmailServer } from './mail/delivery/ind
// Import storage manager
import { StorageManager, type IStorageConfig } from './storage/index.js';
import { OpsServer } from './opsserver/index.js';
export interface IDcRouterOptions {
/**
* Direct SmartProxy configuration - gives full control over HTTP/HTTPS and TCP/SNI traffic
@ -130,6 +132,7 @@ export class DcRouter {
public dnsServer?: plugins.smartdns.dnsServerMod.DnsServer;
public emailServer?: UnifiedEmailServer;
public storageManager: StorageManager;
public opsServer: OpsServer;
// Environment access
@ -150,6 +153,10 @@ export class DcRouter {
console.log('║ Starting DcRouter Services ║');
console.log('╚═══════════════════════════════════════════════════════════════════╝');
this.opsServer = new OpsServer(this);
await this.opsServer.start();
try {
// Set up SmartProxy for HTTP/HTTPS and all traffic including email routes
await this.setupSmartProxy();
@ -551,6 +558,8 @@ export class DcRouter {
public async stop() {
console.log('Stopping DcRouter services...');
await this.opsServer.stop();
try {
// Stop all services in parallel for faster shutdown