Skip to content

feat(dmsg): surface the dmsg-server connection protocol (tcp/ws/wss/webtransport/quic)#3507

Merged
0pcom merged 1 commit into
skycoin:developfrom
0pcom:feat/dmsg-connection-protocol
Jul 17, 2026
Merged

feat(dmsg): surface the dmsg-server connection protocol (tcp/ws/wss/webtransport/quic)#3507
0pcom merged 1 commit into
skycoin:developfrom
0pcom:feat/dmsg-connection-protocol

Conversation

@0pcom

@0pcom 0pcom commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

What

Surface the underlying protocol a visor's dmsg client(s) use to reach each dmsg server — tcp / ws / wss / webtransport / quic — from the CLI, the visor RPC/HTTP API, and the wasm (browser) visor's self-summary.

Until now the carrier a session was dialed over was recorded internally (SessionCommon.carrier, used by the browser wss→WebTransport upgrade) but never exposed. You could see which dmsg servers a client was connected to, not how.

Why

Groundwork for the wasm-visor onboarding tour, which will explain dmsg-servers-as-anonymous-relay and the connection protocol (which differs for a browser visor over http vs https, and again for a host-native visor). More generally it's a useful diagnostic: a native visor connects over tcp, a browser tab over wss/webtransport, and now you can tell at a glance — including from a shell.

Changes

  • dmsg (pkg/dmsg/dmsg): SessionCommon.Carrier() / CarrierAddr() / Protocol() accessors; record the dialed endpoint in a new carrierAddr field; ProtocolLabel(carrier, addr) helper that distinguishes plain ws:// from TLS wss:// by endpoint scheme and renders accepted for inbound server-side sessions. Unit-tested.
  • visor (pkg/visor): new DmsgServerSession{pk,carrier,protocol,address}; DmsgClientSessionInfo gains a parallel sessions field (the existing servers []PubKey is kept untouched for back-compat). DmsgSessions() populates it from AllSessions().
  • CLI: skywire cli dmsg sessions prints the protocol next to each server (falls back to bare PKs against an older visor).
  • wasm (cmd/wasm-visor): SelfDmsgSessions() emits the same sessions shape so the shared Angular UI and the tour get the browser edge's ws/wss/webtransport per server.

Validation

  • go test ./pkg/dmsg/dmsg (new TestProtocolLabel), native + GOOS=js GOARCH=wasm builds, gofmt/vet clean.
  • Live against a native visor: dmsg sessions shows tcp for every server across the main and transport_setup clients; --json{pk, carrier:"tcp", protocol:"tcp", address:"172.105.179.5:30085"} with servers[] still present.

🤖 Generated with Claude Code

@0pcom
0pcom force-pushed the feat/dmsg-connection-protocol branch from 049442f to 0d0140e Compare July 17, 2026 21:54
@0pcom
0pcom merged commit 97fb74c into skycoin:develop Jul 17, 2026
5 of 12 checks passed
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