mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-30 05:02:58 +00:00
* feat: direct TCP URI with SSL toggle and optional password auth Replaces the heuristic-driven direct-connection model with a user-controlled one. The Add Host dialog now exposes structured Host, Port, "Use SSL", and masked Password fields that compose the canonical `tcp://host:port?ssl=true&password=xxx` URI used as the storage form. The daemon gains optional shared-secret auth: `Authorization: Bearer <pw>` on HTTP and `Sec-WebSocket-Protocol: paseo.bearer.<pw>` on the WS upgrade (browser WebSocket can't set custom headers). Configured via config.json `auth.password` or `PASEO_PASSWORD` env. Off by default — old clients keep working unchanged. The `port === 443` heuristic for ws/wss is gone; the explicit `useTls` flag drives scheme selection at every call site. * fix: stabilize direct tcp auth ci checks * fix: restore fetch stub in bootstrap smoke test * fix(app): collapse Advanced section in add-host modal * feat(server): hash daemon password in config * fix: update lockfile signatures and Nix hash * Improve direct TCP auth failures * Fix workspace cwd updates after rebase --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
38 lines
945 B
TypeScript
38 lines
945 B
TypeScript
import {
|
|
buildDaemonWebSocketUrl,
|
|
buildRelayWebSocketUrl as buildSharedRelayWebSocketUrl,
|
|
deriveLabelFromEndpoint,
|
|
extractHostPortFromWebSocketUrl,
|
|
normalizeHostPort,
|
|
parseConnectionUri,
|
|
parseHostPort,
|
|
serializeConnectionUri,
|
|
serializeConnectionUriForStorage,
|
|
shouldUseTlsForDefaultHostedRelay,
|
|
type HostPortParts,
|
|
} from "@server/shared/daemon-endpoints";
|
|
|
|
export { decodeOfferFragmentPayload } from "@server/shared/connection-offer";
|
|
|
|
export type { HostPortParts };
|
|
|
|
export {
|
|
buildDaemonWebSocketUrl,
|
|
deriveLabelFromEndpoint,
|
|
extractHostPortFromWebSocketUrl,
|
|
normalizeHostPort,
|
|
parseConnectionUri,
|
|
parseHostPort,
|
|
serializeConnectionUri,
|
|
serializeConnectionUriForStorage,
|
|
shouldUseTlsForDefaultHostedRelay,
|
|
};
|
|
|
|
export function buildRelayWebSocketUrl(params: {
|
|
endpoint: string;
|
|
serverId: string;
|
|
useTls: boolean;
|
|
}): string {
|
|
return buildSharedRelayWebSocketUrl({ ...params, role: "client" });
|
|
}
|