Say why when the relay refuses the connection #142

Merged
littlefox merged 1 commit from issue-133-relay-refusal into main 2026-10-19 08:28:20 +00:00
Owner

Closes #133

The relay accepts a connection it won't serve and closes it with 4004/4005/4006; the login says what happened (full for your address, full, page not allowed) instead of 'check the address'.

Verified: relay integration tests (per-address, total, forwarded-for, origins), and the new e2e relay.spec (full relay, disallowed origin, no relay) plus tls.spec in Chromium.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8

Closes #133 The relay accepts a connection it won't serve and closes it with 4004/4005/4006; the login says what happened (full for your address, full, page not allowed) instead of 'check the address'. Verified: relay integration tests (per-address, total, forwarded-for, origins), and the new e2e relay.spec (full relay, disallowed origin, no relay) plus tls.spec in Chromium. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Say why when the relay refuses the connection
All checks were successful
ci / check (push) Successful in 10m40s
ci / desktop (push) Successful in 16m19s
ci / e2e (push) Successful in 29m51s
b4f2474819
A browser only sees 'connection failed' for a refused WebSocket
handshake, so a full relay or a disallowed page showed 'Kunde inte nå
servern, kontrollera adressen', which sent people looking in the wrong
place. The relay now accepts such connections and closes them at once
with a code (4004 full for this address, 4005 full, 4006 origin not
allowed), and the login says what happened.

Refs #133

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
littlefox referenced this pull request from a commit 2026-10-19 21:34:00 +00:00
Sign in to join this conversation.
No description provided.