diff --git a/plugins/cloud/package-lock.json b/plugins/cloud/package-lock.json index 5be8bd59d..8e28c67f6 100644 --- a/plugins/cloud/package-lock.json +++ b/plugins/cloud/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/cloud", - "version": "0.0.52", + "version": "0.0.53", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/cloud", - "version": "0.0.52", + "version": "0.0.53", "dependencies": { "@eneris/push-receiver": "../../external/push-receiver", "@scrypted/common": "file:../../common", diff --git a/plugins/cloud/package.json b/plugins/cloud/package.json index cbc754e0e..6a0978339 100644 --- a/plugins/cloud/package.json +++ b/plugins/cloud/package.json @@ -50,5 +50,5 @@ "@types/nat-upnp": "^1.1.2", "@types/node": "^18.11.18" }, - "version": "0.0.52" + "version": "0.0.53" } diff --git a/plugins/cloud/src/main.ts b/plugins/cloud/src/main.ts index 0cba03031..e4d3799fc 100644 --- a/plugins/cloud/src/main.ts +++ b/plugins/cloud/src/main.ts @@ -207,8 +207,10 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings, } async refreshPortForward() { - if (this.storageSettings.values.forwardingMode === 'Disabled') + if (this.storageSettings.values.forwardingMode === 'Disabled') { + this.updatePortForward(0); return; + } let { upnpPort } = this.storageSettings.values; if (!upnpPort) @@ -217,6 +219,15 @@ class ScryptedCloud extends ScryptedDeviceBase implements OauthClient, Settings, if (this.storageSettings.values.forwardingMode === 'Router Forward') return this.updatePortForward(upnpPort); + if (upnpPort === 443) { + this.upnpStatus = 'Error: Port 443 Not Allowed'; + const err = 'Scrypted Cloud does not allow reserving port 443 with UPNP. Set up a manual port forward if this is intended.'; + this.log.a(err); + this.console.error(err); + this.onDeviceEvent(ScryptedInterface.Settings, undefined); + return; + } + const [localAddress] = await endpointManager.getLocalAddresses(); this.upnpClient.portMapping({ public: {