Repository navigation
Add AdminUri to eSCL server advertisement and capabilities - #895
Conversation
Instead of letting the caller configure an admin URI, derive it from the device like the icon URI, and add a /eSCL/admin endpoint with a basic status page so the advertised URL actually resolves.
|
Updated in 1caa8cc per the review:
|
|
CI on 1caa8cc failed to build on Windows — The follow-up run builds fine on all three OSes, but the Windows job then hit the 15-minute job timeout: |
|
Already re-ran and merged, CI passes on |
Motivation
The eSCL spec requires an
adminurlkey in the_uscan/_uscansTXT records, and some clients depend on it. In particular, SwiftESCL-based apps (e.g. OpenAirScan on iOS) silently drop any discovery result whose TXT record has noadminurl(see LeoKlaus/SwiftESCL#10), so scanners shared by NAPS2 never show up there at all.The server also always emitted an empty
<scan:AdminURI>element in ScannerCapabilities. This PR fills both in with a real, functional URL.Changes
MdnsAdvertiser: unconditionally emitadminurl=<protocol>://naps2-{uuid}.local.:{port}/eSCL/admin, in the same format as the existingrepresentation(icon) keyEsclApiController: fill<scan:AdminURI>with the same URL instead of hardcoding"", and add aGET /eSCL/adminendpoint so the advertised URL actually resolves — it serves a basic status page (model, manufacturer, serial, UUID, active job count)ClientServerTests: assert the advertisedAdminURIand that the admin page respondsTesting
NAPS2.Escl.Testspass (net10.0); NAPS2.Escl.Server builds clean for net8/netstandard2.0, NAPS2.Sdk/NAPS2.Lib build clean_uscansTXT record carriesadminurl(checked from another Mac viadns-sd -L), macOS Image Capture is unaffected, and OpenAirScan on iOS can then discover the shared scanner