hivedesk 1.0.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/CHANGELOG.md +21 -0
- package/README.md +307 -303
- package/desktop/release-notes/1.0.2.json +12 -0
- package/desktop/scripts/package.mjs +134 -134
- package/i18n/README.pt-BR.md +308 -304
- package/package.json +1 -1
- package/src/p2p/doctor.js +4 -1
- package/ui/office/office.js +662 -662
package/package.json
CHANGED
package/src/p2p/doctor.js
CHANGED
|
@@ -121,7 +121,10 @@ export function probeBroker(url, { timeoutMs = 4000, tlsOptions = {} } = {}) {
|
|
|
121
121
|
socket.destroy();
|
|
122
122
|
resolve({ url, ok, ms: Date.now() - started, detail });
|
|
123
123
|
};
|
|
124
|
-
|
|
124
|
+
// SNI takes a host name only: an IP address as the server name is deprecated (DEP0123) and ignored.
|
|
125
|
+
const host = u.hostname.replace(/^\[|\]$/g, '');
|
|
126
|
+
const sni = net.isIP(host) ? {} : { servername: host };
|
|
127
|
+
const socket = tls.connect({ host, port: Number(u.port) || 443, ...sni, ...tlsOptions }, () => {
|
|
125
128
|
const key = crypto.randomBytes(16).toString('base64');
|
|
126
129
|
socket.write(`GET ${u.pathname || '/'} HTTP/1.1\r\nHost: ${u.host}\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Key: ${key}\r\nSec-WebSocket-Version: 13\r\nSec-WebSocket-Protocol: mqtt\r\n\r\n`);
|
|
127
130
|
});
|