@agentdance/node-webrtc-dtls 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -0
- package/package.json +2 -1
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @agentdance/node-webrtc-dtls
|
|
2
|
+
|
|
3
|
+
RFC 6347 DTLS 1.2 transport for Node.js — part of the [`@agentdance/node-webrtc`](https://github.com/agent-dance/node-webrtc) pure-TypeScript WebRTC stack.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Full client + server handshake state machine
|
|
8
|
+
- ECDHE P-256, AES-128-GCM
|
|
9
|
+
- Self-signed certificate via pure ASN.1/DER builder (no OpenSSL)
|
|
10
|
+
- RFC 5763 §5 role negotiation (actpass / active / passive)
|
|
11
|
+
- 60-byte SRTP keying material export
|
|
12
|
+
- Zero native dependencies
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @agentdance/node-webrtc-dtls
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { DtlsTransport } from '@agentdance/node-webrtc-dtls';
|
|
24
|
+
|
|
25
|
+
const dtls = new DtlsTransport(iceTransport, {
|
|
26
|
+
role: 'client', // or 'server'
|
|
27
|
+
remoteFingerprint: { algorithm: 'sha-256', value: '…' },
|
|
28
|
+
});
|
|
29
|
+
await dtls.start();
|
|
30
|
+
dtls.on('connected', () => {
|
|
31
|
+
const keys = dtls.getSrtpKeyingMaterial();
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Full Documentation
|
|
36
|
+
|
|
37
|
+
See the [main package README](https://github.com/agent-dance/node-webrtc#readme) for the complete API reference, usage examples, and architecture overview.
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentdance/node-webrtc-dtls",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "RFC 6347 DTLS 1.2 transport — full handshake, ECDHE P-256, AES-128-GCM, self-signed cert via pure ASN.1/DER. Part of the @agentdance/node-webrtc stack.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webrtc",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
|
+
"README.md",
|
|
37
38
|
"dist",
|
|
38
39
|
"src"
|
|
39
40
|
],
|