@bobfrankston/miscassists 1.0.21 → 1.0.23
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/checkaddress.js +127 -134
- package/checkaddress.js.map +1 -1
- package/checkaddress.ts +152 -152
- package/dnsassist.js.map +1 -1
- package/index.js.map +1 -1
- package/index.ts +2 -1
- package/jserve.js +4 -4
- package/jserve.js.map +1 -1
- package/package.json +28 -20
- package/ports.js +24 -19
- package/ports.js.map +1 -1
- package/ports.ts +8 -3
- package/tsconfig.json +1 -1
package/checkaddress.js
CHANGED
|
@@ -1,137 +1,130 @@
|
|
|
1
1
|
// From y:\dev\homecontrol\Others\LifX\Apps\lzlan\lants-address.ts
|
|
2
|
-
|
|
3
|
-
import os, { networkInterfaces } from 'os';
|
|
2
|
+
export {};
|
|
4
3
|
// Quck hack - using namespace to hid this until we debug and integrate it for v6 support
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
// // Example usage
|
|
132
|
-
// const ipv6AddressToCheck = 'fdb7:3df3:9615:193e:3743:1a24:69e8:127a';
|
|
133
|
-
// const networkMask = 'ffff:ffff:ffff:ffff::'; // Replace with the actual subnet mask
|
|
134
|
-
// const isLocalAddress = isIPv6LocalAddress(ipv6AddressToCheck, networkMask);
|
|
135
|
-
// console.log(`Is IPv6 Address ${ipv6AddressToCheck} on the same local network? ${isLocalAddress}`);
|
|
136
|
-
})(hidden || (hidden = {}));
|
|
4
|
+
// namespace hidden {
|
|
5
|
+
// type netinfo = os.NetworkInterfaceInfo & { ints: { address: number, mask: number } }
|
|
6
|
+
// const NetworkInterfaces: netinfo[] = []; // Need to fix this signature
|
|
7
|
+
// export function assureNetworkInterfaces() {
|
|
8
|
+
// // Note we don't detect changes to the interfaces
|
|
9
|
+
// if (networkInterfaces.length > 0) return;
|
|
10
|
+
// const netifs = os.networkInterfaces();
|
|
11
|
+
// for (const dev in netifs) {
|
|
12
|
+
// netifs[dev].forEach((info) => {
|
|
13
|
+
// let family = info.family;
|
|
14
|
+
// if (typeof family == "number")
|
|
15
|
+
// family = `IPv${family}`; // Strange change work-around
|
|
16
|
+
// if (family !== 'IPv4' || info.internal === true) {
|
|
17
|
+
// return;
|
|
18
|
+
// }
|
|
19
|
+
// // let info4 = info as os.NetworkInterfaceInfoIPv4;
|
|
20
|
+
// // (<any>info)['broadcast'] = _getBroadcastAddress(info4);
|
|
21
|
+
// const mask = ipToUnsignedInt(info.netmask);
|
|
22
|
+
// const address = ipToUnsignedInt(info.address) & mask;
|
|
23
|
+
// const ni = { ...info, ints: { mask, address } };
|
|
24
|
+
// NetworkInterfaces.push(ni);
|
|
25
|
+
// })
|
|
26
|
+
// }
|
|
27
|
+
// return NetworkInterfaces;
|
|
28
|
+
// };
|
|
29
|
+
// export function isLocalIp4Address(ip4Address: string) {
|
|
30
|
+
// if (ip4Address == '127.0.0.1')
|
|
31
|
+
// return true;
|
|
32
|
+
// const ipa = ipToUnsignedInt(ip4Address);
|
|
33
|
+
// assureNetworkInterfaces();
|
|
34
|
+
// return NetworkInterfaces.some((ni) => (ni.ints.address & ni.ints.mask) === (ipa & ni.ints.mask));
|
|
35
|
+
// }
|
|
36
|
+
// function ipToUnsignedInt(ipAddress: string): number {
|
|
37
|
+
// const parts = ipAddress.split('.');
|
|
38
|
+
// if (parts.length !== 4) {
|
|
39
|
+
// throw new Error('Invalid IP address format');
|
|
40
|
+
// }
|
|
41
|
+
// const num = parts.map((part) => parseInt(part, 10));
|
|
42
|
+
// if (num.some((part) => isNaN(part) || part < 0 || part > 255)) {
|
|
43
|
+
// throw new Error(`Invalid IP address ${ipAddress}`);
|
|
44
|
+
// }
|
|
45
|
+
// const signed = (num[0] << 24) + (num[1] << 16) + (num[2] << 8) + num[3];
|
|
46
|
+
// const unsigned = signed >>> 0;
|
|
47
|
+
// return unsigned;
|
|
48
|
+
// }
|
|
49
|
+
// let pretendRemote = false;
|
|
50
|
+
// export function isLocalIpAddress(ipAddress: string) {
|
|
51
|
+
// // '::ffff:172.20.3.39'
|
|
52
|
+
// if (pretendRemote) return false;
|
|
53
|
+
// ipAddress = ipAddress.toLowerCase(); // Safety
|
|
54
|
+
// if (ipAddress.startsWith('fe80:'))
|
|
55
|
+
// return true; // Link local
|
|
56
|
+
// if (ipAddress == "::1")
|
|
57
|
+
// return true;
|
|
58
|
+
// ipAddress = ipAddress.replace(/^::ffff:/, ''); // If it's like V5
|
|
59
|
+
// if (/^[0-9.]+$/.test(ipAddress))
|
|
60
|
+
// return isLocalIp4Address(ipAddress)
|
|
61
|
+
// return isIPv6LocalAddress(ipAddress);
|
|
62
|
+
// // const localIps = getLocalAddresses();
|
|
63
|
+
// // for (const localIp of localIps) {
|
|
64
|
+
// // const range = new AddressInfo(localIp);
|
|
65
|
+
// // if (range.family === 'IPv4' && net.isIPv4(ipAddress)) {
|
|
66
|
+
// // if (range.address === ipAddress) {
|
|
67
|
+
// // return true;
|
|
68
|
+
// // }
|
|
69
|
+
// // } else if (range.family === 'IPv6' && net.isIPv6(ipAddress)) {
|
|
70
|
+
// // if (range.address === ipAddress) {
|
|
71
|
+
// // return true;
|
|
72
|
+
// // }
|
|
73
|
+
// // }
|
|
74
|
+
// // }
|
|
75
|
+
// return false;
|
|
76
|
+
// }
|
|
77
|
+
// // function isIPv6LocalAddress(ipv6Address: string): boolean {
|
|
78
|
+
// // const interfaces = networkInterfaces();
|
|
79
|
+
// // for (const interfaceName of Object.keys(interfaces)) {
|
|
80
|
+
// // const addresses = interfaces[interfaceName].filter(
|
|
81
|
+
// // (iface) => iface.family === 'IPv6'
|
|
82
|
+
// // );
|
|
83
|
+
// // for (const iface of addresses) {
|
|
84
|
+
// // if (iface.address === ipv6Address) {
|
|
85
|
+
// // return true;
|
|
86
|
+
// // }
|
|
87
|
+
// // }
|
|
88
|
+
// // }
|
|
89
|
+
// // return false;
|
|
90
|
+
// // }
|
|
91
|
+
// function isIPv6LocalAddress(ipv6Address: string): boolean {
|
|
92
|
+
// const interfaces = networkInterfaces();
|
|
93
|
+
// for (const interfaceName of Object.keys(interfaces)) {
|
|
94
|
+
// const addresses = interfaces[interfaceName].filter((iface) => iface.family === 'IPv6');
|
|
95
|
+
// for (const iface of addresses) {
|
|
96
|
+
// if (iface.cidr) {
|
|
97
|
+
// const [ifaceAddress, networkMask] = iface.cidr.split('/');
|
|
98
|
+
// if (isSameNetwork(ipv6Address, networkMask, ifaceAddress)) {
|
|
99
|
+
// return true;
|
|
100
|
+
// }
|
|
101
|
+
// }
|
|
102
|
+
// }
|
|
103
|
+
// }
|
|
104
|
+
// return false;
|
|
105
|
+
// }
|
|
106
|
+
// function isSameNetwork(ipv6Address: string, networkMaskLength: string, ifaceAddress: string): boolean {
|
|
107
|
+
// const maskLength = parseInt(networkMaskLength, 10);
|
|
108
|
+
// const bufferLength = Math.ceil(maskLength / 8);
|
|
109
|
+
// const addressBuffer = Buffer.from(ipv6Address.split(':').map((part) => parseInt(part, 16)));
|
|
110
|
+
// const ifaceBuffer = Buffer.from(ifaceAddress.split(':').map((part) => parseInt(part, 16)));
|
|
111
|
+
// for (let i = 0; i < bufferLength; i++) {
|
|
112
|
+
// const maskBits = Math.min(maskLength - i * 8, 8);
|
|
113
|
+
// const mask = (0xff00 >> maskBits) & 0xff;
|
|
114
|
+
// if ((addressBuffer[i] & mask) !== ifaceBuffer[i]) {
|
|
115
|
+
// return false;
|
|
116
|
+
// }
|
|
117
|
+
// }
|
|
118
|
+
// return true;
|
|
119
|
+
// }
|
|
120
|
+
// // Example usage
|
|
121
|
+
// // const ipv6AddressToCheck = 'fdb7:3df3:9615:193e:3743:1a24:69e8:127a';
|
|
122
|
+
// // const isLocalAddress = isIPv6LocalAddress(ipv6AddressToCheck);
|
|
123
|
+
// // console.log(`Is IPv6 Address ${ipv6AddressToCheck} on the same local network? ${isLocalAddress}`);
|
|
124
|
+
// // // Example usage
|
|
125
|
+
// // const ipv6AddressToCheck = 'fdb7:3df3:9615:193e:3743:1a24:69e8:127a';
|
|
126
|
+
// // const networkMask = 'ffff:ffff:ffff:ffff::'; // Replace with the actual subnet mask
|
|
127
|
+
// // const isLocalAddress = isIPv6LocalAddress(ipv6AddressToCheck, networkMask);
|
|
128
|
+
// // console.log(`Is IPv6 Address ${ipv6AddressToCheck} on the same local network? ${isLocalAddress}`);
|
|
129
|
+
// }
|
|
137
130
|
//# sourceMappingURL=checkaddress.js.map
|
package/checkaddress.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkaddress.js","sourceRoot":"","sources":["checkaddress.ts"],"names":[],"mappings":"AAAA,kEAAkE
|
|
1
|
+
{"version":3,"file":"checkaddress.js","sourceRoot":"","sources":["checkaddress.ts"],"names":[],"mappings":"AAAA,kEAAkE;;AAKlE,yFAAyF;AACzF,qBAAqB;AACrB,2FAA2F;AAE3F,6EAA6E;AAE7E,kDAAkD;AAClD,4DAA4D;AAC5D,oDAAoD;AAEpD,iDAAiD;AACjD,sCAAsC;AACtC,8CAA8C;AAE9C,4CAA4C;AAE5C,iDAAiD;AACjD,6EAA6E;AAE7E,qEAAqE;AACrE,8BAA8B;AAC9B,oBAAoB;AACpB,sEAAsE;AACtE,6EAA6E;AAE7E,8DAA8D;AAC9D,wEAAwE;AACxE,mEAAmE;AACnE,8CAA8C;AAC9C,iBAAiB;AACjB,YAAY;AACZ,oCAAoC;AACpC,SAAS;AAET,8DAA8D;AAC9D,yCAAyC;AACzC,2BAA2B;AAC3B,mDAAmD;AACnD,qCAAqC;AACrC,4GAA4G;AAC5G,QAAQ;AAER,4DAA4D;AAC5D,8CAA8C;AAC9C,oCAAoC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;AAG5G,0BAA0B;AAC1B,+EAA+E;AAC/E,6FAA6F;AAC7F,qFAAqF;AACrF,4GAA4G;AAC5G,IAAI"}
|
package/checkaddress.ts
CHANGED
|
@@ -4,155 +4,155 @@
|
|
|
4
4
|
import os, { networkInterfaces } from 'os';
|
|
5
5
|
|
|
6
6
|
// Quck hack - using namespace to hid this until we debug and integrate it for v6 support
|
|
7
|
-
namespace hidden {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
7
|
+
// namespace hidden {
|
|
8
|
+
// type netinfo = os.NetworkInterfaceInfo & { ints: { address: number, mask: number } }
|
|
9
|
+
|
|
10
|
+
// const NetworkInterfaces: netinfo[] = []; // Need to fix this signature
|
|
11
|
+
|
|
12
|
+
// export function assureNetworkInterfaces() {
|
|
13
|
+
// // Note we don't detect changes to the interfaces
|
|
14
|
+
// if (networkInterfaces.length > 0) return;
|
|
15
|
+
|
|
16
|
+
// const netifs = os.networkInterfaces();
|
|
17
|
+
// for (const dev in netifs) {
|
|
18
|
+
// netifs[dev].forEach((info) => {
|
|
19
|
+
|
|
20
|
+
// let family = info.family;
|
|
21
|
+
|
|
22
|
+
// if (typeof family == "number")
|
|
23
|
+
// family = `IPv${family}`; // Strange change work-around
|
|
24
|
+
|
|
25
|
+
// if (family !== 'IPv4' || info.internal === true) {
|
|
26
|
+
// return;
|
|
27
|
+
// }
|
|
28
|
+
// // let info4 = info as os.NetworkInterfaceInfoIPv4;
|
|
29
|
+
// // (<any>info)['broadcast'] = _getBroadcastAddress(info4);
|
|
30
|
+
|
|
31
|
+
// const mask = ipToUnsignedInt(info.netmask);
|
|
32
|
+
// const address = ipToUnsignedInt(info.address) & mask;
|
|
33
|
+
// const ni = { ...info, ints: { mask, address } };
|
|
34
|
+
// NetworkInterfaces.push(ni);
|
|
35
|
+
// })
|
|
36
|
+
// }
|
|
37
|
+
// return NetworkInterfaces;
|
|
38
|
+
// };
|
|
39
|
+
|
|
40
|
+
// export function isLocalIp4Address(ip4Address: string) {
|
|
41
|
+
// if (ip4Address == '127.0.0.1')
|
|
42
|
+
// return true;
|
|
43
|
+
// const ipa = ipToUnsignedInt(ip4Address);
|
|
44
|
+
// assureNetworkInterfaces();
|
|
45
|
+
// return NetworkInterfaces.some((ni) => (ni.ints.address & ni.ints.mask) === (ipa & ni.ints.mask));
|
|
46
|
+
// }
|
|
47
|
+
|
|
48
|
+
// function ipToUnsignedInt(ipAddress: string): number {
|
|
49
|
+
// const parts = ipAddress.split('.');
|
|
50
|
+
// if (parts.length !== 4) {
|
|
51
|
+
// throw new Error('Invalid IP address format');
|
|
52
|
+
// }
|
|
53
|
+
|
|
54
|
+
// const num = parts.map((part) => parseInt(part, 10));
|
|
55
|
+
// if (num.some((part) => isNaN(part) || part < 0 || part > 255)) {
|
|
56
|
+
// throw new Error(`Invalid IP address ${ipAddress}`);
|
|
57
|
+
// }
|
|
58
|
+
|
|
59
|
+
// const signed = (num[0] << 24) + (num[1] << 16) + (num[2] << 8) + num[3];
|
|
60
|
+
// const unsigned = signed >>> 0;
|
|
61
|
+
// return unsigned;
|
|
62
|
+
// }
|
|
63
|
+
|
|
64
|
+
// let pretendRemote = false;
|
|
65
|
+
|
|
66
|
+
// export function isLocalIpAddress(ipAddress: string) {
|
|
67
|
+
// // '::ffff:172.20.3.39'
|
|
68
|
+
// if (pretendRemote) return false;
|
|
69
|
+
// ipAddress = ipAddress.toLowerCase(); // Safety
|
|
70
|
+
// if (ipAddress.startsWith('fe80:'))
|
|
71
|
+
// return true; // Link local
|
|
72
|
+
// if (ipAddress == "::1")
|
|
73
|
+
// return true;
|
|
74
|
+
// ipAddress = ipAddress.replace(/^::ffff:/, ''); // If it's like V5
|
|
75
|
+
|
|
76
|
+
// if (/^[0-9.]+$/.test(ipAddress))
|
|
77
|
+
// return isLocalIp4Address(ipAddress)
|
|
78
|
+
// return isIPv6LocalAddress(ipAddress);
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
// // const localIps = getLocalAddresses();
|
|
82
|
+
|
|
83
|
+
// // for (const localIp of localIps) {
|
|
84
|
+
// // const range = new AddressInfo(localIp);
|
|
85
|
+
|
|
86
|
+
// // if (range.family === 'IPv4' && net.isIPv4(ipAddress)) {
|
|
87
|
+
// // if (range.address === ipAddress) {
|
|
88
|
+
// // return true;
|
|
89
|
+
// // }
|
|
90
|
+
// // } else if (range.family === 'IPv6' && net.isIPv6(ipAddress)) {
|
|
91
|
+
// // if (range.address === ipAddress) {
|
|
92
|
+
// // return true;
|
|
93
|
+
// // }
|
|
94
|
+
// // }
|
|
95
|
+
// // }
|
|
96
|
+
|
|
97
|
+
// return false;
|
|
98
|
+
// }
|
|
99
|
+
|
|
100
|
+
// // function isIPv6LocalAddress(ipv6Address: string): boolean {
|
|
101
|
+
// // const interfaces = networkInterfaces();
|
|
102
|
+
// // for (const interfaceName of Object.keys(interfaces)) {
|
|
103
|
+
// // const addresses = interfaces[interfaceName].filter(
|
|
104
|
+
// // (iface) => iface.family === 'IPv6'
|
|
105
|
+
// // );
|
|
106
|
+
// // for (const iface of addresses) {
|
|
107
|
+
// // if (iface.address === ipv6Address) {
|
|
108
|
+
// // return true;
|
|
109
|
+
// // }
|
|
110
|
+
// // }
|
|
111
|
+
// // }
|
|
112
|
+
// // return false;
|
|
113
|
+
// // }
|
|
114
|
+
|
|
115
|
+
// function isIPv6LocalAddress(ipv6Address: string): boolean {
|
|
116
|
+
// const interfaces = networkInterfaces();
|
|
117
|
+
// for (const interfaceName of Object.keys(interfaces)) {
|
|
118
|
+
// const addresses = interfaces[interfaceName].filter((iface) => iface.family === 'IPv6');
|
|
119
|
+
// for (const iface of addresses) {
|
|
120
|
+
// if (iface.cidr) {
|
|
121
|
+
// const [ifaceAddress, networkMask] = iface.cidr.split('/');
|
|
122
|
+
// if (isSameNetwork(ipv6Address, networkMask, ifaceAddress)) {
|
|
123
|
+
// return true;
|
|
124
|
+
// }
|
|
125
|
+
// }
|
|
126
|
+
// }
|
|
127
|
+
// }
|
|
128
|
+
// return false;
|
|
129
|
+
// }
|
|
130
|
+
|
|
131
|
+
// function isSameNetwork(ipv6Address: string, networkMaskLength: string, ifaceAddress: string): boolean {
|
|
132
|
+
// const maskLength = parseInt(networkMaskLength, 10);
|
|
133
|
+
// const bufferLength = Math.ceil(maskLength / 8);
|
|
134
|
+
// const addressBuffer = Buffer.from(ipv6Address.split(':').map((part) => parseInt(part, 16)));
|
|
135
|
+
// const ifaceBuffer = Buffer.from(ifaceAddress.split(':').map((part) => parseInt(part, 16)));
|
|
136
|
+
|
|
137
|
+
// for (let i = 0; i < bufferLength; i++) {
|
|
138
|
+
// const maskBits = Math.min(maskLength - i * 8, 8);
|
|
139
|
+
// const mask = (0xff00 >> maskBits) & 0xff;
|
|
140
|
+
// if ((addressBuffer[i] & mask) !== ifaceBuffer[i]) {
|
|
141
|
+
// return false;
|
|
142
|
+
// }
|
|
143
|
+
// }
|
|
144
|
+
// return true;
|
|
145
|
+
// }
|
|
146
|
+
|
|
147
|
+
// // Example usage
|
|
148
|
+
// // const ipv6AddressToCheck = 'fdb7:3df3:9615:193e:3743:1a24:69e8:127a';
|
|
149
|
+
// // const isLocalAddress = isIPv6LocalAddress(ipv6AddressToCheck);
|
|
150
|
+
// // console.log(`Is IPv6 Address ${ipv6AddressToCheck} on the same local network? ${isLocalAddress}`);
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
// // // Example usage
|
|
154
|
+
// // const ipv6AddressToCheck = 'fdb7:3df3:9615:193e:3743:1a24:69e8:127a';
|
|
155
|
+
// // const networkMask = 'ffff:ffff:ffff:ffff::'; // Replace with the actual subnet mask
|
|
156
|
+
// // const isLocalAddress = isIPv6LocalAddress(ipv6AddressToCheck, networkMask);
|
|
157
|
+
// // console.log(`Is IPv6 Address ${ipv6AddressToCheck} on the same local network? ${isLocalAddress}`);
|
|
158
|
+
// }
|
package/dnsassist.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dnsassist.js","sourceRoot":"","sources":["dnsassist.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,MAAM,IAAI,CAAA;AAEnB;;GAEG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,CAAE,UAAU;AAEjD,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,IAAY,EAAE,KAAe;IACxD,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC;QAAE,IAAI,IAAI,GAAG,GAAG,YAAY,CAAC,CAAG,YAAY;IAEpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EACrD,CAAC,GAAQ,EAAE,GAAG,EAAE,EAAE;QACd,IAAI,GAAG;YACH,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;QAEzB,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;QAC/C,IAAI,MAAM,CAAC,MAAM,GAAG,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ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAChG,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAExC,OAAO,EAAuB,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EACH,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAC/D,KAAK,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAChG,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAExC,OAAO,EAAuB,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EACH,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAC/D,KAAK,EAAE,IAAI,EAAE,MAAM,EACtB,CAAC;AAGF,eAAe;IACX,QAAQ;IACR,aAAa;IACb,SAAS;IACT,aAAa;IACb,YAAY;IACZ,KAAK;IACL,IAAI;IACJ,MAAM;CACT,CAAA"}
|
package/index.ts
CHANGED
|
@@ -5,8 +5,9 @@ import { jSubSiteInfo, jpriv, jprivs } from './jserve.js';
|
|
|
5
5
|
|
|
6
6
|
export {
|
|
7
7
|
resolve4, resolveLocal4, isLocalIP, isThisMachine, default_fqdn,
|
|
8
|
-
ports, mqtt,
|
|
8
|
+
ports, mqtt, jprivs
|
|
9
9
|
};
|
|
10
|
+
export type { makerPayload, jSubSiteInfo, jpriv };
|
|
10
11
|
|
|
11
12
|
export default {
|
|
12
13
|
resolve4,
|
package/jserve.js
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
// name or pfx:name so you can say "ui:useful"
|
|
5
5
|
// * means deafult so you can /subpapp rather than /subapp/name
|
|
6
6
|
export const jprivs = [
|
|
7
|
-
"admin",
|
|
8
|
-
"user",
|
|
9
|
-
"guest",
|
|
10
|
-
"home",
|
|
7
|
+
"admin", // Uber privilege
|
|
8
|
+
"user", // Normal user
|
|
9
|
+
"guest", // Low privilege guest
|
|
10
|
+
"home", // Home control
|
|
11
11
|
"bbs"
|
|
12
12
|
]; // bbs (bbt) app
|
|
13
13
|
//# sourceMappingURL=jserve.js.map
|
package/jserve.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jserve.js","sourceRoot":"","sources":["jserve.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,uEAAuE;AAEvE,8BAA8B;AAC9B,gDAAgD;AAChD,iEAAiE;AAEjE,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,OAAO;
|
|
1
|
+
{"version":3,"file":"jserve.js","sourceRoot":"","sources":["jserve.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,uEAAuE;AAEvE,8BAA8B;AAC9B,gDAAgD;AAChD,iEAAiE;AAEjE,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,OAAO,EAAa,iBAAiB;IACrC,MAAM,EAAc,cAAc;IAClC,OAAO,EAAa,sBAAsB;IAC1C,MAAM,EAAc,eAAe;IACnC,KAAK;CAAC,CAAC,CAAa,gBAAgB"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bobfrankston/miscassists",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"module": "main.js",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
-
},
|
|
10
|
-
"keywords": [],
|
|
11
|
-
"author": "",
|
|
12
|
-
"license": "ISC",
|
|
13
|
-
"type": "module",
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"esm": "^3.2.25"
|
|
16
|
-
},
|
|
17
|
-
"devDependencies": {
|
|
18
|
-
"@types/node": "^
|
|
19
|
-
}
|
|
20
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@bobfrankston/miscassists",
|
|
3
|
+
"version": "1.0.23",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"module": "main.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [],
|
|
11
|
+
"author": "",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"esm": "^3.2.25"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/node": "^24.3.1"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/BobFrankston/miscassists.git"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/BobFrankston/miscassists/issues"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/BobFrankston/miscassists#readme"
|
|
28
|
+
}
|
package/ports.js
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
1
1
|
import { default_fqdn } from "./dnsassist.js";
|
|
2
2
|
export const ports = {
|
|
3
3
|
jserve2: 10080,
|
|
4
|
-
jserve2s: 10443,
|
|
5
|
-
devlisten: 9070,
|
|
6
|
-
halisten: 9071,
|
|
7
|
-
rmfsite: 9081,
|
|
8
|
-
rmfsites: 9082,
|
|
9
|
-
rmfprod: 9081,
|
|
10
|
-
rmfbeta: 9082,
|
|
11
|
-
rmfalpha: 9083,
|
|
12
|
-
shim: 9084,
|
|
13
|
-
shims: 9085,
|
|
14
|
-
jvport: 9180,
|
|
4
|
+
jserve2s: 10443, // For now, we use the same port for http and https
|
|
5
|
+
devlisten: 9070, // Hubitat MakerAPI http server
|
|
6
|
+
halisten: 9071, // Home Assistant MakerAPI http server
|
|
7
|
+
rmfsite: 9081, // These will be phased out for the new version
|
|
8
|
+
rmfsites: 9082, // used to be for SSL but now any port is ssl or not
|
|
9
|
+
rmfprod: 9081, // Secondary port for production version (debugging)
|
|
10
|
+
rmfbeta: 9082, // Secondary port for beta version (debugging)
|
|
11
|
+
rmfalpha: 9083, // Secondary port for the alpha version
|
|
12
|
+
shim: 9084, // Warming -- these are current forwarded!
|
|
13
|
+
shims: 9085, //
|
|
14
|
+
jvport: 9180, // These are copied in hlib
|
|
15
15
|
jvports: 9143,
|
|
16
16
|
sqltcp: 9098,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
sqldbg: 9096,
|
|
18
|
+
sqlhttp: 9099, // For now
|
|
19
|
+
sqlproxy2: 9097, // Replace sqlproxy and share a port for http/https
|
|
19
20
|
sqlproxy: 9080,
|
|
20
21
|
sqlproxys: 9043,
|
|
21
|
-
|
|
22
|
+
pinst: 9299, // Used for my pings server [currently it has a local value because --install-links isn't cooperating]
|
|
23
|
+
mlplanel: 9300, // Note: This must jibe with mlpanel since we copy it to another system
|
|
22
24
|
mlpanels: 9301,
|
|
23
|
-
wizzer: 9310,
|
|
24
|
-
pserve: 9311,
|
|
25
|
-
vserve: 9312,
|
|
25
|
+
wizzer: 9310, // Work in progress Wiz control. Internal only so not https for now
|
|
26
|
+
pserve: 9311, // Photo server
|
|
27
|
+
vserve: 9312, // Video server from IIS
|
|
26
28
|
checkmake: 9313,
|
|
27
|
-
bbt: 9314,
|
|
29
|
+
bbt: 9314, // Bulletin board test
|
|
28
30
|
backts: 9315,
|
|
29
31
|
backserve: 9316,
|
|
30
32
|
syncer: 9317,
|
|
31
33
|
lifxer: 9318,
|
|
32
34
|
itemw: 9319,
|
|
33
|
-
pinst: 9299,
|
|
34
35
|
stephanie: 9320, // For testing stephanie site locally
|
|
36
|
+
asyncer: 9321,
|
|
37
|
+
// 9322 is used by Windows
|
|
38
|
+
psyncer: 9324, // Used for the powershell version
|
|
39
|
+
rmfAlpha2: 9325, // So we can try alternative clients.
|
|
35
40
|
};
|
|
36
41
|
const mqttHost = "pi4c";
|
|
37
42
|
const mqttPort = 1883;
|
package/ports.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ports.js","sourceRoot":"","sources":["ports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,OAAO,EAAG,KAAK;IACf,QAAQ,EAAE,KAAK;
|
|
1
|
+
{"version":3,"file":"ports.js","sourceRoot":"","sources":["ports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,OAAO,EAAG,KAAK;IACf,QAAQ,EAAE,KAAK,EAAS,mDAAmD;IAE3E,SAAS,EAAE,IAAI,EAAS,+BAA+B;IACvD,QAAQ,EAAE,IAAI,EAAU,sCAAsC;IAE9D,OAAO,EAAE,IAAI,EAAW,+CAA+C;IACvE,QAAQ,EAAE,IAAI,EAAU,oDAAoD;IAE5E,OAAO,EAAE,IAAI,EAAW,oDAAoD;IAC5E,OAAO,EAAE,IAAI,EAAW,8CAA8C;IACtE,QAAQ,EAAE,IAAI,EAAU,uCAAuC;IAE/D,IAAI,EAAE,IAAI,EAAc,0CAA0C;IAClE,KAAK,EAAE,IAAI,EAAa,GAAG;IAE3B,MAAM,EAAE,IAAI,EAAY,2BAA2B;IACnD,OAAO,EAAE,IAAI;IAEb,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI,EAAW,UAAU;IAElC,SAAS,EAAE,IAAI,EAAS,mDAAmD;IAE3E,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,IAAI;IAEf,KAAK,EAAE,IAAI,EAAa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8C;AAC9C,gDAAgD;AAChD,EAAE"}
|
package/ports.ts
CHANGED
|
@@ -21,6 +21,7 @@ export const ports = {
|
|
|
21
21
|
jvports: 9143,
|
|
22
22
|
|
|
23
23
|
sqltcp: 9098,
|
|
24
|
+
sqldbg: 9096,
|
|
24
25
|
sqlhttp: 9099, // For now
|
|
25
26
|
|
|
26
27
|
sqlproxy2: 9097, // Replace sqlproxy and share a port for http/https
|
|
@@ -28,11 +29,13 @@ export const ports = {
|
|
|
28
29
|
sqlproxy: 9080,
|
|
29
30
|
sqlproxys: 9043,
|
|
30
31
|
|
|
32
|
+
pinst: 9299, // Used for my pings server [currently it has a local value because --install-links isn't cooperating]
|
|
33
|
+
|
|
31
34
|
mlplanel: 9300, // Note: This must jibe with mlpanel since we copy it to another system
|
|
32
35
|
mlpanels: 9301,
|
|
33
36
|
|
|
34
37
|
wizzer: 9310, // Work in progress Wiz control. Internal only so not https for now
|
|
35
|
-
|
|
38
|
+
|
|
36
39
|
pserve: 9311, // Photo server
|
|
37
40
|
vserve: 9312, // Video server from IIS
|
|
38
41
|
checkmake: 9313,
|
|
@@ -46,10 +49,12 @@ export const ports = {
|
|
|
46
49
|
lifxer: 9318,
|
|
47
50
|
itemw: 9319,
|
|
48
51
|
|
|
49
|
-
pinst: 9299, // Used for my pings server [currently it has a local value because --install-links isn't cooperating]
|
|
50
|
-
|
|
51
52
|
stephanie: 9320, // For testing stephanie site locally
|
|
53
|
+
asyncer: 9321,
|
|
54
|
+
// 9322 is used by Windows
|
|
55
|
+
psyncer: 9324, // Used for the powershell version
|
|
52
56
|
|
|
57
|
+
rmfAlpha2: 9325, // So we can try alternative clients.
|
|
53
58
|
}
|
|
54
59
|
|
|
55
60
|
const mqttHost = "pi4c";
|
package/tsconfig.json
CHANGED
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
75
75
|
|
|
76
76
|
/* Interop Constraints */
|
|
77
|
-
|
|
77
|
+
"isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
|
78
78
|
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
|
|
79
79
|
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
80
80
|
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|