@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 CHANGED
@@ -1,137 +1,130 @@
1
1
  // From y:\dev\homecontrol\Others\LifX\Apps\lzlan\lants-address.ts
2
- // import { isIPv6 } from 'net';
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
- var hidden;
6
- (function (hidden) {
7
- const NetworkInterfaces = []; // Need to fix this signature
8
- function assureNetworkInterfaces() {
9
- // Note we don't detect changes to the interfaces
10
- if (networkInterfaces.length > 0)
11
- return;
12
- const netifs = os.networkInterfaces();
13
- for (const dev in netifs) {
14
- netifs[dev].forEach((info) => {
15
- let family = info.family;
16
- if (typeof family == "number")
17
- family = `IPv${family}`; // Strange change work-around
18
- if (family !== 'IPv4' || info.internal === true) {
19
- return;
20
- }
21
- // let info4 = info as os.NetworkInterfaceInfoIPv4;
22
- // (<any>info)['broadcast'] = _getBroadcastAddress(info4);
23
- const mask = ipToUnsignedInt(info.netmask);
24
- const address = ipToUnsignedInt(info.address) & mask;
25
- const ni = { ...info, ints: { mask, address } };
26
- NetworkInterfaces.push(ni);
27
- });
28
- }
29
- return NetworkInterfaces;
30
- }
31
- hidden.assureNetworkInterfaces = assureNetworkInterfaces;
32
- ;
33
- function isLocalIp4Address(ip4Address) {
34
- if (ip4Address == '127.0.0.1')
35
- return true;
36
- const ipa = ipToUnsignedInt(ip4Address);
37
- assureNetworkInterfaces();
38
- return NetworkInterfaces.some((ni) => (ni.ints.address & ni.ints.mask) === (ipa & ni.ints.mask));
39
- }
40
- hidden.isLocalIp4Address = isLocalIp4Address;
41
- function ipToUnsignedInt(ipAddress) {
42
- const parts = ipAddress.split('.');
43
- if (parts.length !== 4) {
44
- throw new Error('Invalid IP address format');
45
- }
46
- const num = parts.map((part) => parseInt(part, 10));
47
- if (num.some((part) => isNaN(part) || part < 0 || part > 255)) {
48
- throw new Error(`Invalid IP address ${ipAddress}`);
49
- }
50
- const signed = (num[0] << 24) + (num[1] << 16) + (num[2] << 8) + num[3];
51
- const unsigned = signed >>> 0;
52
- return unsigned;
53
- }
54
- let pretendRemote = false;
55
- function isLocalIpAddress(ipAddress) {
56
- // '::ffff:172.20.3.39'
57
- if (pretendRemote)
58
- return false;
59
- ipAddress = ipAddress.toLowerCase(); // Safety
60
- if (ipAddress.startsWith('fe80:'))
61
- return true; // Link local
62
- if (ipAddress == "::1")
63
- return true;
64
- ipAddress = ipAddress.replace(/^::ffff:/, ''); // If it's like V5
65
- if (/^[0-9.]+$/.test(ipAddress))
66
- return isLocalIp4Address(ipAddress);
67
- return isIPv6LocalAddress(ipAddress);
68
- // const localIps = getLocalAddresses();
69
- // for (const localIp of localIps) {
70
- // const range = new AddressInfo(localIp);
71
- // if (range.family === 'IPv4' && net.isIPv4(ipAddress)) {
72
- // if (range.address === ipAddress) {
73
- // return true;
74
- // }
75
- // } else if (range.family === 'IPv6' && net.isIPv6(ipAddress)) {
76
- // if (range.address === ipAddress) {
77
- // return true;
78
- // }
79
- // }
80
- // }
81
- return false;
82
- }
83
- hidden.isLocalIpAddress = isLocalIpAddress;
84
- // function isIPv6LocalAddress(ipv6Address: string): boolean {
85
- // const interfaces = networkInterfaces();
86
- // for (const interfaceName of Object.keys(interfaces)) {
87
- // const addresses = interfaces[interfaceName].filter(
88
- // (iface) => iface.family === 'IPv6'
89
- // );
90
- // for (const iface of addresses) {
91
- // if (iface.address === ipv6Address) {
92
- // return true;
93
- // }
94
- // }
95
- // }
96
- // return false;
97
- // }
98
- function isIPv6LocalAddress(ipv6Address) {
99
- const interfaces = networkInterfaces();
100
- for (const interfaceName of Object.keys(interfaces)) {
101
- const addresses = interfaces[interfaceName].filter((iface) => iface.family === 'IPv6');
102
- for (const iface of addresses) {
103
- if (iface.cidr) {
104
- const [ifaceAddress, networkMask] = iface.cidr.split('/');
105
- if (isSameNetwork(ipv6Address, networkMask, ifaceAddress)) {
106
- return true;
107
- }
108
- }
109
- }
110
- }
111
- return false;
112
- }
113
- function isSameNetwork(ipv6Address, networkMaskLength, ifaceAddress) {
114
- const maskLength = parseInt(networkMaskLength, 10);
115
- const bufferLength = Math.ceil(maskLength / 8);
116
- const addressBuffer = Buffer.from(ipv6Address.split(':').map((part) => parseInt(part, 16)));
117
- const ifaceBuffer = Buffer.from(ifaceAddress.split(':').map((part) => parseInt(part, 16)));
118
- for (let i = 0; i < bufferLength; i++) {
119
- const maskBits = Math.min(maskLength - i * 8, 8);
120
- const mask = (0xff00 >> maskBits) & 0xff;
121
- if ((addressBuffer[i] & mask) !== ifaceBuffer[i]) {
122
- return false;
123
- }
124
- }
125
- return true;
126
- }
127
- // Example usage
128
- // const ipv6AddressToCheck = 'fdb7:3df3:9615:193e:3743:1a24:69e8:127a';
129
- // const isLocalAddress = isIPv6LocalAddress(ipv6AddressToCheck);
130
- // console.log(`Is IPv6 Address ${ipv6AddressToCheck} on the same local network? ${isLocalAddress}`);
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
@@ -1 +1 @@
1
- {"version":3,"file":"checkaddress.js","sourceRoot":"","sources":["checkaddress.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAElE,gCAAgC;AAChC,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAC;AAE3C,yFAAyF;AACzF,IAAU,MAAM,CAuJf;AAvJD,WAAU,MAAM;IAGZ,MAAM,iBAAiB,GAAc,EAAE,CAAC,CAAC,6BAA6B;IAEtE,SAAgB,uBAAuB;QACnC,iDAAiD;QACjD,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO;QAEzC,MAAM,MAAM,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC;QACtC,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE;YACtB,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAEzB,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;gBAEzB,IAAI,OAAO,MAAM,IAAI,QAAQ;oBACzB,MAAM,GAAG,MAAM,MAAM,EAAE,CAAC,C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uCAAuC;AACvC,wBAAwB;AACxB,oBAAoB;AACpB,gBAAgB;AAChB,YAAY;AACZ,wBAAwB;AACxB,QAAQ;AAER,8GAA8G;AAC9G,8DAA8D;AAC9D,0DAA0D;AAC1D,uGAAuG;AACvG,sGAAsG;AAEtG,mDAAmD;AACnD,gEAAgE;AAChE,wDAAwD;AACxD,kEAAkE;AAClE,gCAAgC;AAChC,gBAAgB;AAChB,YAAY;AACZ,uBAAuB;AACvB,QAAQ;AAER,uBAAuB;AACvB,+EAA+E;AAC/E,wEAAwE;AACxE,4GAA4G;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
- 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
- }
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,UAA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,KAAK;IACL,IAAI;IACJ,MAAM;CACT,CAAA"}
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, makerPayload, jSubSiteInfo, jpriv, jprivs
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;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,KAAK;CAAC,CAAC,CAAa,gBAAgB"}
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.21",
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": "^20.12.7"
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
- sqlhttp: 9099,
18
- sqlproxy2: 9097,
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
- mlplanel: 9300,
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;IAEf,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IAEd,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IAEd,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IAEd,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;IAEX,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;IAEb,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;IAEb,SAAS,EAAE,IAAI;IAEf,QAAQ,EAAE,IAAI;IACd,SAAS,EAAE,IAAI;IAEf,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IAEd,MAAM,EAAE,IAAI;IAEZ,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IAEf,GAAG,EAAE,IAAI;IACT,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IAEf,MAAM,EAAE,IAAI;IAEZ,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,IAAI;IAEX,KAAK,EAAE,IAAI;IAEX,SAAS,EAAE,IAAI,EAAS,qCAAqC;CAEhE,CAAA;AAED,MAAM,QAAQ,GAAG,MAAM,CAAC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AiE;AACjE,2CAA2C;AAC3C,+DAA+D;AAC/D,uEAAuE;AACvE,4DAA4D;AAC5D,4CAA4C;AAC5C,2DAA2D;AAC3D,uCAAuC;AACvC,qDAAqD;AACrD,oDAAoD;AACpD,2DAA2D;AAC3D,6CAA6C;AAC7C,sCAAsC;AACtC,wDAAwD;AACxD,oDAAoD;AACpD,6DAA6D;AAC7D,uCAAuC;AACvC,yCAAyC;AACzC,uCAAuC;AACvC,8CAA8C;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
- // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
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. */