Skip to content

Advertise HTTP/1.1 ALPN to avoid Linux TLS-profile blocking - #3

Merged
jeffstephens merged 1 commit into
mainfrom
fix/tls-alpn
Oct 21, 2026
Merged

jeffstephens merged 1 commit into
mainfrom
fix/tls-alpn

Conversation

@jeffstephens

@jeffstephens jeffstephens commented Oct 21, 2026 •

Copy link
Copy Markdown
Owner

Reddit returns non-JSON 403 responses for a Linux/OpenSSL-style handshake while otherwise identical requests succeed with HTTP/1.1 ALPN. Controlled tests alternated the same anonymous token, headers, and listing/encoded-thread URLs: the native-style profile returned 403 and adding ALPN returned valid JSON with 200. Header capitalization, connection reuse, and DNS edge selection did not explain the difference.

Configure the shared HTTPS connector to advertise only http/1.1, matching the protocol the client uses. This covers OAuth, API, and proxied HTTPS requests. Keep the platform TLS defaults, certificate verification, and existing request/route behavior. Add a direct ALPN-enabled native-tls dependency at the already locked version; no dependency versions change.

A loopback regression test reads the actual production connector's TLS ClientHello and asserts its advertised ALPN protocols. Removing the ALPN setting makes this test fail. Local formatting, Clippy, and all 41 offline tests pass. Hosted Linux formatting, Clippy, complete-suite compilation, and all 41 offline tests also passed. Release https://github.com/jeffstephens/redlib/actions/runs/39677199865 published ARM64/AMD64 images from b153b11ccb25.

The actual ARM64 image was functionally checked against Reddit: listings, multiple threads, a comment permalink, additional replies, and proxied image media returned HTTP 200 with expected content. A second fresh process/session also loaded listings and threads. The previous image still received Reddit blocks during the same comparison.

Update generic fork notes; no operator-specific deployment details belong here.

@jeffstephens
jeffstephens merged commit b153b11 into main Oct 21, 2026
2 checks passed
@jeffstephens
jeffstephens deleted the fix/tls-alpn branch October 21, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant