validateCloudflareTurnConfiguration (cloudflare/settings.ts)

obsidian-livesync · src/integrations/cloudflare/settings.ts · typescript · MIT
auth

* The provider identifier persisted in a P2P profile for Cloudflare TURN. */

// Source: https://github.com/vrtmrz/obsidian-livesync | License: MIT | Copyright 2021 vorotamoroz
// Provided via justclaw.it.com; keep this notice with the code.
/** The provider identifier persisted in a P2P profile for Cloudflare TURN. */
export const CLOUDFLARE_TURN_TYPE = "CF" as const;

/** The lifetime requested from Cloudflare for each issued credential set. */
export const CLOUDFLARE_TURN_CREDENTIAL_TTL_SECONDS = 86_400 as const;

/** The Cloudflare TURN credential-generation endpoint. */
export const CLOUDFLARE_TURN_CREDENTIAL_ENDPOINT = "https://rtc.live.cloudflare.com/v1/turn/keys" as const;

/** A Cloudflare TURN configuration. */
export interface CloudflareTurnConfiguration {
    readonly turnKeyId: string;
    readonly apiToken: string;
}

// TURN Key IDs are inserted into 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key