MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / set

Method set

ssh/ssh.ts:197–208  ·  view source on GitHub ↗
(key: string, value: string)

Source from the content-addressed store, hash-verified

195 legacyFiles: [{ dir: "sshkey", fileName: "sshkey_config.json" }],
196 });
197 this.db = await JSONFilePreset<Record<string, any>>(
198 this.configPath,
199 { ...DEFAULT_CONFIG }
200 );
201 this.initialized = true;
202 } catch (error) {
203 console.error("[ssh] 初始化配置失败:", error);
204 } finally {
205 this.initLock = false;
206 }
207 }
208
209 static async get(key: string, defaultValue?: string): Promise<string> {
210 await this.init();
211 if (!this.db) return defaultValue || DEFAULT_CONFIG[key] || "";

Callers 15

fetchFromWallhavenFunction · 0.45
fetchServiceMonitorFunction · 0.45
nezhaFunction · 0.45
extractDNSDataFunction · 0.45
scheduleRetryMethod · 0.45
scheduleExpiryMethod · 0.45
scheduleTaskFunction · 0.45
registerTaskMethod · 0.45
changeSSHPortMethod · 0.45
togglePasswordAuthMethod · 0.45
toggleKeyAuthMethod · 0.45
setTargetMethod · 0.45

Calls 3

initMethod · 0.95
writeMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected