Stabilize Fusion builds and simplify optional modules.
Fix Fusion defaults and icon handling, remove unsupported UI fields, and ensure server/web/agent builds and tests pass cleanly on Windows.
This commit is contained in:
@@ -9,7 +9,7 @@ export interface PreflightCheck {
|
||||
message: string;
|
||||
}
|
||||
|
||||
function isLanReachableUrl(url: string): boolean {
|
||||
function isReachableServerUrl(url: string): boolean {
|
||||
try {
|
||||
const u = new URL(url.trim());
|
||||
const host = u.hostname.toLowerCase();
|
||||
@@ -22,7 +22,9 @@ function isLanReachableUrl(url: string): boolean {
|
||||
if (second >= 16 && second <= 31) return true;
|
||||
}
|
||||
}
|
||||
return host.includes('.');
|
||||
// Public hostnames (Cloudflare tunnel, domain, etc.)
|
||||
if (host.includes('.') && (u.protocol === 'http:' || u.protocol === 'https:')) return true;
|
||||
return false;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
@@ -46,14 +48,16 @@ export function runForgePreflight(form: BuildRequest, fusionPrepSelected: boolea
|
||||
|
||||
if (!form.server_url.trim()) {
|
||||
checks.push({ id: 'server', level: 'error', message: 'Server URL is required — miners must reach your control server.' });
|
||||
} else if (!isLanReachableUrl(form.server_url)) {
|
||||
} else if (!isReachableServerUrl(form.server_url)) {
|
||||
checks.push({
|
||||
id: 'server',
|
||||
level: 'error',
|
||||
message: 'Server URL should be your LAN IP (e.g. http://192.168.1.10:8989), not localhost.',
|
||||
message: 'Server URL must be reachable by workers — use LAN IP or your public https:// hostname, not localhost.',
|
||||
});
|
||||
} else {
|
||||
checks.push({ id: 'server', level: 'ok', message: 'Server URL looks reachable from other PCs on your network.' });
|
||||
const u = new URL(form.server_url.trim());
|
||||
const hint = u.protocol === 'https:' ? 'Public/tunnel URL OK.' : 'LAN URL OK.';
|
||||
checks.push({ id: 'server', level: 'ok', message: `Control endpoint looks valid. ${hint}` });
|
||||
}
|
||||
|
||||
if (!form.wallet.trim()) {
|
||||
|
||||
Reference in New Issue
Block a user