peerpigeon 0.1.1 → 1.0.2
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 +141 -1365
- package/cli.js +1382 -0
- package/dist/peerpigeon-browser.js +12450 -0
- package/dist/peerpigeon-browser.js.map +7 -0
- package/docs/API_DOCUMENTATION.md +1976 -0
- package/docs/BOOTSTRAP_HUBS.md +319 -0
- package/docs/CLI_README.md +371 -0
- package/docs/CUSTOM_HUB_NAMESPACES.md +182 -0
- package/docs/CUSTOM_NAMESPACE_IMPLEMENTATION.md +187 -0
- package/docs/DOCUMENTATION_REORGANIZATION.md +172 -0
- package/docs/HUB_QUICK_REF.md +108 -0
- package/docs/HUB_SCRIPTS.md +341 -0
- package/docs/HUB_SYSTEM.md +599 -0
- package/docs/MIGRATION_COMPLETE.md +93 -0
- package/docs/NETWORK_NAMESPACES.md +212 -0
- package/docs/PIGEONRTC_MIGRATION.md +280 -0
- package/docs/README.md +108 -0
- package/docs/SELECTIVE_STREAMING_GUIDE.md +427 -0
- package/docs/TEST_CLEANUP_COMPLETE.md +80 -0
- package/examples/bootstrap-hub-example.js +292 -0
- package/examples/browser/README.md +278 -0
- package/examples/browser/app.js +2426 -49
- package/examples/browser/index.html +481 -630
- package/examples/browser/minimal/README.md +55 -0
- package/examples/browser/minimal/index.html +75 -0
- package/examples/browser/minimal/minimal.js +234 -0
- package/examples/browser/styles.css +687 -1425
- package/examples/browser/test-bundle.html +35 -0
- package/examples/browser-2/index.html +30 -0
- package/examples/browser-2/package.json +21 -0
- package/examples/browser-2/src/App-simple.vue +21 -0
- package/examples/browser-2/src/App.vue +420 -0
- package/examples/browser-2/src/components/CryptoView.vue +1661 -0
- package/examples/browser-2/src/components/DHTView.vue +1281 -0
- package/examples/browser-2/src/components/DebugView.vue +1773 -0
- package/examples/browser-2/src/components/MediaView.vue +1048 -0
- package/examples/browser-2/src/components/MessagingView.vue +775 -0
- package/examples/browser-2/src/components/NetworkView.vue +930 -0
- package/examples/browser-2/src/components/StorageView.vue +1376 -0
- package/examples/browser-2/src/main.js +5 -0
- package/examples/browser-2/src/stores/peerpigeon.js +895 -0
- package/examples/browser-2/vite.config.js +6 -0
- package/examples/hub-example.js +189 -0
- package/examples/multi-hub-test.js +186 -0
- package/examples/node/README.md +2 -2
- package/examples/programmatic-namespace-example.js +108 -0
- package/examples/selective-streaming-demo.html +698 -0
- package/examples/standard-events-demo.js +126 -0
- package/index.js +7 -1
- package/package.json +34 -16
- package/server/index.js +1058 -98
- package/server/start.js +52 -0
- package/src/ConnectionManager.js +239 -225
- package/src/CryptoManager.js +147 -18
- package/src/DebugLogger.js +0 -7
- package/src/DistributedStorageManager.js +224 -205
- package/src/EnvironmentDetector.js +88 -4
- package/src/EventEmitter.js +79 -1
- package/src/EvictionManager.js +10 -9
- package/src/GossipManager.js +163 -11
- package/src/MediaManager.js +12 -2
- package/src/PeerConnection.js +343 -311
- package/src/PeerPigeonMesh.js +576 -135
- package/src/PigeonRTC-browser.js +247 -0
- package/src/SignalingClient.js +14 -243
- package/src/SignalingHandler.js +31 -10
- package/src/StorageManager.js +0 -39
- package/src/WebDHT-Simple.js +389 -0
- package/src/WebDHT.js +363 -1165
- package/src/browser-entry.js +58 -0
- package/examples/browser/assets/images/favicon.png +0 -0
- package/examples/browser/assets/images/pigeon.png +0 -0
- package/examples/browser/crypto-test.html +0 -427
- package/examples/browser/ui-old.js +0 -1926
- package/examples/browser/ui.js +0 -3391
- package/websocket-server/README.md +0 -247
- package/websocket-server/server.js +0 -391
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Browser entry point that bundles UnSEA crypto library
|
|
2
|
+
// This file is used by esbuild to create a self-contained browser bundle
|
|
3
|
+
|
|
4
|
+
// Import UnSEA directly from node_modules (esbuild will bundle it)
|
|
5
|
+
import * as UnSEA from 'unsea';
|
|
6
|
+
|
|
7
|
+
// Import browser-specific PigeonRTC (avoids Node.js dependencies)
|
|
8
|
+
import { createPigeonRTC, PigeonRTC, BrowserRTCAdapter, RTCAdapter } from './PigeonRTC-browser.js';
|
|
9
|
+
|
|
10
|
+
// Import only browser-compatible components
|
|
11
|
+
export { PeerPigeonMesh } from '../src/PeerPigeonMesh.js';
|
|
12
|
+
export { PeerConnection } from '../src/PeerConnection.js';
|
|
13
|
+
export { SignalingClient } from '../src/SignalingClient.js';
|
|
14
|
+
export { WebDHT } from '../src/WebDHT.js';
|
|
15
|
+
export { DistributedStorageManager } from '../src/DistributedStorageManager.js';
|
|
16
|
+
|
|
17
|
+
// Export debug logger for controlling console output
|
|
18
|
+
export { default as DebugLogger } from '../src/DebugLogger.js';
|
|
19
|
+
|
|
20
|
+
// Export environment detection utilities
|
|
21
|
+
export {
|
|
22
|
+
EnvironmentDetector,
|
|
23
|
+
environmentDetector,
|
|
24
|
+
isBrowser,
|
|
25
|
+
isNodeJS,
|
|
26
|
+
isWorker,
|
|
27
|
+
hasWebRTC,
|
|
28
|
+
hasWebSocket,
|
|
29
|
+
getEnvironmentReport,
|
|
30
|
+
initWebRTCAsync
|
|
31
|
+
} from '../src/EnvironmentDetector.js';
|
|
32
|
+
|
|
33
|
+
// Make UnSEA available globally for the existing dynamic import logic
|
|
34
|
+
// This allows the CryptoManager to detect and use the bundled version
|
|
35
|
+
if (typeof globalThis !== 'undefined') {
|
|
36
|
+
globalThis.__PEERPIGEON_UNSEA__ = UnSEA;
|
|
37
|
+
globalThis.__PEERPIGEON_PIGEONRTC__ = {
|
|
38
|
+
createPigeonRTC,
|
|
39
|
+
PigeonRTC,
|
|
40
|
+
BrowserRTCAdapter,
|
|
41
|
+
RTCAdapter,
|
|
42
|
+
default: createPigeonRTC
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Also set it on window for browser compatibility
|
|
47
|
+
if (typeof window !== 'undefined') {
|
|
48
|
+
window.__PEERPIGEON_UNSEA__ = UnSEA;
|
|
49
|
+
window.__PEERPIGEON_PIGEONRTC__ = {
|
|
50
|
+
createPigeonRTC,
|
|
51
|
+
PigeonRTC,
|
|
52
|
+
BrowserRTCAdapter,
|
|
53
|
+
RTCAdapter,
|
|
54
|
+
default: createPigeonRTC
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
console.log('🔐 PeerPigeon browser bundle loaded with embedded UnSEA crypto and PigeonRTC');
|
|
Binary file
|
|
Binary file
|
|
@@ -1,427 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>PeerPigeon - Crypto Test Suite</title>
|
|
7
|
-
<link rel="stylesheet" href="styles.css">
|
|
8
|
-
<link rel="icon" type="image/png" href="assets/images/favicon.png">
|
|
9
|
-
<style>
|
|
10
|
-
.crypto-test-container {
|
|
11
|
-
max-width: 1200px;
|
|
12
|
-
margin: 0 auto;
|
|
13
|
-
padding: 20px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.test-section {
|
|
17
|
-
background: #f5f5f5;
|
|
18
|
-
border: 1px solid #ddd;
|
|
19
|
-
border-radius: 8px;
|
|
20
|
-
padding: 20px;
|
|
21
|
-
margin: 20px 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.test-section h3 {
|
|
25
|
-
margin: 0 0 15px 0;
|
|
26
|
-
color: #333;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.test-controls {
|
|
30
|
-
display: flex;
|
|
31
|
-
gap: 10px;
|
|
32
|
-
flex-wrap: wrap;
|
|
33
|
-
margin: 15px 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.test-result {
|
|
37
|
-
background: #fff;
|
|
38
|
-
border: 1px solid #ccc;
|
|
39
|
-
border-radius: 4px;
|
|
40
|
-
padding: 15px;
|
|
41
|
-
margin: 10px 0;
|
|
42
|
-
font-family: monospace;
|
|
43
|
-
font-size: 12px;
|
|
44
|
-
max-height: 200px;
|
|
45
|
-
overflow-y: auto;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.test-result.success {
|
|
49
|
-
border-color: #28a745;
|
|
50
|
-
background-color: #d4edda;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.test-result.error {
|
|
54
|
-
border-color: #dc3545;
|
|
55
|
-
background-color: #f8d7da;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.test-result.warning {
|
|
59
|
-
border-color: #ffc107;
|
|
60
|
-
background-color: #fff3cd;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.crypto-status {
|
|
64
|
-
display: grid;
|
|
65
|
-
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
66
|
-
gap: 15px;
|
|
67
|
-
margin: 20px 0;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.status-card {
|
|
71
|
-
background: #fff;
|
|
72
|
-
border: 1px solid #ddd;
|
|
73
|
-
border-radius: 6px;
|
|
74
|
-
padding: 15px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.status-card h4 {
|
|
78
|
-
margin: 0 0 10px 0;
|
|
79
|
-
color: #555;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.status-indicator {
|
|
83
|
-
display: inline-block;
|
|
84
|
-
width: 12px;
|
|
85
|
-
height: 12px;
|
|
86
|
-
border-radius: 50%;
|
|
87
|
-
margin-right: 8px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.status-indicator.active {
|
|
91
|
-
background-color: #28a745;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.status-indicator.inactive {
|
|
95
|
-
background-color: #dc3545;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.status-indicator.warning {
|
|
99
|
-
background-color: #ffc107;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.key-display {
|
|
103
|
-
font-family: monospace;
|
|
104
|
-
font-size: 10px;
|
|
105
|
-
word-break: break-all;
|
|
106
|
-
background: #f8f9fa;
|
|
107
|
-
padding: 8px;
|
|
108
|
-
border-radius: 4px;
|
|
109
|
-
margin: 5px 0;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.performance-metrics {
|
|
113
|
-
display: grid;
|
|
114
|
-
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
115
|
-
gap: 10px;
|
|
116
|
-
margin: 15px 0;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.metric-item {
|
|
120
|
-
text-align: center;
|
|
121
|
-
padding: 10px;
|
|
122
|
-
background: #fff;
|
|
123
|
-
border: 1px solid #ddd;
|
|
124
|
-
border-radius: 4px;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.metric-value {
|
|
128
|
-
font-size: 18px;
|
|
129
|
-
font-weight: bold;
|
|
130
|
-
color: #007bff;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.metric-label {
|
|
134
|
-
font-size: 12px;
|
|
135
|
-
color: #666;
|
|
136
|
-
margin-top: 5px;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.peer-keys-list {
|
|
140
|
-
max-height: 150px;
|
|
141
|
-
overflow-y: auto;
|
|
142
|
-
border: 1px solid #ddd;
|
|
143
|
-
border-radius: 4px;
|
|
144
|
-
background: #fff;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.peer-key-item {
|
|
148
|
-
padding: 8px 12px;
|
|
149
|
-
border-bottom: 1px solid #eee;
|
|
150
|
-
font-family: monospace;
|
|
151
|
-
font-size: 11px;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.peer-key-item:last-child {
|
|
155
|
-
border-bottom: none;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.test-message-area {
|
|
159
|
-
margin: 15px 0;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.test-message-area textarea {
|
|
163
|
-
width: 100%;
|
|
164
|
-
min-height: 80px;
|
|
165
|
-
padding: 10px;
|
|
166
|
-
border: 1px solid #ddd;
|
|
167
|
-
border-radius: 4px;
|
|
168
|
-
font-family: monospace;
|
|
169
|
-
font-size: 12px;
|
|
170
|
-
resize: vertical;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.encryption-demo {
|
|
174
|
-
display: grid;
|
|
175
|
-
grid-template-columns: 1fr 1fr;
|
|
176
|
-
gap: 20px;
|
|
177
|
-
margin: 20px 0;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.demo-panel {
|
|
181
|
-
border: 1px solid #ddd;
|
|
182
|
-
border-radius: 6px;
|
|
183
|
-
padding: 15px;
|
|
184
|
-
background: #fff;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.demo-panel h4 {
|
|
188
|
-
margin: 0 0 10px 0;
|
|
189
|
-
color: #333;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
@media (max-width: 768px) {
|
|
193
|
-
.encryption-demo {
|
|
194
|
-
grid-template-columns: 1fr;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.crypto-status {
|
|
198
|
-
grid-template-columns: 1fr;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
</style>
|
|
202
|
-
</head>
|
|
203
|
-
<body>
|
|
204
|
-
<div class="crypto-test-container">
|
|
205
|
-
<header>
|
|
206
|
-
<h1>🔐 PeerPigeon Crypto Test Suite</h1>
|
|
207
|
-
<p>Comprehensive testing interface for cryptographic functionality using unsea.</p>
|
|
208
|
-
</header>
|
|
209
|
-
|
|
210
|
-
<!-- Crypto Status Overview -->
|
|
211
|
-
<div class="test-section">
|
|
212
|
-
<h3>📊 Crypto Status</h3>
|
|
213
|
-
<div class="crypto-status">
|
|
214
|
-
<div class="status-card">
|
|
215
|
-
<h4>
|
|
216
|
-
<span id="crypto-enabled-indicator" class="status-indicator inactive"></span>
|
|
217
|
-
Crypto Manager
|
|
218
|
-
</h4>
|
|
219
|
-
<div>Status: <span id="crypto-status">Not Initialized</span></div>
|
|
220
|
-
<div>Keypair: <span id="keypair-status">None</span></div>
|
|
221
|
-
</div>
|
|
222
|
-
|
|
223
|
-
<div class="status-card">
|
|
224
|
-
<h4>
|
|
225
|
-
<span id="mesh-status-indicator" class="status-indicator inactive"></span>
|
|
226
|
-
Mesh Network
|
|
227
|
-
</h4>
|
|
228
|
-
<div>Connected: <span id="mesh-connected">No</span></div>
|
|
229
|
-
<div>Peers: <span id="peer-count">0</span></div>
|
|
230
|
-
</div>
|
|
231
|
-
|
|
232
|
-
<div class="status-card">
|
|
233
|
-
<h4>Public Key</h4>
|
|
234
|
-
<div id="public-key-display" class="key-display">Not generated</div>
|
|
235
|
-
</div>
|
|
236
|
-
|
|
237
|
-
<div class="status-card">
|
|
238
|
-
<h4>Performance Metrics</h4>
|
|
239
|
-
<div class="performance-metrics">
|
|
240
|
-
<div class="metric-item">
|
|
241
|
-
<div class="metric-value" id="encrypted-count">0</div>
|
|
242
|
-
<div class="metric-label">Encrypted</div>
|
|
243
|
-
</div>
|
|
244
|
-
<div class="metric-item">
|
|
245
|
-
<div class="metric-value" id="decrypted-count">0</div>
|
|
246
|
-
<div class="metric-label">Decrypted</div>
|
|
247
|
-
</div>
|
|
248
|
-
<div class="metric-item">
|
|
249
|
-
<div class="metric-value" id="key-exchanges">0</div>
|
|
250
|
-
<div class="metric-label">Key Exchanges</div>
|
|
251
|
-
</div>
|
|
252
|
-
</div>
|
|
253
|
-
</div>
|
|
254
|
-
</div>
|
|
255
|
-
</div>
|
|
256
|
-
|
|
257
|
-
<!-- Initialization Tests -->
|
|
258
|
-
<div class="test-section">
|
|
259
|
-
<h3>🚀 Initialization Tests</h3>
|
|
260
|
-
<div class="test-controls">
|
|
261
|
-
<button id="init-basic-crypto" class="btn btn-primary">Initialize Basic Crypto</button>
|
|
262
|
-
<button id="init-with-credentials" class="btn btn-secondary">Initialize with Credentials</button>
|
|
263
|
-
<button id="reset-crypto" class="btn btn-danger">Reset Crypto</button>
|
|
264
|
-
<button id="run-self-test" class="btn btn-info">Run Self Test</button>
|
|
265
|
-
</div>
|
|
266
|
-
|
|
267
|
-
<div class="test-message-area">
|
|
268
|
-
<label for="user-alias">User Alias (for persistent identity):</label>
|
|
269
|
-
<input type="text" id="user-alias" placeholder="Enter username" style="margin: 5px 10px; padding: 5px;">
|
|
270
|
-
|
|
271
|
-
<label for="user-password">Password:</label>
|
|
272
|
-
<input type="password" id="user-password" placeholder="Enter password" style="margin: 5px 10px; padding: 5px;">
|
|
273
|
-
</div>
|
|
274
|
-
|
|
275
|
-
<div id="init-test-result" class="test-result"></div>
|
|
276
|
-
</div>
|
|
277
|
-
|
|
278
|
-
<!-- Mesh Integration Tests -->
|
|
279
|
-
<div class="test-section">
|
|
280
|
-
<h3>🌐 Mesh Integration Tests</h3>
|
|
281
|
-
<div class="test-controls">
|
|
282
|
-
<button id="init-mesh-with-crypto" class="btn btn-primary">Initialize Mesh with Crypto</button>
|
|
283
|
-
<button id="connect-mesh" class="btn btn-secondary">Connect to Mesh</button>
|
|
284
|
-
<button id="disconnect-mesh" class="btn btn-danger">Disconnect Mesh</button>
|
|
285
|
-
</div>
|
|
286
|
-
|
|
287
|
-
<div class="test-message-area">
|
|
288
|
-
<label for="signaling-url">Signaling Server URL:</label>
|
|
289
|
-
<input type="text" id="signaling-url" value="ws://localhost:3000" style="width: 300px; margin: 5px 10px; padding: 5px;">
|
|
290
|
-
</div>
|
|
291
|
-
|
|
292
|
-
<div id="mesh-test-result" class="test-result"></div>
|
|
293
|
-
</div>
|
|
294
|
-
|
|
295
|
-
<!-- Encryption/Decryption Tests -->
|
|
296
|
-
<div class="test-section">
|
|
297
|
-
<h3>🔒 Encryption/Decryption Tests</h3>
|
|
298
|
-
<div class="encryption-demo">
|
|
299
|
-
<div class="demo-panel">
|
|
300
|
-
<h4>Message Encryption</h4>
|
|
301
|
-
<textarea id="plaintext-message" placeholder="Enter message to encrypt...">Hello, encrypted world! This is a test message.</textarea>
|
|
302
|
-
<div class="test-controls">
|
|
303
|
-
<button id="encrypt-message" class="btn btn-primary">Encrypt Message</button>
|
|
304
|
-
<button id="sign-message" class="btn btn-secondary">Sign Message</button>
|
|
305
|
-
</div>
|
|
306
|
-
<div id="encryption-result" class="test-result"></div>
|
|
307
|
-
</div>
|
|
308
|
-
|
|
309
|
-
<div class="demo-panel">
|
|
310
|
-
<h4>Message Decryption</h4>
|
|
311
|
-
<textarea id="encrypted-message" placeholder="Encrypted message will appear here..."></textarea>
|
|
312
|
-
<div class="test-controls">
|
|
313
|
-
<button id="decrypt-message" class="btn btn-primary">Decrypt Message</button>
|
|
314
|
-
<button id="verify-signature" class="btn btn-secondary">Verify Signature</button>
|
|
315
|
-
</div>
|
|
316
|
-
<div id="decryption-result" class="test-result"></div>
|
|
317
|
-
</div>
|
|
318
|
-
</div>
|
|
319
|
-
</div>
|
|
320
|
-
|
|
321
|
-
<!-- Key Management Tests -->
|
|
322
|
-
<div class="test-section">
|
|
323
|
-
<h3>🗝️ Key Management Tests</h3>
|
|
324
|
-
<div class="test-controls">
|
|
325
|
-
<button id="generate-test-keypair" class="btn btn-primary">Generate Test Keypair</button>
|
|
326
|
-
<button id="export-public-key" class="btn btn-secondary">Export Public Key</button>
|
|
327
|
-
<button id="simulate-key-exchange" class="btn btn-info">Simulate Key Exchange</button>
|
|
328
|
-
<button id="generate-group-key" class="btn btn-warning">Generate Group Key</button>
|
|
329
|
-
</div>
|
|
330
|
-
|
|
331
|
-
<div class="test-message-area">
|
|
332
|
-
<label for="group-id">Group ID:</label>
|
|
333
|
-
<input type="text" id="group-id" value="test-group-1" style="margin: 5px 10px; padding: 5px;">
|
|
334
|
-
|
|
335
|
-
<label for="peer-public-key">Peer Public Key (for testing):</label>
|
|
336
|
-
<textarea id="peer-public-key" placeholder="Paste peer public key here..." style="height: 60px;"></textarea>
|
|
337
|
-
</div>
|
|
338
|
-
|
|
339
|
-
<div>
|
|
340
|
-
<h4>Stored Peer Keys:</h4>
|
|
341
|
-
<div id="peer-keys-list" class="peer-keys-list">
|
|
342
|
-
<div style="padding: 20px; text-align: center; color: #666;">No peer keys stored</div>
|
|
343
|
-
</div>
|
|
344
|
-
</div>
|
|
345
|
-
|
|
346
|
-
<div id="key-management-result" class="test-result"></div>
|
|
347
|
-
</div>
|
|
348
|
-
|
|
349
|
-
<!-- Group Encryption Tests -->
|
|
350
|
-
<div class="test-section">
|
|
351
|
-
<h3>👥 Group Encryption Tests</h3>
|
|
352
|
-
<div class="test-controls">
|
|
353
|
-
<button id="create-test-group" class="btn btn-primary">Create Test Group</button>
|
|
354
|
-
<button id="encrypt-group-message" class="btn btn-secondary">Encrypt for Group</button>
|
|
355
|
-
<button id="decrypt-group-message" class="btn btn-info">Decrypt Group Message</button>
|
|
356
|
-
</div>
|
|
357
|
-
|
|
358
|
-
<div class="test-message-area">
|
|
359
|
-
<textarea id="group-message" placeholder="Enter group message...">This is a secret group message!</textarea>
|
|
360
|
-
</div>
|
|
361
|
-
|
|
362
|
-
<div id="group-encryption-result" class="test-result"></div>
|
|
363
|
-
</div>
|
|
364
|
-
|
|
365
|
-
<!-- Performance Tests -->
|
|
366
|
-
<div class="test-section">
|
|
367
|
-
<h3>⚡ Performance Tests</h3>
|
|
368
|
-
<div class="test-controls">
|
|
369
|
-
<button id="benchmark-encryption" class="btn btn-primary">Benchmark Encryption</button>
|
|
370
|
-
<button id="benchmark-signing" class="btn btn-secondary">Benchmark Signing</button>
|
|
371
|
-
<button id="stress-test" class="btn btn-warning">Stress Test</button>
|
|
372
|
-
<button id="clear-metrics" class="btn btn-danger">Clear Metrics</button>
|
|
373
|
-
</div>
|
|
374
|
-
|
|
375
|
-
<div class="test-message-area">
|
|
376
|
-
<label for="benchmark-iterations">Iterations:</label>
|
|
377
|
-
<input type="number" id="benchmark-iterations" value="100" min="1" max="10000" style="margin: 5px 10px; padding: 5px;">
|
|
378
|
-
|
|
379
|
-
<label for="message-size">Message Size (chars):</label>
|
|
380
|
-
<input type="number" id="message-size" value="1000" min="10" max="100000" style="margin: 5px 10px; padding: 5px;">
|
|
381
|
-
</div>
|
|
382
|
-
|
|
383
|
-
<div id="performance-test-result" class="test-result"></div>
|
|
384
|
-
</div>
|
|
385
|
-
|
|
386
|
-
<!-- Real-time Messaging Tests -->
|
|
387
|
-
<div class="test-section">
|
|
388
|
-
<h3>💬 Real-time Encrypted Messaging Tests</h3>
|
|
389
|
-
<div class="test-controls">
|
|
390
|
-
<button id="send-encrypted-broadcast" class="btn btn-primary">Send Encrypted Broadcast</button>
|
|
391
|
-
<button id="send-encrypted-dm" class="btn btn-secondary">Send Encrypted DM</button>
|
|
392
|
-
<button id="toggle-auto-encrypt" class="btn btn-info">Toggle Auto-Encrypt</button>
|
|
393
|
-
</div>
|
|
394
|
-
|
|
395
|
-
<div class="test-message-area">
|
|
396
|
-
<label for="target-peer-id">Target Peer ID (for DM):</label>
|
|
397
|
-
<input type="text" id="target-peer-id" placeholder="Enter peer ID..." style="width: 300px; margin: 5px 10px; padding: 5px;">
|
|
398
|
-
|
|
399
|
-
<textarea id="real-time-message" placeholder="Enter message to send...">Hello encrypted mesh!</textarea>
|
|
400
|
-
</div>
|
|
401
|
-
|
|
402
|
-
<div>
|
|
403
|
-
<h4>Received Messages:</h4>
|
|
404
|
-
<div id="received-messages" class="test-result" style="max-height: 300px;">
|
|
405
|
-
<div style="padding: 20px; text-align: center; color: #666;">No messages received yet</div>
|
|
406
|
-
</div>
|
|
407
|
-
</div>
|
|
408
|
-
</div>
|
|
409
|
-
|
|
410
|
-
<!-- Debug and Diagnostics -->
|
|
411
|
-
<div class="test-section">
|
|
412
|
-
<h3>🐛 Debug and Diagnostics</h3>
|
|
413
|
-
<div class="test-controls">
|
|
414
|
-
<button id="dump-crypto-state" class="btn btn-primary">Dump Crypto State</button>
|
|
415
|
-
<button id="validate-setup" class="btn btn-secondary">Validate Setup</button>
|
|
416
|
-
<button id="test-compatibility" class="btn btn-info">Test Browser Compatibility</button>
|
|
417
|
-
<button id="generate-test-report" class="btn btn-success">Generate Test Report</button>
|
|
418
|
-
</div>
|
|
419
|
-
|
|
420
|
-
<div id="debug-result" class="test-result"></div>
|
|
421
|
-
</div>
|
|
422
|
-
</div>
|
|
423
|
-
|
|
424
|
-
<!-- Import the crypto test suite JavaScript -->
|
|
425
|
-
<script type="module" src="crypto-test.js"></script>
|
|
426
|
-
</body>
|
|
427
|
-
</html>
|