GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(connect): run your own T3 Connect relay with OIDC sign-in by TuroYT · Pull Request #34302 · pingdotgg/t3code

feat(connect): run your own T3 Connect relay with OIDC sign-in #34302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TuroYT wants to merge 43 commits into pingdotgg:main
base: main
Loading
Loading
from TuroYT:t3/self-hosted-connect-service
+8,465 −1,390
Open

feat(connect): run your own T3 Connect relay with OIDC sign-in #34302

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
df12a51
feat(relay): self-hosted T3 Connect relay with OIDC sign-in (WIP)
TuroYT Nov 7, 2026
1ec1f96
feat(connect): choose a self-hosted relay in settings
TuroYT Nov 8, 2026
c318441
fix(relay): self-hosted relay accepts DPoP proofs behind a TLS proxy
TuroYT Nov 10, 2026
a665036
feat(relay): carry environments over a relay channel without a tunnel
TuroYT Nov 10, 2026
dd82dfa
fix(relay): bind relay channels to the environment key and drop revok…
TuroYT Nov 10, 2026
9084db5
feat(relay): serve relay channels under /env/<key> instead of subdomains
TuroYT Nov 10, 2026
ffea460
fix(relay): keep relay channel responses from acting on the relay origin
TuroYT Nov 10, 2026
39f6878
fix(relay): filter relay channel response headers case-insensitively
TuroYT Nov 10, 2026
23bbd87
fix(relay): allowlist response headers from relay channel environments
TuroYT Nov 10, 2026
137386a
fix(relay): reconnect relay channels the relay silently dropped
TuroYT Nov 10, 2026
5bd54c6
feat(connect): deregister environments from a self-hosted relay account
TuroYT Nov 10, 2026
a938d26
fix(connect): label relay-carried environments on the account page
TuroYT Nov 10, 2026
4e1f5c6
fix(connect): self-hosted relay account page loads, and removal dereg…
TuroYT Nov 10, 2026
ff03b4c
fix(mobile): self-hosted sign-in works on Android without Web Crypto
TuroYT Nov 10, 2026
224b5ef
fix(connect): harden relay channels and OIDC sign-in after review
TuroYT Nov 11, 2026
be25dc8
fix(relay): keep carried PDFs sandboxed on the relay origin
TuroYT Nov 11, 2026
2974568
fix(connect): clear typecheck failures and a stale Clerk mock
TuroYT Nov 11, 2026
c0459a7
fix(connect): address the relay review findings
TuroYT Nov 11, 2026
b6f436f
fix(connect): address the second relay review
TuroYT Nov 11, 2026
39eed46
Merge remote-tracking branch 'github/main' into t3/self-hosted-connec…
maria-rcks Nov 11, 2026
f4947bf
fix(connect): keep relay channel readiness current and public key rea…
maria-rcks Nov 11, 2026
d4261ff
Merge remote-tracking branch 'upstream/main' into t3code/pr-34302/t3/…
TuroYT Nov 14, 2026
60b530f
fix(connect): address the third relay review
TuroYT Nov 14, 2026
9ac177c
fix(mobile): blank the OIDC session when SecureStore cannot delete it
TuroYT Nov 14, 2026
fcd681a
fix(connect): describe publish-only relay access accurately
maria-rcks Nov 15, 2026
f6d3c4d
fix(connect): send PKCE with the headless device sign-in
TuroYT Nov 15, 2026
c1ebbef
Merge upstream/main into t3/self-hosted-connect-service
TuroYT Nov 15, 2026
8d808e1
fix(connect): declare Digest for the CLI device sign-in
TuroYT Nov 15, 2026
5e2523a
Merge branch 'main' into t3/self-hosted-connect-service
TuroYT Nov 16, 2026
b685f62
Merge remote-tracking branch 'upstream/main' into pr34302-merge
TuroYT Nov 18, 2026
c388320
fix(connect): translate the self-hosted relay and OIDC copy
TuroYT Nov 18, 2026
2239610
Merge remote-tracking branch 'github/main' into takeover-34302
maria-rcks Nov 18, 2026
b8787c3
fix(relay): show the provider's reason on token errors, document Entr…
TuroYT Nov 18, 2026
dc34ad0
fix(server): startup log no longer prints a stale relay URL
TuroYT Nov 18, 2026
c417cb8
fix(relay): the self-host image no longer ships node_modules
TuroYT Nov 18, 2026
33ef5ca
Merge upstream/main into self-hosted-connect-service
TuroYT Nov 19, 2026
8312715
Merge upstream/main into self-hosted-connect-service
TuroYT Nov 20, 2026
fc23516
Merge upstream/main into self-hosted-connect-service
TuroYT Nov 21, 2026
db05390
Merge upstream/main into self-hosted-connect-service
TuroYT Nov 23, 2026
5ed815a
Merge branch 'main' into t3/self-hosted-connect-service
TuroYT Nov 24, 2026
a357fd3
Merge upstream/main into self-hosted-connect-service
TuroYT Nov 25, 2026
50f6f19
Merge remote-tracking branch 'upstream/main' into t3code/pr-34302/t3/…
TuroYT Nov 26, 2026
9807e81
Merge remote-tracking branch 'upstream/main' into t3code/pr-34302/t3/…
TuroYT Nov 27, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
fix(relay): allowlist response headers from relay channel environments
A denylist left headers such as Clear-Site-Data or Service-Worker-Allowed
free to act on the relay's shared origin. Environment responses now keep
only content, caching, redirect, auth challenge and CORS headers.
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@TuroYT
TuroYT committed Nov 10, 2026
commit 23bbd876227dc95f25478e2aba7b392dea1afdad

There are no files selected for viewing

4 changes: 4 additions & 0 deletions 4 infra/relay/src/host/RelayChannels.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const connectEnvironment = (port: number, token: string) =>
location: "/next",
"Set-Cookie": "s=1",
"Content-Security-Policy": "default-src *",
"Clear-Site-Data": '"*"',
},
body: Buffer.from(echo).toString("base64"),
}),
Expand All @@ -82,6 +83,7 @@ const get = (port: number, path: string) =>
location: response.headers.get("location"),
cookie: response.headers.get("set-cookie"),
csp: response.headers.get("content-security-policy"),
clearSiteData: response.headers.get("clear-site-data"),
};
});

Expand All @@ -98,13 +100,15 @@ describe("makeRelayChannels", () => {
location: `${prefix}/next`,
cookie: null,
csp: "sandbox",
clearSiteData: null,
});
expect(yield* get(port, "/v1/metadata")).toEqual({
status: 200,
body: "relay api",
location: null,
cookie: null,
csp: null,
clearSiteData: null,
});
}).pipe(Effect.scoped, Effect.provide(makeLayer())),
);
Expand Down
50 changes: 35 additions & 15 deletions 50 infra/relay/src/host/RelayChannels.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,45 @@ function parseFrame(chunk: string | Uint8Array): Option.Option<RelayChannelFrame
}
}

// Headers the relay owns on a carried environment's responses; the environment's own are dropped.
const RELAY_OWNED_RESPONSE_HEADERS = new Set([
"set-cookie",
"set-cookie2",
"content-security-policy",
"content-security-policy-report-only",
"x-content-type-options",
// Response headers a carried environment may send through the relay's shared origin: content,
// caching, redirects, auth challenges and CORS. Anything else, such as cookies or site policies,
// would act on the relay origin itself.
const ALLOWED_RESPONSE_HEADERS = new Set([
"content-type",
"content-range",
"content-disposition",
"content-encoding",
"content-language",
"accept-ranges",
"cache-control",
"etag",
"last-modified",
"expires",
"vary",
"location",
"www-authenticate",
"retry-after",
"dpop-nonce",
"access-control-allow-origin",
"access-control-allow-credentials",
"access-control-allow-methods",
"access-control-allow-headers",
"access-control-expose-headers",
"access-control-max-age",
]);

/** Lowercases names, which frames from an environment need not do, then drops `excluded`. */
function withoutHopByHop(
headers: Readonly<Record<string, string>>,
excluded: ReadonlySet<string> = HOP_BY_HOP_HEADERS,
): Record<string, string> {
function withoutHopByHop(headers: Readonly<Record<string, string>>): Record<string, string> {
return Object.fromEntries(
Object.entries(headers).filter(([name]) => !HOP_BY_HOP_HEADERS.has(name.toLowerCase())),
);
}

/** Lowercases names, which frames from an environment need not do, and keeps the allowlist. */
function allowedResponseHeaders(headers: Readonly<Record<string, string>>): Record<string, string> {
return Object.fromEntries(
Object.entries(headers)
.map(([name, value]) => [name.toLowerCase(), value] as const)
.filter(([name]) => !HOP_BY_HOP_HEADERS.has(name) && !excluded.has(name)),
.filter(([name]) => ALLOWED_RESPONSE_HEADERS.has(name)),
);
}

Expand Down Expand Up @@ -193,9 +214,8 @@ export const makeRelayChannels = () => {
if (Option.isNone(result)) {
return HttpServerResponse.text("The environment did not answer in time.", { status: 504 });
}
const { "content-type": contentType, ...forwarded } = withoutHopByHop(
const { "content-type": contentType, ...forwarded } = allowedResponseHeaders(
result.value.headers,
RELAY_OWNED_RESPONSE_HEADERS,
);
// Every carried environment shares the relay's origin, and anyone can link one: its responses
// may not run script there or set cookies the relay and other environments would see.
Expand Down
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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.