hive-p2p 1.0.27 → 1.0.29
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/core/node-services.mjs +1 -1
- package/core/topologist.mjs +1 -1
- package/package.json +1 -1
package/core/node-services.mjs
CHANGED
|
@@ -122,7 +122,7 @@ export class NodeServices {
|
|
|
122
122
|
/** @type {Array<{urls: string}>} */
|
|
123
123
|
const stunUrls = [];
|
|
124
124
|
for (const b of bootstraps) {
|
|
125
|
-
const domain = b.
|
|
125
|
+
const domain = b.includes(':') ? b.split(':')[1].replace('//', '') : b;
|
|
126
126
|
domain.replace('/ws', '/signal'); // in case someone put domain/ws
|
|
127
127
|
const port = parseInt(b.split(':')[2]) + 1;
|
|
128
128
|
stunUrls.push({ urls: `stun:${domain}:${port}` });
|
package/core/topologist.mjs
CHANGED
|
@@ -152,7 +152,7 @@ export class Topologist {
|
|
|
152
152
|
const host = isBrowser ? window.location.host : url; // Récupère le host du browser
|
|
153
153
|
|
|
154
154
|
// Build full URL if not already prefixed
|
|
155
|
-
return url.startsWith('ws') ? url : `${protocol}${
|
|
155
|
+
return url.startsWith('ws') ? url : `${protocol}${host}`;
|
|
156
156
|
}
|
|
157
157
|
#connectToPublicNode(publicUrl = 'localhost:8080') {
|
|
158
158
|
let remoteId = null;
|