@bobfrankston/miscassists 1.0.20 → 1.0.22

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/index.js.map CHANGED
@@ -1 +1 @@
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,EAAqC,MAAM,EACzD,CAAC;AAEF,eAAe;IACX,QAAQ;IACR,aAAa;IACb,SAAS;IACT,aAAa;IACb,YAAY;IACZ,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
@@ -3,5 +3,11 @@
3
3
  // Note that a client entry is
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
- export const jprivs = ["admin", "user", "guest", "bbs"];
6
+ export const jprivs = [
7
+ "admin",
8
+ "user",
9
+ "guest",
10
+ "home",
11
+ "bbs"
12
+ ]; // bbs (bbt) app
7
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,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC"}
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"}
package/jserve.ts CHANGED
@@ -6,7 +6,12 @@
6
6
  // name or pfx:name so you can say "ui:useful"
7
7
  // * means deafult so you can /subpapp rather than /subapp/name
8
8
 
9
- export const jprivs = ["admin", "user", "guest", "bbs"];
9
+ export const jprivs = [
10
+ "admin", // Uber privilege
11
+ "user", // Normal user
12
+ "guest", // Low privilege guest
13
+ "home", // Home control
14
+ "bbs"]; // bbs (bbt) app
10
15
  export type jpriv = typeof jprivs[number];
11
16
 
12
17
  // export type jpriv = "admin" | "user" | "guest";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/miscassists",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "module": "main.js",
@@ -15,6 +15,6 @@
15
15
  "esm": "^3.2.25"
16
16
  },
17
17
  "devDependencies": {
18
- "@types/node": "^20.12.7"
18
+ "@types/node": "^22.10.2"
19
19
  }
20
20
  }
package/ports.js CHANGED
@@ -14,10 +14,12 @@ export const ports = {
14
14
  jvport: 9180,
15
15
  jvports: 9143,
16
16
  sqltcp: 9098,
17
+ sqldbg: 9096,
17
18
  sqlhttp: 9099,
18
19
  sqlproxy2: 9097,
19
20
  sqlproxy: 9080,
20
21
  sqlproxys: 9043,
22
+ pinst: 9299,
21
23
  mlplanel: 9300,
22
24
  mlpanels: 9301,
23
25
  wizzer: 9310,
@@ -30,8 +32,11 @@ export const ports = {
30
32
  syncer: 9317,
31
33
  lifxer: 9318,
32
34
  itemw: 9319,
33
- pinst: 9299,
34
- stephanie: 9320, // For testing stephanie site locally
35
+ stephanie: 9320,
36
+ asyncer: 9321,
37
+ // 9322 is used by Windows
38
+ psyncer: 9324,
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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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. */