Repository navigation
Conversation
The egress.websocket_session span is sampled at 1% and carries nothing that identifies the consumer, so the egress cannot say whether a given client reached it. - egress: one Info line per WebSocket session at teardown (CSID prefix, bytes, streams, duration, teardown reason, countries), keyed like the span's attributes. - consumer hello: once per QUIC connection the consumer can send a small JSON hello (outbound tag, client version, platform) on a unidirectional stream. Bidirectional streams are the proxied traffic the SOCKS5 server consumes, so the hello never touches them, and an egress that predates it never accepts the stream. It rides inside QUIC, out of the donor's sight. - clientcore: QUICLayer.SetConsumerHello sends it on every accepted connection. Part of getlantern/engineering#3702. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
This was referenced Oct 7, 2026
This branch has not been deployed
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.
context
egress.websocket_sessionis sampled at 1% (about 72 spans/day, so roughly 7k sessions/day), and nothing on it identifies the consumer: the egress only sees the donor, the random CSID and an optional countrysummary
Per-session log line (sessionlog.go)
broflake.*attribute names, so one query works on eitherConsumer hello (common/hello.go, egress/hello.go)
tag,client_version,platform) sent once per QUIC connection on a unidirectional streamClient (clientcore/quic.go)
QUICLayer.SetConsumerHellomakes every accepted connection send the hello in a goroutine, best-effort with a 10s timeoutTests
sendConsumerHelloover a real loopback QUIC pair, consumer as server like productiongo test -race ./...passes; thego vetwarnings inegresslib.goandclientcoreare pre-existing on mainopen questions
Log volume.
otellogs.gokeeps exported Info lines bounded by construction (~10k/day). This line is one per session, so it grows with traffic: ~7k/day today. OK as-is, or should it be sampled/rate-limited, or kept unexported?Hook. Is a uni stream inside QUIC the right place for consumer → egress metadata, or is there a better one?
Device ID. This sends no device ID yet. The device ID is already a telemetry attribute elsewhere (lantern-cloud's
config.device_id, and lantern-box sends it to other proxies viatracker/clientcontext), so logging it here is in line with existing practice. The requirement is that it only travels to an authenticated egress. The hello is encrypted inside QUIC, so a passive donor can't read it, but nothing authenticates the egress today (next point), so a malicious donor could impersonate the egress and read it.Egress authentication. The consumer verifies the egress only when the track sets
egress_caandegress_server_name, and every egress build generates a new self-signed cert on each start (GenerateSelfSignedTLSConfig(true)incmd/sing-box,cmd/http,cmd/socks5), so production can't currently verify it. Proposal:egress_ca/egress_server_nameon the unbounded track. Current clients already honour those options, so every egress must present the cert before the track options are setDoes that match how you'd want to do egress authentication?
deploy
The egress can ship first through lantern-cloud's
deploy/egress/VERSION. Consumers on an old egress are unaffected, and old consumers simply send no hello.🤖 Generated with Claude Code