You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Workstream E of the PR #350 follow-up re-review. The iOS-specific generic DNS-SD advertise blocker found against head a77e9c9. Needs an iOS device to verify. Tracked under #361.
Summary
The generic DNS-SD advertise() API is contracted as "advertise an existing service on this port" (matching Android and desktop). The iOS implementation instead creates an NWListener on that port, taking over the socket. If the application's own service already owns the port, registration fails with an address conflict; if the port was free, the plugin advertises a listener whose newConnectionHandler immediately cancels every incoming connection — a blackhole that rejects every client rather than surfacing the caller's real service.
Evidence
Head a77e9c9. packages/iroh-http-tauri/ios/Sources/IrohHttpPlugin.swift:522-550 — generic advertise creates an NWListener bound to the advertised port and its newConnectionHandler cancels connections. Contrast the Android/desktop generic path, which publishes a record for an already-listening service without binding the socket (see #365 evidence for the cross-adapter generic path).
Impact
Generic advertise() on iOS is unusable for its stated purpose: either it fails to register (port already owned by the real service) or it advertises a black hole (port free → every client connection cancelled). Semantics diverge from Android/desktop and the spec.
Remediation
Use a Bonjour registration mechanism that publishes an existing service without taking over its socket (e.g. NetService/DNSServiceRegister-style advertisement of an external port), or redesign the iOS API so the plugin explicitly owns and forwards the service. Align the generic-advertise contract across all three platforms as part of #365's boundary definition.
Acceptance criteria
On iOS, advertise() publishes a DNS-SD record for a service the application already listens on, without binding or hijacking the port.
An integration test with a real server already listening on the advertised port shows: registration succeeds and a browsing peer can connect to the real service (no blackhole, no address conflict).
Workstream E of the PR #350 follow-up re-review. The iOS-specific generic DNS-SD advertise blocker found against head
a77e9c9. Needs an iOS device to verify. Tracked under #361.Summary
The generic DNS-SD
advertise()API is contracted as "advertise an existing service on this port" (matching Android and desktop). The iOS implementation instead creates anNWListeneron that port, taking over the socket. If the application's own service already owns the port, registration fails with an address conflict; if the port was free, the plugin advertises a listener whosenewConnectionHandlerimmediately cancels every incoming connection — a blackhole that rejects every client rather than surfacing the caller's real service.Evidence
Head
a77e9c9.packages/iroh-http-tauri/ios/Sources/IrohHttpPlugin.swift:522-550— generic advertise creates anNWListenerbound to the advertised port and itsnewConnectionHandlercancels connections. Contrast the Android/desktop generic path, which publishes a record for an already-listening service without binding the socket (see #365 evidence for the cross-adapter generic path).Impact
Generic
advertise()on iOS is unusable for its stated purpose: either it fails to register (port already owned by the real service) or it advertises a black hole (port free → every client connection cancelled). Semantics diverge from Android/desktop and the spec.Remediation
Use a Bonjour registration mechanism that publishes an existing service without taking over its socket (e.g.
NetService/DNSServiceRegister-style advertisement of an external port), or redesign the iOS API so the plugin explicitly owns and forwards the service. Align the generic-advertise contract across all three platforms as part of #365's boundary definition.Acceptance criteria
advertise()publishes a DNS-SD record for a service the application already listens on, without binding or hijacking the port.