@scrypted/server 0.115.8 → 0.115.10
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/dist/ip.d.ts +0 -1
- package/dist/ip.js +58 -25
- package/dist/ip.js.map +1 -1
- package/dist/scrypted-server-main.js +3 -2
- package/dist/scrypted-server-main.js.map +1 -1
- package/dist/server-settings.d.ts +0 -1
- package/dist/server-settings.js +0 -56
- package/dist/server-settings.js.map +1 -1
- package/dist/services/backup.js +10 -1
- package/dist/services/backup.js.map +1 -1
- package/package.json +2 -2
- package/src/ip.ts +68 -26
- package/src/scrypted-server-main.ts +4 -3
- package/src/server-settings.ts +1 -62
- package/src/services/backup.ts +11 -1
package/dist/ip.d.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
1
|
export declare function isIPv4EmbeddedIPv6(address: string): boolean;
|
2
2
|
export declare function removeIPv4EmbeddedIPv6(address: string): string;
|
3
|
-
export declare function isUsableNetworkAddress(address: string): boolean;
|
4
3
|
export declare function getUsableNetworkAddresses(): string[];
|
package/dist/ip.js
CHANGED
@@ -5,23 +5,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.isIPv4EmbeddedIPv6 = isIPv4EmbeddedIPv6;
|
7
7
|
exports.removeIPv4EmbeddedIPv6 = removeIPv4EmbeddedIPv6;
|
8
|
-
exports.isUsableNetworkAddress = isUsableNetworkAddress;
|
9
8
|
exports.getUsableNetworkAddresses = getUsableNetworkAddresses;
|
10
9
|
const os_1 = __importDefault(require("os"));
|
11
10
|
const net_1 = __importDefault(require("net"));
|
12
|
-
const
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
const unusableList = new net_1.default.BlockList();
|
12
|
+
// loopback
|
13
|
+
unusableList.addSubnet('127.0.0.0', 8);
|
14
|
+
unusableList.addAddress('::1', 'ipv6');
|
15
|
+
// link local
|
16
|
+
unusableList.addSubnet('169.254.0.0', 16);
|
17
|
+
unusableList.addSubnet('fe80::', 64, 'ipv6');
|
18
|
+
// cg nat
|
19
|
+
unusableList.addSubnet('100.64.0.0', 10);
|
20
|
+
// documentation and testing
|
21
|
+
unusableList.addSubnet('192.0.2.0', 24);
|
22
|
+
unusableList.addSubnet('198.51.100.0', 24);
|
23
|
+
unusableList.addSubnet('203.0.113.0', 24);
|
24
|
+
// reserved
|
25
|
+
unusableList.addSubnet('0.0.0.0', 8);
|
26
|
+
unusableList.addSubnet('240.0.0.0', 4);
|
27
|
+
// benchmarking
|
28
|
+
unusableList.addSubnet('198.18.0.0', 15);
|
18
29
|
const privateList = new net_1.default.BlockList();
|
19
30
|
privateList.addSubnet('10.0.0.0', 8);
|
20
31
|
privateList.addSubnet('172.16.0.0', 12);
|
21
32
|
privateList.addSubnet('192.168.0.0', 16);
|
22
33
|
privateList.addSubnet('fc00::', 7, 'ipv6');
|
23
|
-
const benchmarkList = new net_1.default.BlockList();
|
24
|
-
benchmarkList.addSubnet('198.18.0.0', 15);
|
25
34
|
function isIPv4EmbeddedIPv6(address) {
|
26
35
|
// this is valid ipv6 address with ipv4 embedded
|
27
36
|
// ::ffff:10.0.0.1
|
@@ -33,28 +42,52 @@ function removeIPv4EmbeddedIPv6(address) {
|
|
33
42
|
return address;
|
34
43
|
}
|
35
44
|
function isUsableNetworkAddress(address) {
|
36
|
-
|
37
|
-
const type = net_1.default.isIPv6(address) ? 'ipv6' : 'ipv4';
|
38
|
-
// ipv6 addresses are "usable" in the context of scrypted if they are public.
|
39
|
-
if (type === 'ipv6' && privateList.check(address, type))
|
45
|
+
if (!address)
|
40
46
|
return false;
|
41
|
-
|
42
|
-
|
43
|
-
|
47
|
+
try {
|
48
|
+
address = removeIPv4EmbeddedIPv6(address);
|
49
|
+
const type = net_1.default.isIPv6(address) ? 'ipv6' : 'ipv4';
|
50
|
+
// ipv6 addresses are "usable" in the context of scrypted if they are public.
|
51
|
+
if (type === 'ipv6' && privateList.check(address, type))
|
52
|
+
return false;
|
53
|
+
return !unusableList.check(address, type);
|
54
|
+
}
|
55
|
+
catch (e) {
|
56
|
+
return false;
|
57
|
+
}
|
44
58
|
}
|
45
59
|
function getUsableNetworkAddresses() {
|
46
60
|
const nis = os_1.default.networkInterfaces();
|
47
|
-
const
|
48
|
-
|
49
|
-
const adding = Object.values(nis)
|
61
|
+
const getUsable = (family) => {
|
62
|
+
const usable = Object.values(nis)
|
50
63
|
.flat()
|
51
64
|
.filter((details) => details.family === family)
|
52
|
-
.
|
53
|
-
|
54
|
-
addresses.push(...adding);
|
65
|
+
.filter(details => isUsableNetworkAddress(details.address));
|
66
|
+
return usable;
|
55
67
|
};
|
56
|
-
|
57
|
-
|
58
|
-
|
68
|
+
const ipv4 = getUsable('IPv4');
|
69
|
+
const ipv6 = getUsable('IPv6');
|
70
|
+
// ipv6 generates temporary per connection ips that we want to filter out.
|
71
|
+
// 2001:abc:def::7b0
|
72
|
+
const fixedAddresses = ipv6.filter(details => details.address.includes('::'));
|
73
|
+
const fixedRanges = fixedAddresses.map(details => {
|
74
|
+
const block = new net_1.default.BlockList();
|
75
|
+
const cidr = parseInt(details.address.split('/')[1]) || 1;
|
76
|
+
block.addSubnet(details.address, cidr, 'ipv6');
|
77
|
+
return block;
|
78
|
+
});
|
79
|
+
// 2001:abc:def:0:dc:28a7:261b:9324
|
80
|
+
const fixedFiltered = ipv6.filter(details => {
|
81
|
+
for (const block of fixedRanges) {
|
82
|
+
if (block.check(details.address, 'ipv6'))
|
83
|
+
return false;
|
84
|
+
}
|
85
|
+
return true;
|
86
|
+
});
|
87
|
+
return [
|
88
|
+
...ipv4.map(details => details.address),
|
89
|
+
...fixedAddresses.map(details => details.address),
|
90
|
+
...fixedFiltered.map(details => details.address),
|
91
|
+
];
|
59
92
|
}
|
60
93
|
//# sourceMappingURL=ip.js.map
|
package/dist/ip.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ip.js","sourceRoot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,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;QACjD,GAAG,aAAa,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;KACnD,CAAC;AACN,CAAC"}
|
@@ -20,6 +20,7 @@ const semver_1 = __importDefault(require("semver"));
|
|
20
20
|
const source_map_support_1 = require("source-map-support");
|
21
21
|
const cert_1 = require("./cert");
|
22
22
|
const db_types_1 = require("./db-types");
|
23
|
+
const ip_1 = require("./ip");
|
23
24
|
const level_1 = __importDefault(require("./level"));
|
24
25
|
const plugin_error_1 = require("./plugin/plugin-error");
|
25
26
|
const plugin_volume_1 = require("./plugin/plugin-volume");
|
@@ -463,7 +464,7 @@ async function start(mainFilename, options) {
|
|
463
464
|
res.send(200);
|
464
465
|
});
|
465
466
|
const getAlternateAddresses = async () => {
|
466
|
-
const addresses = ((await scrypted.addressSettings.getLocalAddresses()) || (0,
|
467
|
+
const addresses = ((await scrypted.addressSettings.getLocalAddresses()) || (0, ip_1.getUsableNetworkAddresses)())
|
467
468
|
.map(address => {
|
468
469
|
if (net_1.default.isIPv6(address) && !net_1.default.isIPv4(address))
|
469
470
|
address = `[${address}]`;
|
@@ -642,7 +643,7 @@ async function start(mainFilename, options) {
|
|
642
643
|
console.log('#######################################################');
|
643
644
|
console.log(`Scrypted Volume : ${volumeDir}`);
|
644
645
|
console.log(`Scrypted Server (Local) : https://localhost:${server_settings_1.SCRYPTED_SECURE_PORT}/`);
|
645
|
-
for (const address of (0,
|
646
|
+
for (const address of (0, ip_1.getUsableNetworkAddresses)()) {
|
646
647
|
console.log(`Scrypted Server (Remote) : https://${address}:${server_settings_1.SCRYPTED_SECURE_PORT}/`);
|
647
648
|
}
|
648
649
|
console.log(`Version: : ${await scrypted.info.getVersion()}`);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"scrypted-server-main.js","sourceRoot":"","sources":["../src/scrypted-server-main.ts"],"names":[],"mappings":";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PTED_DEBUG_PORT: number;
|
4
4
|
export declare function getIpAddress(): string;
|
5
|
-
export declare function getHostAddresses(useIpv4: boolean, useIpv6: boolean): string[];
|
package/dist/server-settings.js
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
-
};
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
3
|
exports.SCRYPTED_DEBUG_PORT = exports.SCRYPTED_SECURE_PORT = exports.SCRYPTED_INSECURE_PORT = void 0;
|
7
4
|
exports.getIpAddress = getIpAddress;
|
8
|
-
exports.getHostAddresses = getHostAddresses;
|
9
|
-
const os_1 = __importDefault(require("os"));
|
10
5
|
const ip_1 = require("./ip");
|
11
6
|
exports.SCRYPTED_INSECURE_PORT = parseInt(process.env.SCRYPTED_INSECURE_PORT) || 11080;
|
12
7
|
exports.SCRYPTED_SECURE_PORT = parseInt(process.env.SCRYPTED_SECURE_PORT) || 10443;
|
@@ -14,55 +9,4 @@ exports.SCRYPTED_DEBUG_PORT = parseInt(process.env.SCRYPTED_DEBUG_PORT) || 10081
|
|
14
9
|
function getIpAddress() {
|
15
10
|
return (0, ip_1.getUsableNetworkAddresses)()[0];
|
16
11
|
}
|
17
|
-
function normalizeFamilyNodeV18(family) {
|
18
|
-
if (family === 'IPv4')
|
19
|
-
return 4;
|
20
|
-
if (family === 'IPv6')
|
21
|
-
return 6;
|
22
|
-
return family;
|
23
|
-
}
|
24
|
-
function nodeIpAddress(family) {
|
25
|
-
// https://chromium.googlesource.com/external/webrtc/+/master/rtc_base/network.cc#236
|
26
|
-
const costlyNetworks = ["ipsec", "tun", "utun", "tap"];
|
27
|
-
const ignoreNetworks = [
|
28
|
-
// seen these on macos
|
29
|
-
'llw',
|
30
|
-
'awdl',
|
31
|
-
...costlyNetworks,
|
32
|
-
];
|
33
|
-
const interfaces = os_1.default.networkInterfaces();
|
34
|
-
const all = Object.keys(interfaces)
|
35
|
-
.map((nic) => {
|
36
|
-
for (const costly of ignoreNetworks) {
|
37
|
-
if (nic.startsWith(costly)) {
|
38
|
-
return {
|
39
|
-
nic,
|
40
|
-
addresses: [],
|
41
|
-
};
|
42
|
-
}
|
43
|
-
}
|
44
|
-
const addresses = interfaces[nic].filter((details) => normalizeFamilyNodeV18(details.family) === family
|
45
|
-
&& (0, ip_1.isUsableNetworkAddress)(details.address));
|
46
|
-
return {
|
47
|
-
nic,
|
48
|
-
addresses: addresses.map((address) => address.address),
|
49
|
-
};
|
50
|
-
})
|
51
|
-
.filter((address) => !!address);
|
52
|
-
// os.networkInterfaces doesn't actually return addresses in a good order.
|
53
|
-
// have seen instances where en0 (ethernet) is after en1 (wlan), etc.
|
54
|
-
// eth0 > eth1
|
55
|
-
all.sort((a, b) => a.nic.localeCompare(b.nic));
|
56
|
-
return Object.values(all)
|
57
|
-
.map((entry) => entry.addresses)
|
58
|
-
.flat();
|
59
|
-
}
|
60
|
-
function getHostAddresses(useIpv4, useIpv6) {
|
61
|
-
const address = [];
|
62
|
-
if (useIpv4)
|
63
|
-
address.push(...nodeIpAddress(4));
|
64
|
-
if (useIpv6)
|
65
|
-
address.push(...nodeIpAddress(6));
|
66
|
-
return address;
|
67
|
-
}
|
68
12
|
//# sourceMappingURL=server-settings.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"server-settings.js","sourceRoot":"","sources":["../src/server-settings.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"server-settings.js","sourceRoot":"","sources":["../src/server-settings.ts"],"names":[],"mappings":";;;AAMA,oCAEC;AARD,6BAAiD;AAEpC,QAAA,sBAAsB,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,IAAI,KAAK,CAAC;AAC/E,QAAA,oBAAoB,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,IAAI,KAAK,CAAC;AAC3E,QAAA,mBAAmB,GAAG,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,KAAK,CAAC;AAEtF,SAAgB,YAAY;IACxB,OAAO,IAAA,8BAAyB,GAAE,CAAC,CAAC,CAAC,CAAC;AAC1C,CAAC"}
|
package/dist/services/backup.js
CHANGED
@@ -34,7 +34,16 @@ class Backup {
|
|
34
34
|
force: true,
|
35
35
|
});
|
36
36
|
const zip = new adm_zip_1.default();
|
37
|
-
|
37
|
+
// addLocalFolderPromise broken
|
38
|
+
// https://github.com/cthackers/adm-zip/issues/532
|
39
|
+
await new Promise((resolve, reject) => {
|
40
|
+
zip.addLocalFolderAsync(backupDbPath, (success, error) => {
|
41
|
+
if (error)
|
42
|
+
reject(error);
|
43
|
+
else
|
44
|
+
resolve();
|
45
|
+
});
|
46
|
+
});
|
38
47
|
return zip.toBufferPromise();
|
39
48
|
}
|
40
49
|
async restore(b) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"backup.js","sourceRoot":"","sources":["../../src/services/backup.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA6B;AAC7B,4CAAoB;AACpB,gDAAwB;AACxB,qDAA6B;AAC7B,2DAA8E;AAE9E,oCAAiC;
|
1
|
+
{"version":3,"file":"backup.js","sourceRoot":"","sources":["../../src/services/backup.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA6B;AAC7B,4CAAoB;AACpB,gDAAwB;AACxB,qDAA6B;AAC7B,2DAA8E;AAE9E,oCAAiC;AAGjC,MAAa,MAAM;IACI;IAAnB,YAAmB,OAAwB;QAAxB,YAAO,GAAP,OAAO,CAAiB;IAAG,CAAC;IAE/C,KAAK,CAAC,YAAY;QACd,MAAM,SAAS,GAAG,IAAA,iCAAiB,GAAE,CAAC;QAEtC,MAAM,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QACvD,MAAM,YAAE,CAAC,QAAQ,CAAC,EAAE,CAAC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G,IAAI,iBAAM,CAAC,CAAC,CAAC,CAAC;QAC1B,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;YACX,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAE/C,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACpB,MAAM,IAAA,aAAK,EAAC,IAAI,CAAC,CAAC;QAClB,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QAErC,kCAAkC;QAClC,MAAM,YAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;YACzB,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,IAAI;SACd,CAAC,CAAC;QAEH,iEAAiE;QACjE,qDAAqD;QACrD,MAAM,YAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAA,gCAAgB,GAAE,EAAE;YACrC,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,IAAI;SACd,CAAC,CAAC;QAEH,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC/B,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;IAC1C,CAAC;CACJ;AAnED,wBAmEC"}
|
package/package.json
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "@scrypted/server",
|
3
|
-
"version": "0.115.
|
3
|
+
"version": "0.115.10",
|
4
4
|
"description": "",
|
5
5
|
"dependencies": {
|
6
6
|
"@mapbox/node-pre-gyp": "^1.0.11",
|
7
7
|
"@scrypted/deno": "^1.45.5",
|
8
8
|
"@scrypted/ffmpeg-static": "^6.1.0-build1",
|
9
9
|
"@scrypted/node-pty": "^1.0.18",
|
10
|
-
"@scrypted/types": "^0.3.
|
10
|
+
"@scrypted/types": "^0.3.48",
|
11
11
|
"adm-zip": "^0.5.15",
|
12
12
|
"body-parser": "^1.20.2",
|
13
13
|
"cookie-parser": "^1.4.6",
|
package/src/ip.ts
CHANGED
@@ -1,13 +1,29 @@
|
|
1
1
|
import os from 'os';
|
2
2
|
import net from 'net';
|
3
3
|
|
4
|
-
const
|
5
|
-
|
6
|
-
|
4
|
+
const unusableList = new net.BlockList();
|
5
|
+
// loopback
|
6
|
+
unusableList.addSubnet('127.0.0.0', 8);
|
7
|
+
unusableList.addAddress('::1', 'ipv6');
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
// link local
|
10
|
+
unusableList.addSubnet('169.254.0.0', 16);
|
11
|
+
unusableList.addSubnet('fe80::', 64, 'ipv6');
|
12
|
+
|
13
|
+
// cg nat
|
14
|
+
unusableList.addSubnet('100.64.0.0', 10);
|
15
|
+
|
16
|
+
// documentation and testing
|
17
|
+
unusableList.addSubnet('192.0.2.0', 24);
|
18
|
+
unusableList.addSubnet('198.51.100.0', 24);
|
19
|
+
unusableList.addSubnet('203.0.113.0', 24);
|
20
|
+
|
21
|
+
// reserved
|
22
|
+
unusableList.addSubnet('0.0.0.0', 8);
|
23
|
+
unusableList.addSubnet('240.0.0.0', 4);
|
24
|
+
|
25
|
+
// benchmarking
|
26
|
+
unusableList.addSubnet('198.18.0.0', 15);
|
11
27
|
|
12
28
|
const privateList = new net.BlockList();
|
13
29
|
privateList.addSubnet('10.0.0.0', 8);
|
@@ -15,8 +31,6 @@ privateList.addSubnet('172.16.0.0', 12);
|
|
15
31
|
privateList.addSubnet('192.168.0.0', 16);
|
16
32
|
privateList.addSubnet('fc00::', 7, 'ipv6');
|
17
33
|
|
18
|
-
const benchmarkList = new net.BlockList();
|
19
|
-
benchmarkList.addSubnet('198.18.0.0', 15);
|
20
34
|
|
21
35
|
export function isIPv4EmbeddedIPv6(address: string) {
|
22
36
|
// this is valid ipv6 address with ipv4 embedded
|
@@ -30,34 +44,62 @@ export function removeIPv4EmbeddedIPv6(address: string) {
|
|
30
44
|
return address;
|
31
45
|
}
|
32
46
|
|
33
|
-
|
34
|
-
|
47
|
+
function isUsableNetworkAddress(address: string) {
|
48
|
+
if (!address)
|
49
|
+
return false;
|
50
|
+
try {
|
51
|
+
address = removeIPv4EmbeddedIPv6(address);
|
35
52
|
|
36
|
-
|
53
|
+
const type = net.isIPv6(address) ? 'ipv6' : 'ipv4';
|
37
54
|
|
38
|
-
|
39
|
-
|
40
|
-
|
55
|
+
// ipv6 addresses are "usable" in the context of scrypted if they are public.
|
56
|
+
if (type === 'ipv6' && privateList.check(address, type))
|
57
|
+
return false;
|
41
58
|
|
42
|
-
|
43
|
-
|
44
|
-
|
59
|
+
return !unusableList.check(address, type);
|
60
|
+
}
|
61
|
+
catch (e) {
|
62
|
+
return false;
|
63
|
+
}
|
45
64
|
}
|
46
65
|
|
47
66
|
export function getUsableNetworkAddresses() {
|
48
67
|
const nis = os.networkInterfaces();
|
49
|
-
const addresses: string[] = [];
|
50
68
|
|
51
|
-
const
|
52
|
-
const
|
69
|
+
const getUsable = (family: string | number) => {
|
70
|
+
const usable = Object.values(nis)
|
53
71
|
.flat()
|
54
72
|
.filter((details) => details.family === family)
|
55
|
-
.
|
56
|
-
|
57
|
-
addresses.push(...adding);
|
73
|
+
.filter(details => isUsableNetworkAddress(details.address));
|
74
|
+
return usable;
|
58
75
|
}
|
59
76
|
|
60
|
-
|
61
|
-
|
62
|
-
|
77
|
+
const ipv4 = getUsable('IPv4');
|
78
|
+
const ipv6 = getUsable('IPv6');
|
79
|
+
|
80
|
+
// ipv6 generates temporary per connection ips that we want to filter out.
|
81
|
+
|
82
|
+
// 2001:abc:def::7b0
|
83
|
+
const fixedAddresses = ipv6.filter(details => details.address.includes('::'));
|
84
|
+
const fixedRanges = fixedAddresses.map(details => {
|
85
|
+
const block = new net.BlockList();
|
86
|
+
const cidr = parseInt(details.address.split('/')[1]) || 1;
|
87
|
+
block.addSubnet(details.address, cidr, 'ipv6');
|
88
|
+
return block;
|
89
|
+
});
|
90
|
+
|
91
|
+
// 2001:abc:def:0:dc:28a7:261b:9324
|
92
|
+
const fixedFiltered = ipv6.filter(details => {
|
93
|
+
for (const block of fixedRanges) {
|
94
|
+
if (block.check(details.address, 'ipv6'))
|
95
|
+
return false;
|
96
|
+
}
|
97
|
+
return true;
|
98
|
+
});
|
99
|
+
|
100
|
+
return [
|
101
|
+
...ipv4.map(details => details.address),
|
102
|
+
...fixedAddresses.map(details => details.address),
|
103
|
+
...fixedFiltered.map(details => details.address),
|
104
|
+
];
|
63
105
|
}
|
@@ -15,12 +15,13 @@ import semver from 'semver';
|
|
15
15
|
import { install as installSourceMapSupport } from 'source-map-support';
|
16
16
|
import { createSelfSignedCertificate, CURRENT_SELF_SIGNED_CERTIFICATE_VERSION } from './cert';
|
17
17
|
import { Plugin, ScryptedUser, Settings } from './db-types';
|
18
|
+
import { getUsableNetworkAddresses } from './ip';
|
18
19
|
import Level from './level';
|
19
20
|
import { PluginError } from './plugin/plugin-error';
|
20
21
|
import { getScryptedVolume } from './plugin/plugin-volume';
|
21
22
|
import { RPCResultError } from './rpc';
|
22
23
|
import { ScryptedRuntime } from './runtime';
|
23
|
-
import {
|
24
|
+
import { SCRYPTED_DEBUG_PORT, SCRYPTED_INSECURE_PORT, SCRYPTED_SECURE_PORT } from './server-settings';
|
24
25
|
import { getNpmPackageInfo } from './services/plugin';
|
25
26
|
import { setScryptedUserPassword, UsersService } from './services/users';
|
26
27
|
import { sleep } from './sleep';
|
@@ -531,7 +532,7 @@ async function start(mainFilename: string, options?: {
|
|
531
532
|
});
|
532
533
|
|
533
534
|
const getAlternateAddresses = async () => {
|
534
|
-
const addresses = ((await scrypted.addressSettings.getLocalAddresses()) ||
|
535
|
+
const addresses = ((await scrypted.addressSettings.getLocalAddresses()) || getUsableNetworkAddresses())
|
535
536
|
.map(address => {
|
536
537
|
if (net.isIPv6(address) && !net.isIPv4(address))
|
537
538
|
address = `[${address}]`;
|
@@ -737,7 +738,7 @@ async function start(mainFilename: string, options?: {
|
|
737
738
|
console.log('#######################################################');
|
738
739
|
console.log(`Scrypted Volume : ${volumeDir}`);
|
739
740
|
console.log(`Scrypted Server (Local) : https://localhost:${SCRYPTED_SECURE_PORT}/`);
|
740
|
-
for (const address of
|
741
|
+
for (const address of getUsableNetworkAddresses()) {
|
741
742
|
console.log(`Scrypted Server (Remote) : https://${address}:${SCRYPTED_SECURE_PORT}/`);
|
742
743
|
}
|
743
744
|
console.log(`Version: : ${await scrypted.info.getVersion()}`);
|
package/src/server-settings.ts
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import { getUsableNetworkAddresses, isUsableNetworkAddress } from './ip';
|
1
|
+
import { getUsableNetworkAddresses } from './ip';
|
3
2
|
|
4
3
|
export const SCRYPTED_INSECURE_PORT = parseInt(process.env.SCRYPTED_INSECURE_PORT) || 11080;
|
5
4
|
export const SCRYPTED_SECURE_PORT = parseInt(process.env.SCRYPTED_SECURE_PORT) || 10443;
|
@@ -8,63 +7,3 @@ export const SCRYPTED_DEBUG_PORT = parseInt(process.env.SCRYPTED_DEBUG_PORT) ||
|
|
8
7
|
export function getIpAddress(): string {
|
9
8
|
return getUsableNetworkAddresses()[0];
|
10
9
|
}
|
11
|
-
|
12
|
-
function normalizeFamilyNodeV18(family: string|number) {
|
13
|
-
if (family === 'IPv4')
|
14
|
-
return 4;
|
15
|
-
if (family === 'IPv6')
|
16
|
-
return 6;
|
17
|
-
return family;
|
18
|
-
}
|
19
|
-
|
20
|
-
function nodeIpAddress(family: number): string[] {
|
21
|
-
// https://chromium.googlesource.com/external/webrtc/+/master/rtc_base/network.cc#236
|
22
|
-
const costlyNetworks = ["ipsec", "tun", "utun", "tap"];
|
23
|
-
|
24
|
-
const ignoreNetworks = [
|
25
|
-
// seen these on macos
|
26
|
-
'llw',
|
27
|
-
'awdl',
|
28
|
-
|
29
|
-
...costlyNetworks,
|
30
|
-
];
|
31
|
-
|
32
|
-
const interfaces = os.networkInterfaces();
|
33
|
-
|
34
|
-
const all = Object.keys(interfaces)
|
35
|
-
.map((nic) => {
|
36
|
-
for (const costly of ignoreNetworks) {
|
37
|
-
if (nic.startsWith(costly)) {
|
38
|
-
return {
|
39
|
-
nic,
|
40
|
-
addresses: [],
|
41
|
-
};
|
42
|
-
}
|
43
|
-
}
|
44
|
-
const addresses = interfaces[nic]!.filter(
|
45
|
-
(details) =>
|
46
|
-
normalizeFamilyNodeV18(details.family) === family
|
47
|
-
&& isUsableNetworkAddress(details.address)
|
48
|
-
);
|
49
|
-
return {
|
50
|
-
nic,
|
51
|
-
addresses: addresses.map((address) => address.address),
|
52
|
-
};
|
53
|
-
})
|
54
|
-
.filter((address) => !!address);
|
55
|
-
|
56
|
-
// os.networkInterfaces doesn't actually return addresses in a good order.
|
57
|
-
// have seen instances where en0 (ethernet) is after en1 (wlan), etc.
|
58
|
-
// eth0 > eth1
|
59
|
-
all.sort((a, b) => a.nic.localeCompare(b.nic));
|
60
|
-
return Object.values(all)
|
61
|
-
.map((entry) => entry.addresses)
|
62
|
-
.flat();
|
63
|
-
}
|
64
|
-
|
65
|
-
export function getHostAddresses(useIpv4: boolean, useIpv6: boolean) {
|
66
|
-
const address: string[] = [];
|
67
|
-
if (useIpv4) address.push(...nodeIpAddress(4));
|
68
|
-
if (useIpv6) address.push(...nodeIpAddress(6));
|
69
|
-
return address;
|
70
|
-
}
|
package/src/services/backup.ts
CHANGED
@@ -5,6 +5,7 @@ import Level from '../level';
|
|
5
5
|
import { getPluginsVolume, getScryptedVolume } from '../plugin/plugin-volume';
|
6
6
|
import { ScryptedRuntime } from '../runtime';
|
7
7
|
import { sleep } from '../sleep';
|
8
|
+
import util from 'util';
|
8
9
|
|
9
10
|
export class Backup {
|
10
11
|
constructor(public runtime: ScryptedRuntime) {}
|
@@ -32,7 +33,16 @@ export class Backup {
|
|
32
33
|
});
|
33
34
|
|
34
35
|
const zip = new AdmZip();
|
35
|
-
|
36
|
+
// addLocalFolderPromise broken
|
37
|
+
// https://github.com/cthackers/adm-zip/issues/532
|
38
|
+
await new Promise<void>((resolve, reject) => {
|
39
|
+
zip.addLocalFolderAsync(backupDbPath, (success, error) => {
|
40
|
+
if (error)
|
41
|
+
reject(error);
|
42
|
+
else
|
43
|
+
resolve();
|
44
|
+
})
|
45
|
+
});
|
36
46
|
return zip.toBufferPromise();
|
37
47
|
}
|
38
48
|
|