cloud: send server id for multiple servers. update upnp.

This commit is contained in:
Koushik Dutta
2024-02-21 21:21:04 -08:00
parent d6b9900db5
commit 3a6b244a4a
4 changed files with 1209 additions and 1722 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -38,20 +38,20 @@
]
},
"dependencies": {
"@eneris/push-receiver": "^3.1.4",
"@eneris/push-receiver": "^3.1.5",
"@scrypted/common": "file:../../common",
"@scrypted/sdk": "file:../../sdk",
"bpmux": "^8.2.1",
"cloudflared": "^0.4.0",
"cloudflared": "^0.5.1",
"exponential-backoff": "^3.1.1",
"http-proxy": "^1.18.1",
"nat-upnp": "file:./external/node-nat-upnp"
},
"devDependencies": {
"@types/http-proxy": "^1.17.11",
"@types/ip": "^1.1.0",
"@types/nat-upnp": "^1.1.2",
"@types/node": "^20.4.5"
"@types/http-proxy": "^1.17.14",
"@types/ip": "^1.1.3",
"@types/nat-upnp": "^1.1.5",
"@types/node": "^20.11.19"
},
"version": "0.2.6"
}

View File

@@ -73,6 +73,10 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings,
hide: true,
persistedDefaultValue: crypto.randomBytes(8).toString('hex'),
},
serverId: {
hide: true,
persistedDefaultValue: crypto.randomBytes(8).toString('hex'),
},
forwardingMode: {
title: "Port Forwarding Mode",
description: "The port forwarding mode used to expose the HTTPS port. If port forwarding is disabled or unavailable, Scrypted Cloud will fall back to push to initiate connections with this Scrypted server. Port Forwarding and UPNP are optional but will significantly speed up cloud connections.",
@@ -577,6 +581,7 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings,
const q = qsstringify({
upnp_port,
registration_id,
server_id: this.storageSettings.values.serverId,
sender_id: DEFAULT_SENDER_ID,
registration_secret,
hostname,