mirror of
https://github.com/koush/scrypted.git
synced 2026-03-17 07:22:10 +00:00
diagnostics: more domain checks
This commit is contained in:
@@ -406,6 +406,11 @@ class DiagnosticsPlugin extends ScryptedDeviceBase implements Settings {
|
||||
throw new Error('Unrecognized Linux installation. Installation via Docker image or the official Proxmox LXC script (not tteck) is recommended: https://docs.scrypted.app/installation');
|
||||
});
|
||||
|
||||
await this.validate(this.console, 'Host OS', async () => {
|
||||
const installEnv = process.env.SCRYPTED_INSTALL_ENVIRONMENT || 'unknown';
|
||||
return `${os.type()} ${os.release()} (${os.platform()}/${os.arch()}) [${installEnv}]`;
|
||||
});
|
||||
|
||||
await this.validate(this.console, 'IPv4 (jsonip.com)', httpFetch({
|
||||
url: 'https://jsonip.com',
|
||||
family: 4,
|
||||
@@ -630,6 +635,22 @@ class DiagnosticsPlugin extends ScryptedDeviceBase implements Settings {
|
||||
}
|
||||
});
|
||||
|
||||
await this.validate(this.console, 'External Resource Access (DNS)', async () => {
|
||||
const domains = [
|
||||
'cdn-lfs-us-1.hf.co',
|
||||
'cdn-lfs-eu-1.hf.co',
|
||||
'cdn-lfs.hf.co',
|
||||
'cas-bridge.xethub.hf.co'
|
||||
];
|
||||
|
||||
for (const domain of domains) {
|
||||
const addresses = await dns.promises.resolve4(domain);
|
||||
if (addresses.some(ip => ip === '0.0.0.0')) {
|
||||
throw new Error(`${domain} resolves to 0.0.0.0 (DNS blocking detected)`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (nvrPlugin) {
|
||||
await this.validate(this.console, "GPU Decode", async () => {
|
||||
const ffmpegPath = await sdk.mediaManager.getFFmpegPath();
|
||||
|
||||
Reference in New Issue
Block a user