mirror of
https://github.com/koush/scrypted.git
synced 2026-05-04 21:30:30 +01:00
cloud: update registration when port forwarding is disabled
This commit is contained in:
4
plugins/cloud/package-lock.json
generated
4
plugins/cloud/package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -50,5 +50,5 @@
|
||||
"@types/nat-upnp": "^1.1.2",
|
||||
"@types/node": "^18.11.18"
|
||||
},
|
||||
"version": "0.0.52"
|
||||
"version": "0.0.53"
|
||||
}
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user