CH-J Server Managerการจัดการเซิร์ฟเวอร์ผ่าน SSH
เมนู
ซอร์สที่เผยแพร่

CH-J Server Manager

เรียกดูไดเรกทอรีและไฟล์ของรุ่นแอปพลิเคชันที่ระบุ

ดาวน์โหลด ZIP ของซอร์ส
CH-J / Server Manager 193 ไฟล์
core-20261011T184039Z-4148710795d0 วันที่เพิ่ม: ไม่ได้บันทึกวันที่ · วันที่บิลด์:
vaultLockController.js วันที่เพิ่ม: ไม่ได้บันทึกวันที่ 1.7 KB · 29 บรรทัด
โค้ด ดาวน์โหลดไฟล์
1"use strict";
2const { EventEmitter } = require("node:events");
3class VaultLockController extends EventEmitter {
4 constructor({ vaultStore, configStore, biometricService, sessionManager, pluginRuntime, diagnosticsService, now = Date.now, pollMs = 5000 }) {
5 super(); Object.assign(this, { vaultStore, configStore, biometricService, sessionManager, pluginRuntime, diagnosticsService, now });
6 this.lastActivity = now(); this.locking = null;
7 this.timer = setInterval(() => { void this.check().catch(() => {}); }, pollMs); this.timer.unref?.();
8 }
9 activity() { this.lastActivity = this.now(); }
10 async check() {
11 const config = this.configStore.get().security;
12 if (config.autoLockMinutes > 0 && this.vaultStore.status().unlocked && this.now() - this.lastActivity >= config.autoLockMinutes * 60000) await this.lock("inactivity");
13 }
14 async lostFocus() { if (this.configStore.get().security.lockOnBlur && this.vaultStore.status().unlocked) await this.lock("focus-loss"); }
15 async lock(reason = "manual") {
16 if (this.locking) return this.locking;
17 this.biometricService.cancel();
18 // Clear the key synchronously, before waiting for potentially slow SSH cleanup.
19 const status = this.vaultStore.lock();
20 this.locking = (async () => {
21 try { this.pluginRuntime.closeAll(); this.diagnosticsService?.stopAll(); await this.sessionManager.disconnectAll("vault-" + reason); }
22 finally { this.emit("locked", { ...status, reason }); }
23 return status;
24 })();
25 try { return await this.locking; } finally { this.locking = null; }
26 }
27 dispose() { clearInterval(this.timer); this.biometricService.cancel(); }
29module.exports = { VaultLockController };
SHA-25697db7ccb76127cfbe056c302c73feaf0b1f043cf90710cb5af73d7217ce42e1e

CH-J Proprietary Software License 1.14 · ซอร์สโค้ดนี้ให้ไว้ภายใต้ CH-J Proprietary Software License 1.14 การเปิดให้เข้าถึงไม่ได้เปลี่ยนแปลงเงื่อนไขของสัญญาอนุญาตหรือให้สิทธิ์เพิ่มเติม

SHA-256 ของไฟล์บีบอัด5a8ea02d06a5643cf2330fe9f54b8767a06c1c59d36527705e536fa9dbca7614
ไฟล์