Reference: carry real traffic through a live bridge, not just one GET #4

Merged
extant2000git merged 1 commits from bridge/forwarder into main 2026-10-14 18:37:21 +00:00
Owner

bridgecheck proves the handshake, the TLS and one GET. It cannot prove a message, because a message takes a signup, a token, a device bundle, a prekey fetch, a POST with a sealed body and a poll to read it back.

bridgeforward listens on a local port and pipes each accepted connection through its own obfs4 handshake to the bridge, so any client or suite can be pointed at 127.0.0.1 and reach the relay the way a bridged app does.

It deliberately does not terminate TLS: the caller speaks TLS end to end through the tunnel. Terminating it here would prove the forwarder works and say nothing about the apps, which is the exact mistake the plain-HTTP upstream made until 2026-10-07.

A fresh handshake per connection rather than one shared tunnel, because a bridge that only survives its first handshake would otherwise pass.

Proven against the live bridge, 2026-10-14. A full exchange on relay1.flamenet.io through 135.148.121.177:8443:

  ok    the relay answers /health through the tunnel
  ok    the certificate is the relay's own (relay1.flamenet.io)
  ok    two accounts were created through the tunnel
  ok    both devices published their bundles
  ok    alice fetched bob's bundle
  ok    the envelope was deposited through the tunnel
  ok    bob's inbox answered through the tunnel
  ok    the envelope arrived
  ok    bob decrypted the exact plaintext alice sealed

10 passed, 0 failed

And the other half of the claim, from the edge access log: ClientHost was the real client address for every one of those requests, and the bridge's own 172.18.255.240 appeared as a client zero times. The PROXY v1 line is doing its job, so a ban or a rate limit lands on one bridged client rather than on all of them.

go vet clean, gofmt clean.

🤖 Generated with Claude Code

`bridgecheck` proves the handshake, the TLS and one GET. It cannot prove a message, because a message takes a signup, a token, a device bundle, a prekey fetch, a POST with a sealed body and a poll to read it back. `bridgeforward` listens on a local port and pipes each accepted connection through its own obfs4 handshake to the bridge, so any client or suite can be pointed at `127.0.0.1` and reach the relay the way a bridged app does. It deliberately does not terminate TLS: the caller speaks TLS end to end through the tunnel. Terminating it here would prove the forwarder works and say nothing about the apps, which is the exact mistake the plain-HTTP upstream made until 2026-10-07. A fresh handshake per connection rather than one shared tunnel, because a bridge that only survives its first handshake would otherwise pass. **Proven against the live bridge, 2026-10-14.** A full exchange on relay1.flamenet.io through `135.148.121.177:8443`: ``` ok the relay answers /health through the tunnel ok the certificate is the relay's own (relay1.flamenet.io) ok two accounts were created through the tunnel ok both devices published their bundles ok alice fetched bob's bundle ok the envelope was deposited through the tunnel ok bob's inbox answered through the tunnel ok the envelope arrived ok bob decrypted the exact plaintext alice sealed 10 passed, 0 failed ``` And the other half of the claim, from the edge access log: `ClientHost` was the real client address for every one of those requests, and the bridge's own `172.18.255.240` appeared as a client zero times. The PROXY v1 line is doing its job, so a ban or a rate limit lands on one bridged client rather than on all of them. `go vet` clean, `gofmt` clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
extant2000git added 1 commit 2026-10-14 18:35:30 +00:00
bridgecheck proves the handshake, the TLS and a single GET. It cannot
prove a message, because a message takes a signup, a token, a device
bundle, a prekey fetch, a POST with a sealed body and a poll to read it
back. The 2026-09-28 OTF answers said bridge users "can reach the relay
from anywhere" while the bridge forwarded to plain HTTP and no app
session could complete, and a GET through the fixed bridge does not
settle that claim either.

bridgeforward listens on a local port and pipes each accepted connection
through its own obfs4 handshake to the bridge, so any client or suite can
be pointed at 127.0.0.1 and reach the relay the way a bridged app does.

It deliberately does not terminate TLS. The caller speaks TLS end to end
through the tunnel, which is the difference that mattered: terminating it
here would prove the forwarder works and say nothing about the apps.

A fresh handshake per connection, rather than one shared tunnel, because
a bridge that only survives its first handshake would otherwise pass.

Proven against the live bridge on 2026-10-14: the relay's own
certificate for relay1.flamenet.io came back through the tunnel, a full
message exchange completed, and Traefik logged the real client address
rather than the bridge's.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Author
Owner

Gate, run locally since this repository has no Gitea workflow yet (only .gitlab-ci.yml):

  • go vet ./bridgeforward clean, gofmt clean.
  • swift test --enable-xctest --disable-swift-testing: 78 tests, 5 skipped. The 5 failures are the interop tests refusing to run without OBFS4_INTEROP_PARAMS, which is their design.
  • Scripts/interop.sh: INTEROP OK: both directions, sans-I/O core and NIO handlers alike, 6 tests, 0 failures. A real lyrebird bridge accepted the Swift client and a real lyrebird client accepted the Swift bridge.

This change adds one Go file under Reference/ and no Swift, so the Swift result is a baseline rather than a verification of it.

🤖 Generated with Claude Code

Gate, run locally since this repository has no Gitea workflow yet (only `.gitlab-ci.yml`): - `go vet ./bridgeforward` clean, `gofmt` clean. - `swift test --enable-xctest --disable-swift-testing`: 78 tests, 5 skipped. The 5 failures are the interop tests refusing to run without `OBFS4_INTEROP_PARAMS`, which is their design. - `Scripts/interop.sh`: `INTEROP OK: both directions, sans-I/O core and NIO handlers alike`, 6 tests, 0 failures. A real lyrebird bridge accepted the Swift client and a real lyrebird client accepted the Swift bridge. This change adds one Go file under `Reference/` and no Swift, so the Swift result is a baseline rather than a verification of it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
extant2000git merged commit 16f4c8a649 into main 2026-10-14 18:37:21 +00:00
extant2000git deleted branch bridge/forwarder 2026-10-14 18:37:21 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: extant2000/flamenet-elligator2#4