Skip to content

CloudflareTunnels

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:20

The Cloudflare implementation of the tunnels capability, backed by Cloudflare Tunnel in one account.

  • Tunnels

new CloudflareTunnels(client, accountId): CloudflareTunnels

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:26

() => Pick<CloudflareClient, "tunnels">

string

CloudflareTunnels

readonly key: "tunnels"

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:22

The capability this class provides, always "tunnels".

Tunnels.key


readonly providerName: "cloudflare" = "cloudflare"

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:24

The provider name, "cloudflare".

Tunnels.providerName

ensureTunnel(route): Promise<EnsuredTunnel>

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:32

Finds the tunnel by name or makes it, then rewrites its routes only when they do not already serve the hostname.

TunnelRoute

Promise<EnsuredTunnel>

Tunnels.ensureTunnel


tunnelToken(tunnelId): Promise<string>

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:50

The token cloudflared runs the tunnel with.

string

Promise<string>

Tunnels.tunnelToken


whoami(): Promise<{ ok: boolean; tunnels: number; }>

Defined in: plugins/holocron-plugin-cloudflare/src/capabilities/tunnels.ts:55

holocron doctor has no specific tunnel to check: lists the ones the token can see.

Promise<{ ok: boolean; tunnels: number; }>

Tunnels.whoami