mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-09-23 11:07:06 +00:00
Add optional Cloudflare TURN credentials and secure profile sharing
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { CLOUDFLARE_ICE_SERVER_SOURCE_ID } from "@/integrations/cloudflare/settings";
|
||||
import type { IceServerSourceFactoryCatalogue } from "@vrtmrz/livesync-commonlib/p2p";
|
||||
import {
|
||||
createCloudflareIceServerSource,
|
||||
type CloudflareIceServerSourceFetch,
|
||||
} from "@/integrations/cloudflare/iceServerSource";
|
||||
|
||||
/**
|
||||
* Compose the closed LiveSync-owned ICE source catalogue from a host HTTP
|
||||
* adapter. The adapter is intentionally narrow so this feature does not take
|
||||
* a dependency on LiveSync core or on native request APIs.
|
||||
*/
|
||||
export function useIceServerSources(fetch: CloudflareIceServerSourceFetch): IceServerSourceFactoryCatalogue {
|
||||
return {
|
||||
[CLOUDFLARE_ICE_SERVER_SOURCE_ID]: (configuration) => createCloudflareIceServerSource(configuration, { fetch }),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user