Repository navigation
feat: guest links can use your own address instead of T4 Connect - #2
Open
frankhommers wants to merge 2 commits into
Open
frankhommers wants to merge 2 commits into
frankhommers wants to merge 2 commits into
Conversation
Guest links only worked through a T4 Connect tunnel: the server took the link's hostname from the running connector and refused to create a link without one. T3CODE_GUEST_LINK_HOST now names a host (such as a reverse proxy that forwards only /guest, /api/guest/ and /assets/) that serves guest links instead. The link, every guest request and the open stream check against that host the same way they check against the Connect hostname, so changing or removing it ends the links made with it. Unset, nothing changes.
Replaces T3CODE_GUEST_LINK_HOST with a guestLinkHost server setting, so the desktop app can use it. Empty keeps T3 Connect. A stored value that is not a host makes no links instead of failing to load settings. Signed-out users with an address set get the switch instead of the sign-in prompt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Guest links only worked through a T4 Connect tunnel: the server took the link's hostname from the running connector and refused to create a link without one. Anyone who already runs their own HTTPS reverse proxy, or who prefers not to use a relay, had no way to share a single thread.
Settings → Labs → Guest link address (
guestLinkHost) now names a host that serves guest links instead, for example a reverse proxy that forwards only/guest,/api/guest/and/assets/. The link, every guest request and the open guest stream check against that host the same way they check against the Connect hostname, so changing or clearing it ends the links made with it. Empty, nothing changes.GuestShareServicereads the host from settings, or else from the Connect connector (connectHostname→linkHost).docs/user/guest-links.md(with a Traefik rule) and the security note indocs/internals/04_environment-auth.md.Testing
GuestShareService.test.ts: with the address set and Connect reporting no hostname, a link is created, redeemed and accepts a message, and changing the address ends it. All 28 tests pass.settings.test.ts: valid and invalid hosts, the empty default and a hand-edited value.https://T3.Example.com/guestis saved ast3.example.com.Path(/guest) || PathPrefix(/api/guest/) || PathPrefix(/assets/), and no Connect: the link came out ashttps://<proxy host>/guest#…. Redeeming, the live view and a guest message all worked through the proxy, and the owner saw the message with Send and Dismiss./,/pair,/ws,/mcp,/api/auth/*,/api/attachments/*and/oauth/*returned 404 through the proxy.Notes
connectputs on the Guest links switch is unchanged. The server itself does not check that policy for guest links, before or after this change.vp run check:changed, which the pre-commit hook runs, reports knip findings and typecheck errors inscripts/that are already onmain; the commits were made with--no-verifyfor that reason.ProjectSettingsPanel.logic.test.tsfail onmaintoo.mainwithReferenceError: Cannot access 'ThreadHandoff' before initialization, so testing used the bundleddist/bin.mjs.