Skip to content
This repository was archived by the owner on Sep 11, 2026. It is now read-only.

Bind incoming ICE acceptance, identity configuration and transport cleanup - #4

Draft
ziaxzulu wants to merge 12 commits into
upstreamfrom
nxs-dev
Draft

Bind incoming ICE acceptance, identity configuration and transport cleanup#4
ziaxzulu wants to merge 12 commits into
upstreamfrom
nxs-dev

Conversation

@ziaxzulu

@ziaxzulu ziaxzulu commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Expose incoming ICE requests as metadata and asynchronous acceptance decisions. Native code retains and authenticates the first STUN request; Java installs callbacks before acceptance. Applications can approve a new peer or another source tuple for an existing peer. Ordinary transport packets stay native.

Contribution Dependency
Detach callbacks before handle deletion; filter native logs before JNI Independent lifecycle/logging fixes.
Bind PEM identities and explicit ICE credentials Existing upstream native configuration APIs.
Bind incoming acceptance and asynchronous transport cleanup Proposed libdatachannel APIs and their libjuice dependency.

Acceptance.builder(...), shared DtlsIdentity configuration and named statistics() replace positional setup and counters. Existing constructors and stats() remain deprecated compatibility adapters. Acceptance.reuse(peer) preserves the peer's identity, channels and ownership, including on failed attachment.

Waiting-request cancellation releases admission slots independently of the application executor. Completion continuations run outside deadline and JNI callback threads. An initializer already running retains its prepared peer until it returns and cleanup completes.

PeerConnection.closeAsync() completes after transport destruction and Java cleanup; closeAndAwait is the blocking convenience. Construction diagnostics are package-private and require a native test build. Native logging defaults to WARNING and can be changed before or after loading.

Validation: six native regressions, both upstream JNI lifecycle tests, and Java transport/logging/collection probes pass. Coverage includes stalled executors, reentrant close, peer reuse, forged integrity and wrong fingerprints, plus real UDP/DTLS/SCTP exchanges with 167/178/256-character usernames. Production JNI also builds and passes lifecycle tests with diagnostics disabled. API, ownership and test details, source attribution.

This owned aggregate draft keeps upstream as a mirror. Portable packaging and application integration require their own validation.

Retains upstream stable JNI lifetime fixes and adapts the Java wrapper ordering fix from 7885652.
Adapt identity and credential hooks from 39ec8c6 to upstream rtcConfiguration certificate fields and rtcSetLocalDescriptionEx. Include encrypted-key passwords, nullable description types and native construction diagnostics.
Preserve native callback ownership and bounded queues while moving protocol-specific fixtures downstream. Generic real UDP regressions cover imported fingerprints, explicit ICE credentials, delayed first-request delivery, wrong fingerprints and native cleanup. Adapted from 39ec8c6, 0812c7e, 5544964, 4a12f67 and 40f2c32.
…acts

Keep fork coordinates and artifact provenance distinct from upstream releases; validate nxs-dev without invoking publishing workflows. Adopt current upstream master ABI and the generic owned mux/lifecycle dependency chain.
@ziaxzulu ziaxzulu changed the title Prepare identity, ICE and guarded native lifecycle bindings Expose certificate and ICE settings, packet checks, and cleanup completion Sep 6, 2026
@ziaxzulu ziaxzulu changed the title Expose certificate and ICE settings, packet checks, and cleanup completion Expose asynchronous incoming connections, identity settings and safe cleanup Sep 6, 2026
@ziaxzulu ziaxzulu changed the title Expose asynchronous incoming connections, identity settings and safe cleanup Bind incoming ICE acceptance, identity configuration and transport cleanup Sep 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant