Skip to content

Commit bb9e581

Browse files
tabcatclaude
andcommitted
feat: expose localUfrag on IceUdpMuxRequest
Passes through `rtc::IceUdpMuxRequest::localUfrag` from libdatachannel to the JS `onUnhandledStunRequest` callback. Needed by the libp2p WebRTC-Direct v2 transport design (libp2p/specs#715). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 0fd224d commit bb9e581

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/cpp/ice-udp-mux-listener-wrapper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ void IceUdpMuxListenerWrapper::onUnhandledStunRequest(const Napi::CallbackInfo &
145145
{
146146
Napi::Object reqObj = Napi::Object::New(env);
147147
reqObj.Set("ufrag", request.remoteUfrag.c_str());
148+
reqObj.Set("localUfrag", request.localUfrag.c_str());
148149
reqObj.Set("host", request.remoteAddress.c_str());
149150
reqObj.Set("port", request.remotePort);
150151

src/lib/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export type Direction = 'SendOnly' | 'RecvOnly' | 'SendRecv' | 'Inactive' | 'Unk
157157

158158
export interface IceUdpMuxRequest {
159159
ufrag: string;
160+
localUfrag: string;
160161
host: string;
161162
port: number;
162163
}

0 commit comments

Comments
 (0)