Enable localhost connections in radicle-explorer

Allow radicle-explorer to connect to a locally running radicle-httpd via
https://app.radicle.xyz/nodes/localhost. This was previously disabled to
encourage use of Radicle Desktop, but is now useful for testing the new
always-on node in local development environments.

Remove support for /nodes/radicle.local, an undocumented and unused convention.

Fix remote node loading when Cloudflare URL-encodes port separator (: → %3A).
This commit is contained in:
Rūdolfs Ošiņš
2026-01-12 14:38:50 -06:00
parent 4c20d626e8
commit c72494f620
22 changed files with 81 additions and 113 deletions
-14
View File
@@ -2,7 +2,6 @@ import type { BaseUrl, NodeIdentity, NodeStats } from "@http-client";
import type { ErrorRoute, NotFoundRoute } from "@app/lib/router/definitions";
import * as utils from "@app/lib/utils";
import config from "@app/lib/config";
import { HttpdClient } from "@http-client";
import { ResponseError, ResponseParseError } from "@http-client/lib/fetcher";
import { handleError } from "@app/views/nodes/error";
@@ -30,19 +29,6 @@ export async function loadUserRoute({
did,
baseUrl,
}: UserRoute): Promise<UserLoadedRoute | NotFoundRoute | ErrorRoute> {
if (
import.meta.env.PROD &&
utils.isLocal(`${baseUrl.hostname}:${baseUrl.port}`)
) {
return {
resource: "error",
params: {
icon: "device",
title: "Local node browsing not supported",
description: `You're trying to access a local node from your browser, we are currently working on a desktop app specific for this use case. Join our <strong>#desktop</strong> channel on <radicle-external-link href="${config.supportWebsite}">${config.supportWebsite}</radicle-external-link> for more information.`,
},
};
}
const parsedDid = utils.parseNodeId(decodeURIComponent(did));
if (!parsedDid) {
return {