peerpigeon 0.0.5 → 0.0.7
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 +190 -12
- package/examples/browser/app.js +40 -40
- package/examples/browser/crypto-test.html +427 -0
- package/examples/browser/index.html +161 -0
- package/examples/browser/styles.css +216 -0
- package/examples/browser/ui-old.js +1704 -1708
- package/examples/browser/ui.js +2226 -1692
- package/examples/nativescript/README.md +73 -0
- package/examples/nativescript/app.js +152 -0
- package/examples/nativescript/package.json +27 -0
- package/examples/node/test-crypto-media.js +137 -0
- package/examples/node/test-crypto.js +146 -0
- package/examples/node/test-node.js +114 -115
- package/package.json +16 -13
- package/src/CleanupManager.js +154 -154
- package/src/ConnectionManager.js +772 -753
- package/src/CryptoManager.js +612 -0
- package/src/EnvironmentDetector.js +457 -384
- package/src/EventEmitter.js +19 -19
- package/src/EvictionManager.js +211 -211
- package/src/GossipManager.js +447 -366
- package/src/MediaManager.js +216 -214
- package/src/MeshOptimizer.js +165 -166
- package/src/PeerConnection.js +847 -941
- package/src/PeerDiscovery.js +255 -259
- package/src/PeerPigeonMesh.js +1100 -721
- package/src/SignalingClient.js +517 -518
- package/src/SignalingHandler.js +295 -295
- package/src/StorageManager.js +118 -104
- package/src/TimerUtils.js +29 -29
- package/src/WebDHT.js +1123 -948
- package/websocket-server/server.js +360 -362
|
@@ -466,6 +466,7 @@ input[type="url"]:focus {
|
|
|
466
466
|
.manual-connection[aria-expanded="false"] .section-header,
|
|
467
467
|
.connected-peers[aria-expanded="false"] .section-header,
|
|
468
468
|
.dht[aria-expanded="false"] .section-header,
|
|
469
|
+
.crypto[aria-expanded="false"] .section-header,
|
|
469
470
|
.media[aria-expanded="false"] .section-header {
|
|
470
471
|
margin: 0;
|
|
471
472
|
padding: 0;
|
|
@@ -476,6 +477,7 @@ input[type="url"]:focus {
|
|
|
476
477
|
.manual-connection[aria-expanded="false"] h2,
|
|
477
478
|
.connected-peers[aria-expanded="false"] h2,
|
|
478
479
|
.dht[aria-expanded="false"] h2,
|
|
480
|
+
.crypto[aria-expanded="false"] h2,
|
|
479
481
|
.media[aria-expanded="false"] h2 {
|
|
480
482
|
border-bottom: none !important;
|
|
481
483
|
margin: 0 !important;
|
|
@@ -1286,3 +1288,217 @@ input[type="url"]:focus {
|
|
|
1286
1288
|
color: #dc3545;
|
|
1287
1289
|
font-style: italic;
|
|
1288
1290
|
}
|
|
1291
|
+
|
|
1292
|
+
/* Crypto Section Styles */
|
|
1293
|
+
.crypto {
|
|
1294
|
+
margin-bottom: 30px;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
.crypto-status .info-group {
|
|
1298
|
+
display: flex;
|
|
1299
|
+
justify-content: space-between;
|
|
1300
|
+
align-items: center;
|
|
1301
|
+
margin-bottom: 10px;
|
|
1302
|
+
padding: 8px 12px;
|
|
1303
|
+
background: #f8f9fa;
|
|
1304
|
+
border-radius: 4px;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
.crypto-status .info-group label {
|
|
1308
|
+
font-weight: 600;
|
|
1309
|
+
margin: 0;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
.crypto-status .status {
|
|
1313
|
+
padding: 4px 8px;
|
|
1314
|
+
border-radius: 4px;
|
|
1315
|
+
font-size: 0.9em;
|
|
1316
|
+
font-weight: 600;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
.crypto-status .status.enabled {
|
|
1320
|
+
background: #d4edda;
|
|
1321
|
+
color: #155724;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
.crypto-status .status.disabled {
|
|
1325
|
+
background: #f8d7da;
|
|
1326
|
+
color: #721c24;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
#crypto-public-key {
|
|
1330
|
+
max-width: 300px;
|
|
1331
|
+
white-space: nowrap;
|
|
1332
|
+
overflow: hidden;
|
|
1333
|
+
text-overflow: ellipsis;
|
|
1334
|
+
font-size: 0.85em;
|
|
1335
|
+
background: #e9ecef;
|
|
1336
|
+
padding: 4px 6px;
|
|
1337
|
+
border-radius: 3px;
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
.crypto-keys,
|
|
1341
|
+
.crypto-messaging,
|
|
1342
|
+
.crypto-groups,
|
|
1343
|
+
.crypto-stats,
|
|
1344
|
+
.crypto-test-results,
|
|
1345
|
+
.crypto-advanced {
|
|
1346
|
+
margin-top: 25px;
|
|
1347
|
+
padding-top: 20px;
|
|
1348
|
+
border-top: 1px solid #e9ecef;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
.crypto-user-auth {
|
|
1352
|
+
margin-top: 15px;
|
|
1353
|
+
padding: 15px;
|
|
1354
|
+
background: #f8f9fa;
|
|
1355
|
+
border-radius: 6px;
|
|
1356
|
+
border: 1px solid #e9ecef;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
.crypto-user-auth h4 {
|
|
1360
|
+
margin-bottom: 15px;
|
|
1361
|
+
color: #495057;
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
.crypto-test-messaging,
|
|
1365
|
+
.crypto-group-messaging {
|
|
1366
|
+
margin-top: 15px;
|
|
1367
|
+
padding: 15px;
|
|
1368
|
+
background: #fff3cd;
|
|
1369
|
+
border-radius: 6px;
|
|
1370
|
+
border: 1px solid #ffeaa7;
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
.crypto-groups-list {
|
|
1374
|
+
margin-top: 15px;
|
|
1375
|
+
padding: 15px;
|
|
1376
|
+
background: #f8f9fa;
|
|
1377
|
+
border-radius: 6px;
|
|
1378
|
+
max-height: 200px;
|
|
1379
|
+
overflow-y: auto;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
.stats-grid {
|
|
1383
|
+
display: grid;
|
|
1384
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
1385
|
+
gap: 15px;
|
|
1386
|
+
margin-top: 15px;
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
.stat-item {
|
|
1390
|
+
display: flex;
|
|
1391
|
+
justify-content: space-between;
|
|
1392
|
+
align-items: center;
|
|
1393
|
+
padding: 12px;
|
|
1394
|
+
background: #e3f2fd;
|
|
1395
|
+
border-radius: 6px;
|
|
1396
|
+
border-left: 4px solid #2196f3;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
.stat-item label {
|
|
1400
|
+
font-weight: 600;
|
|
1401
|
+
margin: 0;
|
|
1402
|
+
color: #1565c0;
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
.stat-item span {
|
|
1406
|
+
font-weight: 700;
|
|
1407
|
+
color: #0d47a1;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
.test-log {
|
|
1411
|
+
background: #f8f9fa;
|
|
1412
|
+
border: 1px solid #e9ecef;
|
|
1413
|
+
border-radius: 6px;
|
|
1414
|
+
padding: 15px;
|
|
1415
|
+
max-height: 300px;
|
|
1416
|
+
overflow-y: auto;
|
|
1417
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
1418
|
+
font-size: 0.9em;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
.test-log .test-result {
|
|
1422
|
+
margin-bottom: 10px;
|
|
1423
|
+
padding: 8px;
|
|
1424
|
+
border-radius: 4px;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
.test-log .test-result.success {
|
|
1428
|
+
background: #d4edda;
|
|
1429
|
+
border: 1px solid #c3e6cb;
|
|
1430
|
+
color: #155724;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
.test-log .test-result.error {
|
|
1434
|
+
background: #f8d7da;
|
|
1435
|
+
border: 1px solid #f5c6cb;
|
|
1436
|
+
color: #721c24;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
.test-log .test-result.info {
|
|
1440
|
+
background: #d1ecf1;
|
|
1441
|
+
border: 1px solid #bee5eb;
|
|
1442
|
+
color: #0c5460;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
.test-log .test-result.warning {
|
|
1446
|
+
background: #fff3cd;
|
|
1447
|
+
border: 1px solid #ffeaa7;
|
|
1448
|
+
color: #856404;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
.crypto-import-form {
|
|
1452
|
+
margin-top: 15px;
|
|
1453
|
+
padding: 20px;
|
|
1454
|
+
background: #fff3cd;
|
|
1455
|
+
border-radius: 6px;
|
|
1456
|
+
border: 1px solid #ffeaa7;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
.crypto-import-form .input-group {
|
|
1460
|
+
margin-bottom: 15px;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
.crypto-import-form textarea {
|
|
1464
|
+
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
1465
|
+
font-size: 0.9em;
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
/* Encrypted message indicator */
|
|
1469
|
+
.message.encrypted {
|
|
1470
|
+
position: relative;
|
|
1471
|
+
padding-left: 40px;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
.message.encrypted::before {
|
|
1475
|
+
content: "🔐";
|
|
1476
|
+
position: absolute;
|
|
1477
|
+
left: 10px;
|
|
1478
|
+
top: 50%;
|
|
1479
|
+
transform: translateY(-50%);
|
|
1480
|
+
font-size: 1.2em;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
.encryption-indicator {
|
|
1484
|
+
color: #28a745;
|
|
1485
|
+
font-size: 1.1em;
|
|
1486
|
+
margin-right: 5px;
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
/* Responsive adjustments */
|
|
1490
|
+
@media (max-width: 768px) {
|
|
1491
|
+
.stats-grid {
|
|
1492
|
+
grid-template-columns: 1fr;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
.stat-item {
|
|
1496
|
+
flex-direction: column;
|
|
1497
|
+
align-items: flex-start;
|
|
1498
|
+
gap: 5px;
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
#crypto-public-key {
|
|
1502
|
+
max-width: 200px;
|
|
1503
|
+
}
|
|
1504
|
+
}
|