@start9labs/start-sdk 2.0.1 → 2.0.2
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/CHANGELOG.md +6 -0
- package/node_modules/@start9labs/start-core/interfaces/Host.js +1 -1
- package/node_modules/@start9labs/start-core/osBindings/AddPublicDomainRes.d.ts +4 -1
- package/node_modules/@start9labs/start-core/osBindings/BindingSetGuaWanParams.d.ts +6 -0
- package/node_modules/@start9labs/start-core/osBindings/{BindingSetGuaAccessParams.js → BindingSetGuaWanParams.js} +1 -1
- package/node_modules/@start9labs/start-core/osBindings/BindingSetGuaWanParams.js.map +1 -0
- package/node_modules/@start9labs/start-core/osBindings/CheckPortV6Res.d.ts +10 -0
- package/node_modules/@start9labs/start-core/osBindings/CheckPortV6Res.js +4 -0
- package/node_modules/@start9labs/start-core/osBindings/CheckPortV6Res.js.map +1 -0
- package/node_modules/@start9labs/start-core/osBindings/DerivedAddressInfo.d.ts +5 -6
- package/node_modules/@start9labs/start-core/osBindings/NetworkInterfaceInfo.d.ts +1 -1
- package/node_modules/@start9labs/start-core/osBindings/QueryDnsRes.d.ts +9 -0
- package/node_modules/@start9labs/start-core/osBindings/QueryDnsRes.js +4 -0
- package/node_modules/@start9labs/start-core/osBindings/QueryDnsRes.js.map +1 -0
- package/node_modules/@start9labs/start-core/osBindings/index.d.ts +29 -28
- package/node_modules/@start9labs/start-core/osBindings/index.js.map +1 -1
- package/node_modules/@start9labs/start-core/osBindings/tunnel/AddPinholeParams.d.ts +21 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/AddPinholeParams.js +4 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/AddPinholeParams.js.map +1 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/HttpRedirectStatus.d.ts +12 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/HttpRedirectStatus.js +4 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/HttpRedirectStatus.js.map +1 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/HttpRedirects.d.ts +9 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/HttpRedirects.js +4 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/HttpRedirects.js.map +1 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/NetworkInterfaceInfo.d.ts +1 -1
- package/node_modules/@start9labs/start-core/osBindings/tunnel/Pinhole.d.ts +24 -0
- package/node_modules/@start9labs/start-core/osBindings/{GuaAccess.js → tunnel/Pinhole.js} +1 -1
- package/node_modules/@start9labs/start-core/osBindings/tunnel/Pinhole.js.map +1 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/Pinholes6.d.ts +4 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/Pinholes6.js +3 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/Pinholes6.js.map +1 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/RemovePinholeParams.d.ts +4 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/RemovePinholeParams.js +4 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/RemovePinholeParams.js.map +1 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/SetHttpRedirectEnabledParams.d.ts +7 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/SetHttpRedirectEnabledParams.js +4 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/SetHttpRedirectEnabledParams.js.map +1 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/SetPinholeEnabledParams.d.ts +5 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/SetPinholeEnabledParams.js +4 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/SetPinholeEnabledParams.js.map +1 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/SetSubnetIpv6Params.d.ts +8 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/SetSubnetIpv6Params.js +4 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/SetSubnetIpv6Params.js.map +1 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/ShowConfigParams.d.ts +0 -1
- package/node_modules/@start9labs/start-core/osBindings/tunnel/TunnelDatabase.d.ts +9 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/UpdatePinholeLabelParams.d.ts +5 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/UpdatePinholeLabelParams.js +4 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/UpdatePinholeLabelParams.js.map +1 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/WgSubnetConfig.d.ts +6 -0
- package/node_modules/@start9labs/start-core/osBindings/tunnel/index.d.ts +12 -2
- package/node_modules/@start9labs/start-core/package.json +3 -1
- package/node_modules/@start9labs/start-core/util/ip.d.ts +9 -0
- package/node_modules/@start9labs/start-core/util/ip.js +50 -32
- package/node_modules/@start9labs/start-core/util/ip.js.map +1 -1
- package/package.json +1 -1
- package/s9pk.mk +8 -4
- package/node_modules/@start9labs/start-core/osBindings/BindingSetGuaAccessParams.d.ts +0 -7
- package/node_modules/@start9labs/start-core/osBindings/BindingSetGuaAccessParams.js.map +0 -1
- package/node_modules/@start9labs/start-core/osBindings/GuaAccess.d.ts +0 -18
- package/node_modules/@start9labs/start-core/osBindings/GuaAccess.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.2 — StartOS 0.4.0-beta.10 (2026-07-08)
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- **`s9pk.mk` checks build tools before packing, not just before `install`.** The `check-deps` target now runs as an order-only prerequisite of the build targets, so a missing `start-cli`, `npm`, `git`, or `jq` fails fast with a clear message instead of surfacing partway through a build. `git` is required because `s9pk pack` embeds the repository's commit hash (`git rev-parse HEAD`) in the manifest; `jq` is required because the post-build summary reads the manifest with it (without it the summary would print blank fields). The "not found" messages now link to the current setup guide (`https://docs.start9.com/packaging/environment-setup.html`) instead of a dead pre-reorg URL.
|
|
8
|
+
|
|
3
9
|
## 2.0.1 — StartOS 0.4.0-beta.10 (2026-07-03)
|
|
4
10
|
|
|
5
11
|
### Fixed
|
|
@@ -121,7 +121,7 @@ class MultiHost {
|
|
|
121
121
|
}
|
|
122
122
|
// Both ranges must be in-bounds and above the reserved/privileged range.
|
|
123
123
|
// StartOS additionally rejects a few specific ports (e.g. 5353, 5432,
|
|
124
|
-
//
|
|
124
|
+
// 6010) server-side at allocation time.
|
|
125
125
|
for (const [name, start] of [
|
|
126
126
|
['internalStartPort', internalStartPort],
|
|
127
127
|
['externalStartPort', externalStartPort],
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { CheckPortRes } from './CheckPortRes';
|
|
2
|
+
import type { CheckPortV6Res } from './CheckPortV6Res';
|
|
3
|
+
import type { QueryDnsRes } from './QueryDnsRes';
|
|
2
4
|
export type AddPublicDomainRes = {
|
|
3
|
-
dns:
|
|
5
|
+
dns: QueryDnsRes;
|
|
4
6
|
port: CheckPortRes;
|
|
7
|
+
portV6: CheckPortV6Res | null;
|
|
5
8
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BindingSetGuaWanParams.js","sourceRoot":"","sources":["../../lib/osBindings/BindingSetGuaWanParams.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* v6 reachability of the box's GUA at a port. v6 is NAT-free (the GUA is the
|
|
3
|
+
* box's own address), so there is no hairpinning. Queried separately from
|
|
4
|
+
* [`CheckPortRes`] so the IPv4 and IPv6 checks can run independently.
|
|
5
|
+
*/
|
|
6
|
+
export type CheckPortV6Res = {
|
|
7
|
+
ip: string;
|
|
8
|
+
openExternally: boolean;
|
|
9
|
+
openInternally: boolean;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckPortV6Res.js","sourceRoot":"","sources":["../../lib/osBindings/CheckPortV6Res.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { GuaAccess } from './GuaAccess';
|
|
2
1
|
import type { HostnameInfo } from './HostnameInfo';
|
|
3
2
|
export type DerivedAddressInfo = {
|
|
4
3
|
/**
|
|
@@ -10,12 +9,12 @@ export type DerivedAddressInfo = {
|
|
|
10
9
|
*/
|
|
11
10
|
disabled: Array<[string, number]>;
|
|
12
11
|
/**
|
|
13
|
-
* User override:
|
|
14
|
-
*
|
|
12
|
+
* User override: IPv6 global-unicast addresses opted into WAN exposure.
|
|
13
|
+
* Projected into `HostnameInfo.public` by `update_addresses`, so `public`
|
|
14
|
+
* stays the single source of truth for WAN reachability (P2P address
|
|
15
|
+
* selection, upstream pinholes). A GUA not in this set is LAN-only.
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
-
[key: string]: GuaAccess;
|
|
18
|
-
};
|
|
17
|
+
guaWan: Array<string>;
|
|
19
18
|
/**
|
|
20
19
|
* COMPUTED: NetServiceData::update — all possible addresses for this binding
|
|
21
20
|
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a public domain currently resolves to, per address family. A public
|
|
3
|
+
* domain is DualStack: the operator points an `A` record at the gateway's WAN
|
|
4
|
+
* IPv4 and an `AAAA` at the box's IPv6 GUA. Either may be absent.
|
|
5
|
+
*/
|
|
6
|
+
export type QueryDnsRes = {
|
|
7
|
+
ipv4: string | null;
|
|
8
|
+
ipv6: string | null;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryDnsRes.js","sourceRoot":"","sources":["../../lib/osBindings/QueryDnsRes.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
|
|
@@ -5,8 +5,8 @@ export { ActionAccess } from './ActionAccess';
|
|
|
5
5
|
export { ActionId } from './ActionId';
|
|
6
6
|
export { ActionInput } from './ActionInput';
|
|
7
7
|
export { ActionMetadata } from './ActionMetadata';
|
|
8
|
-
export { ActionResult } from './ActionResult';
|
|
9
8
|
export { ActionResultMember } from './ActionResultMember';
|
|
9
|
+
export { ActionResult } from './ActionResult';
|
|
10
10
|
export { ActionResultV0 } from './ActionResultV0';
|
|
11
11
|
export { ActionResultV1 } from './ActionResultV1';
|
|
12
12
|
export { ActionResultValue } from './ActionResultValue';
|
|
@@ -21,13 +21,13 @@ export { AddPackageToCategoryParams } from './AddPackageToCategoryParams';
|
|
|
21
21
|
export { AddPrivateDomainParams } from './AddPrivateDomainParams';
|
|
22
22
|
export { AddPublicDomainParams } from './AddPublicDomainParams';
|
|
23
23
|
export { AddPublicDomainRes } from './AddPublicDomainRes';
|
|
24
|
+
export { AddressInfo } from './AddressInfo';
|
|
24
25
|
export { AddSslOptions } from './AddSslOptions';
|
|
25
26
|
export { AddTunnelParams } from './AddTunnelParams';
|
|
26
27
|
export { AddVersionParams } from './AddVersionParams';
|
|
27
|
-
export { AddressInfo } from './AddressInfo';
|
|
28
28
|
export { Algorithm } from './Algorithm';
|
|
29
|
-
export { AllPackageData } from './AllPackageData';
|
|
30
29
|
export { AllowedStatuses } from './AllowedStatuses';
|
|
30
|
+
export { AllPackageData } from './AllPackageData';
|
|
31
31
|
export { AlpnInfo } from './AlpnInfo';
|
|
32
32
|
export { AnySignature } from './AnySignature';
|
|
33
33
|
export { AnySigningKey } from './AnySigningKey';
|
|
@@ -37,20 +37,20 @@ export { AttachParams } from './AttachParams';
|
|
|
37
37
|
export { BackupInfo } from './BackupInfo';
|
|
38
38
|
export { BackupParams } from './BackupParams';
|
|
39
39
|
export { BackupReport } from './BackupReport';
|
|
40
|
-
export { BackupTarget } from './BackupTarget';
|
|
41
40
|
export { BackupTargetFS } from './BackupTargetFS';
|
|
42
41
|
export { BackupTargetId } from './BackupTargetId';
|
|
42
|
+
export { BackupTarget } from './BackupTarget';
|
|
43
43
|
export { Base64 } from './Base64';
|
|
44
44
|
export { BasicCredential } from './BasicCredential';
|
|
45
45
|
export { BindId } from './BindId';
|
|
46
46
|
export { BindInfo } from './BindInfo';
|
|
47
|
-
export { BindOptions } from './BindOptions';
|
|
48
|
-
export { BindParams } from './BindParams';
|
|
49
|
-
export { BindRangeParams } from './BindRangeParams';
|
|
50
47
|
export { BindingRanges } from './BindingRanges';
|
|
51
48
|
export { BindingSetAddressEnabledParams } from './BindingSetAddressEnabledParams';
|
|
52
|
-
export {
|
|
49
|
+
export { BindingSetGuaWanParams } from './BindingSetGuaWanParams';
|
|
53
50
|
export { Bindings } from './Bindings';
|
|
51
|
+
export { BindOptions } from './BindOptions';
|
|
52
|
+
export { BindParams } from './BindParams';
|
|
53
|
+
export { BindRangeParams } from './BindRangeParams';
|
|
54
54
|
export { Blake3Commitment } from './Blake3Commitment';
|
|
55
55
|
export { BlockDev } from './BlockDev';
|
|
56
56
|
export { BuildArg } from './BuildArg';
|
|
@@ -63,10 +63,11 @@ export { CheckDependenciesResult } from './CheckDependenciesResult';
|
|
|
63
63
|
export { CheckDnsParams } from './CheckDnsParams';
|
|
64
64
|
export { CheckPortParams } from './CheckPortParams';
|
|
65
65
|
export { CheckPortRes } from './CheckPortRes';
|
|
66
|
-
export {
|
|
66
|
+
export { CheckPortV6Res } from './CheckPortV6Res';
|
|
67
67
|
export { CifsAddParams } from './CifsAddParams';
|
|
68
68
|
export { CifsBackupTarget } from './CifsBackupTarget';
|
|
69
69
|
export { CifsRemoveParams } from './CifsRemoveParams';
|
|
70
|
+
export { Cifs } from './Cifs';
|
|
70
71
|
export { CifsUpdateParams } from './CifsUpdateParams';
|
|
71
72
|
export { ClearActionsParams } from './ClearActionsParams';
|
|
72
73
|
export { ClearBindingsParams } from './ClearBindingsParams';
|
|
@@ -85,10 +86,10 @@ export { CurrentDependencies } from './CurrentDependencies';
|
|
|
85
86
|
export { CurrentDependencyInfo } from './CurrentDependencyInfo';
|
|
86
87
|
export { DataUrl } from './DataUrl';
|
|
87
88
|
export { DeleteLegacyParams } from './DeleteLegacyParams';
|
|
88
|
-
export { DepInfo } from './DepInfo';
|
|
89
89
|
export { Dependencies } from './Dependencies';
|
|
90
90
|
export { DependencyMetadata } from './DependencyMetadata';
|
|
91
91
|
export { DependencyRequirement } from './DependencyRequirement';
|
|
92
|
+
export { DepInfo } from './DepInfo';
|
|
92
93
|
export { DerivedAddressInfo } from './DerivedAddressInfo';
|
|
93
94
|
export { Description } from './Description';
|
|
94
95
|
export { DesiredStatus } from './DesiredStatus';
|
|
@@ -124,8 +125,8 @@ export { GetOsAssetParams } from './GetOsAssetParams';
|
|
|
124
125
|
export { GetOsVersionParams } from './GetOsVersionParams';
|
|
125
126
|
export { GetOutboundGatewayParams } from './GetOutboundGatewayParams';
|
|
126
127
|
export { GetPackageParams } from './GetPackageParams';
|
|
127
|
-
export { GetPackageResponse } from './GetPackageResponse';
|
|
128
128
|
export { GetPackageResponseFull } from './GetPackageResponseFull';
|
|
129
|
+
export { GetPackageResponse } from './GetPackageResponse';
|
|
129
130
|
export { GetServiceInterfaceParams } from './GetServiceInterfaceParams';
|
|
130
131
|
export { GetServiceManifestParams } from './GetServiceManifestParams';
|
|
131
132
|
export { GetServicePortForwardParams } from './GetServicePortForwardParams';
|
|
@@ -137,15 +138,14 @@ export { GetUsersParams } from './GetUsersParams';
|
|
|
137
138
|
export { GigaBytes } from './GigaBytes';
|
|
138
139
|
export { GitHash } from './GitHash';
|
|
139
140
|
export { Governor } from './Governor';
|
|
140
|
-
export { GuaAccess } from './GuaAccess';
|
|
141
141
|
export { Guid } from './Guid';
|
|
142
142
|
export { HardwareRequirements } from './HardwareRequirements';
|
|
143
143
|
export { HealthCheckId } from './HealthCheckId';
|
|
144
|
-
export { Host } from './Host';
|
|
145
144
|
export { HostId } from './HostId';
|
|
146
145
|
export { HostnameInfo } from './HostnameInfo';
|
|
147
146
|
export { HostnameMetadata } from './HostnameMetadata';
|
|
148
147
|
export { Hosts } from './Hosts';
|
|
148
|
+
export { Host } from './Host';
|
|
149
149
|
export { IdMap } from './IdMap';
|
|
150
150
|
export { ImageConfig } from './ImageConfig';
|
|
151
151
|
export { ImageId } from './ImageId';
|
|
@@ -154,11 +154,11 @@ export { ImageSource } from './ImageSource';
|
|
|
154
154
|
export { InfoParams } from './InfoParams';
|
|
155
155
|
export { InitAcmeParams } from './InitAcmeParams';
|
|
156
156
|
export { InitProgressRes } from './InitProgressRes';
|
|
157
|
-
export { InstallParams } from './InstallParams';
|
|
158
157
|
export { InstalledState } from './InstalledState';
|
|
159
158
|
export { InstalledVersionParams } from './InstalledVersionParams';
|
|
160
159
|
export { InstallingInfo } from './InstallingInfo';
|
|
161
160
|
export { InstallingState } from './InstallingState';
|
|
161
|
+
export { InstallParams } from './InstallParams';
|
|
162
162
|
export { IpInfo } from './IpInfo';
|
|
163
163
|
export { KeyboardOptions } from './KeyboardOptions';
|
|
164
164
|
export { KillParams } from './KillParams';
|
|
@@ -170,8 +170,8 @@ export { ListVersionSignersParams } from './ListVersionSignersParams';
|
|
|
170
170
|
export { LocaleString } from './LocaleString';
|
|
171
171
|
export { LogEntry } from './LogEntry';
|
|
172
172
|
export { LogFollowResponse } from './LogFollowResponse';
|
|
173
|
-
export { LogResponse } from './LogResponse';
|
|
174
173
|
export { LoginParams } from './LoginParams';
|
|
174
|
+
export { LogResponse } from './LogResponse';
|
|
175
175
|
export { LogsParams } from './LogsParams';
|
|
176
176
|
export { LshwDevice } from './LshwDevice';
|
|
177
177
|
export { LshwDisplay } from './LshwDisplay';
|
|
@@ -180,15 +180,15 @@ export { Manifest } from './Manifest';
|
|
|
180
180
|
export { MaybeUtf8String } from './MaybeUtf8String';
|
|
181
181
|
export { MebiBytes } from './MebiBytes';
|
|
182
182
|
export { MerkleArchiveCommitment } from './MerkleArchiveCommitment';
|
|
183
|
-
export { Metadata } from './Metadata';
|
|
184
183
|
export { MetadataSrc } from './MetadataSrc';
|
|
185
|
-
export {
|
|
184
|
+
export { Metadata } from './Metadata';
|
|
186
185
|
export { MetricsCpu } from './MetricsCpu';
|
|
187
186
|
export { MetricsDisk } from './MetricsDisk';
|
|
188
187
|
export { MetricsFollowResponse } from './MetricsFollowResponse';
|
|
189
188
|
export { MetricsGeneral } from './MetricsGeneral';
|
|
190
189
|
export { MetricsMemory } from './MetricsMemory';
|
|
191
190
|
export { MetricsSummary } from './MetricsSummary';
|
|
191
|
+
export { Metrics } from './Metrics';
|
|
192
192
|
export { ModifyNotificationBeforeParams } from './ModifyNotificationBeforeParams';
|
|
193
193
|
export { ModifyNotificationParams } from './ModifyNotificationParams';
|
|
194
194
|
export { MountParams } from './MountParams';
|
|
@@ -199,20 +199,20 @@ export { NetInfo } from './NetInfo';
|
|
|
199
199
|
export { NetworkInfo } from './NetworkInfo';
|
|
200
200
|
export { NetworkInterfaceInfo } from './NetworkInterfaceInfo';
|
|
201
201
|
export { NetworkInterfaceType } from './NetworkInterfaceType';
|
|
202
|
-
export { Notification } from './Notification';
|
|
203
202
|
export { NotificationLevel } from './NotificationLevel';
|
|
203
|
+
export { Notification } from './Notification';
|
|
204
204
|
export { NotificationWithId } from './NotificationWithId';
|
|
205
205
|
export { OsIndex } from './OsIndex';
|
|
206
|
-
export { OsVersionInfo } from './OsVersionInfo';
|
|
207
206
|
export { OsVersionInfoMap } from './OsVersionInfoMap';
|
|
207
|
+
export { OsVersionInfo } from './OsVersionInfo';
|
|
208
208
|
export { PackageBackupInfo } from './PackageBackupInfo';
|
|
209
209
|
export { PackageBackupReport } from './PackageBackupReport';
|
|
210
210
|
export { PackageDataEntry } from './PackageDataEntry';
|
|
211
211
|
export { PackageDetailLevel } from './PackageDetailLevel';
|
|
212
212
|
export { PackageId } from './PackageId';
|
|
213
213
|
export { PackageIndex } from './PackageIndex';
|
|
214
|
-
export { PackageInfo } from './PackageInfo';
|
|
215
214
|
export { PackageInfoShort } from './PackageInfoShort';
|
|
215
|
+
export { PackageInfo } from './PackageInfo';
|
|
216
216
|
export { PackagePlugin } from './PackagePlugin';
|
|
217
217
|
export { PackageState } from './PackageState';
|
|
218
218
|
export { PackageVersionCount } from './PackageVersionCount';
|
|
@@ -229,9 +229,10 @@ export { PortForward } from './PortForward';
|
|
|
229
229
|
export { Progress } from './Progress';
|
|
230
230
|
export { ProgressUnits } from './ProgressUnits';
|
|
231
231
|
export { ProxyAuth } from './ProxyAuth';
|
|
232
|
-
export { Public } from './Public';
|
|
233
232
|
export { PublicDomainConfig } from './PublicDomainConfig';
|
|
233
|
+
export { Public } from './Public';
|
|
234
234
|
export { QueryDnsParams } from './QueryDnsParams';
|
|
235
|
+
export { QueryDnsRes } from './QueryDnsRes';
|
|
235
236
|
export { RangeBindInfo } from './RangeBindInfo';
|
|
236
237
|
export { RangeServiceInterface } from './RangeServiceInterface';
|
|
237
238
|
export { RebuildParams } from './RebuildParams';
|
|
@@ -263,12 +264,12 @@ export { ServerHostname } from './ServerHostname';
|
|
|
263
264
|
export { ServerInfo } from './ServerInfo';
|
|
264
265
|
export { ServerSpecs } from './ServerSpecs';
|
|
265
266
|
export { ServerStatus } from './ServerStatus';
|
|
266
|
-
export { ServiceInterface } from './ServiceInterface';
|
|
267
267
|
export { ServiceInterfaceId } from './ServiceInterfaceId';
|
|
268
|
+
export { ServiceInterface } from './ServiceInterface';
|
|
268
269
|
export { ServiceInterfaceType } from './ServiceInterfaceType';
|
|
269
|
-
export { Session } from './Session';
|
|
270
270
|
export { SessionList } from './SessionList';
|
|
271
271
|
export { Sessions } from './Sessions';
|
|
272
|
+
export { Session } from './Session';
|
|
272
273
|
export { SetBackupProgress } from './SetBackupProgress';
|
|
273
274
|
export { SetCountryParams } from './SetCountryParams';
|
|
274
275
|
export { SetDataVersionParams } from './SetDataVersionParams';
|
|
@@ -278,23 +279,23 @@ export { SetHealth } from './SetHealth';
|
|
|
278
279
|
export { SetIconParams } from './SetIconParams';
|
|
279
280
|
export { SetInitProgress } from './SetInitProgress';
|
|
280
281
|
export { SetLanguageParams } from './SetLanguageParams';
|
|
281
|
-
export { SetMainStatus } from './SetMainStatus';
|
|
282
282
|
export { SetMainStatusStatus } from './SetMainStatusStatus';
|
|
283
|
+
export { SetMainStatus } from './SetMainStatus';
|
|
283
284
|
export { SetNameParams } from './SetNameParams';
|
|
284
285
|
export { SetOutboundGatewayParams } from './SetOutboundGatewayParams';
|
|
285
286
|
export { SetServerHostnameParams } from './SetServerHostnameParams';
|
|
286
287
|
export { SetStaticDnsParams } from './SetStaticDnsParams';
|
|
287
|
-
export { SetWifiEnabledParams } from './SetWifiEnabledParams';
|
|
288
288
|
export { SetupExecuteParams } from './SetupExecuteParams';
|
|
289
289
|
export { SetupInfo } from './SetupInfo';
|
|
290
290
|
export { SetupProgress } from './SetupProgress';
|
|
291
291
|
export { SetupResult } from './SetupResult';
|
|
292
292
|
export { SetupStatusRes } from './SetupStatusRes';
|
|
293
|
+
export { SetWifiEnabledParams } from './SetWifiEnabledParams';
|
|
293
294
|
export { ShutdownParams } from './ShutdownParams';
|
|
294
295
|
export { SideloadParams } from './SideloadParams';
|
|
295
296
|
export { SideloadResponse } from './SideloadResponse';
|
|
296
|
-
export { SignAssetParams } from './SignAssetParams';
|
|
297
297
|
export { SignalStrength } from './SignalStrength';
|
|
298
|
+
export { SignAssetParams } from './SignAssetParams';
|
|
298
299
|
export { SignerInfo } from './SignerInfo';
|
|
299
300
|
export { SmtpSecurity } from './SmtpSecurity';
|
|
300
301
|
export { SmtpValue } from './SmtpValue';
|
|
@@ -306,12 +307,12 @@ export { Ssid } from './Ssid';
|
|
|
306
307
|
export { StartOsRecoveryInfo } from './StartOsRecoveryInfo';
|
|
307
308
|
export { StartStop } from './StartStop';
|
|
308
309
|
export { StatusInfo } from './StatusInfo';
|
|
309
|
-
export { Task } from './Task';
|
|
310
310
|
export { TaskCondition } from './TaskCondition';
|
|
311
311
|
export { TaskEntry } from './TaskEntry';
|
|
312
312
|
export { TaskInput } from './TaskInput';
|
|
313
313
|
export { TaskSeverity } from './TaskSeverity';
|
|
314
314
|
export { TaskTrigger } from './TaskTrigger';
|
|
315
|
+
export { Task } from './Task';
|
|
315
316
|
export { TestSmtpParams } from './TestSmtpParams';
|
|
316
317
|
export { TimeInfo } from './TimeInfo';
|
|
317
318
|
export { UmountParams } from './UmountParams';
|
|
@@ -325,8 +326,8 @@ export { UrlPluginRegisterParams } from './UrlPluginRegisterParams';
|
|
|
325
326
|
export { UrlPluginRegistration } from './UrlPluginRegistration';
|
|
326
327
|
export { UsersResponse } from './UsersResponse';
|
|
327
328
|
export { VerifyCifsParams } from './VerifyCifsParams';
|
|
328
|
-
export { Version } from './Version';
|
|
329
329
|
export { VersionSignerParams } from './VersionSignerParams';
|
|
330
|
+
export { Version } from './Version';
|
|
330
331
|
export { VolumeId } from './VolumeId';
|
|
331
332
|
export { WifiAddParams } from './WifiAddParams';
|
|
332
333
|
export { WifiInfo } from './WifiInfo';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/osBindings/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/osBindings/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgVA,mDAAkC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type AddPinholeParams = {
|
|
2
|
+
/**
|
|
3
|
+
* The client's global IPv6 (GUA) to expose. Must be an address this tunnel
|
|
4
|
+
* delegates to a client — its subnet needs an IPv6 prefix.
|
|
5
|
+
*/
|
|
6
|
+
gua: string;
|
|
7
|
+
/**
|
|
8
|
+
* External port opened on the GUA.
|
|
9
|
+
*/
|
|
10
|
+
externalPort: number;
|
|
11
|
+
/**
|
|
12
|
+
* Destination port on the GUA. Omit for a pure pinhole (no NAT, internal ==
|
|
13
|
+
* external); set a different value for a port remap (e.g. 80 -> 443).
|
|
14
|
+
*/
|
|
15
|
+
internalPort?: number;
|
|
16
|
+
label: string | null;
|
|
17
|
+
/**
|
|
18
|
+
* Number of contiguous ports, counting up from external/internal. Default 1.
|
|
19
|
+
*/
|
|
20
|
+
count?: number;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddPinholeParams.js","sourceRoot":"","sources":["../../../lib/osBindings/tunnel/AddPinholeParams.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type HttpRedirectStatus = {
|
|
2
|
+
ip: string;
|
|
3
|
+
/**
|
|
4
|
+
* Whether the redirect is on for this IP (default true).
|
|
5
|
+
*/
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Whether a port-forward already occupies port 80 on this IP, in which case
|
|
9
|
+
* the redirect yields and does not bind.
|
|
10
|
+
*/
|
|
11
|
+
forwarded: boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpRedirectStatus.js","sourceRoot":"","sources":["../../../lib/osBindings/tunnel/HttpRedirectStatus.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-IPv4 HTTP→HTTPS redirect state. The tunnel runs a redirect on port 80 of
|
|
3
|
+
* every public IPv4 by default; this records the addresses where the user has
|
|
4
|
+
* turned it off (absence = on). The redirect also yields to any port-forward
|
|
5
|
+
* occupying port 80 on that IP, so the two never fight over the port.
|
|
6
|
+
*/
|
|
7
|
+
export type HttpRedirects = {
|
|
8
|
+
disabled: string[];
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpRedirects.js","sourceRoot":"","sources":["../../../lib/osBindings/tunnel/HttpRedirects.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One IPv6 GUA firewall entry, keyed by the exposed `[GUA]:external_port`. The
|
|
3
|
+
* destination is always the same GUA. When `internal_port` is `None` (or equals
|
|
4
|
+
* the key's port) it's a pure firewall pinhole — `ct state new accept`, no NAT.
|
|
5
|
+
* When it differs it's a port-only DNAT to `[GUA]:internal_port` (e.g. 80→443),
|
|
6
|
+
* the v6 analogue of a `PortForward::Dnat`.
|
|
7
|
+
*/
|
|
8
|
+
export type Pinhole = {
|
|
9
|
+
label: string | null;
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Contiguous ports opened, counting up from the key's port; `1` for single.
|
|
13
|
+
*/
|
|
14
|
+
count: number;
|
|
15
|
+
/**
|
|
16
|
+
* Destination port on the GUA; `None` means "same as the external (key) port"
|
|
17
|
+
* — a pure pinhole. A different value makes this a port-DNAT.
|
|
18
|
+
*/
|
|
19
|
+
internalPort: number | null;
|
|
20
|
+
/**
|
|
21
|
+
* Gateway-created (PCP) vs user-added. Drives the UI Manual/Automatic split.
|
|
22
|
+
*/
|
|
23
|
+
auto: boolean;
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pinhole.js","sourceRoot":"","sources":["../../../lib/osBindings/tunnel/Pinhole.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pinholes6.js","sourceRoot":"","sources":["../../../lib/osBindings/tunnel/Pinholes6.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RemovePinholeParams.js","sourceRoot":"","sources":["../../../lib/osBindings/tunnel/RemovePinholeParams.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
|
package/node_modules/@start9labs/start-core/osBindings/tunnel/SetHttpRedirectEnabledParams.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetHttpRedirectEnabledParams.js","sourceRoot":"","sources":["../../../lib/osBindings/tunnel/SetHttpRedirectEnabledParams.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetPinholeEnabledParams.js","sourceRoot":"","sources":["../../../lib/osBindings/tunnel/SetPinholeEnabledParams.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetSubnetIpv6Params.js","sourceRoot":"","sources":["../../../lib/osBindings/tunnel/SetSubnetIpv6Params.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { AnyVerifyingKey } from './AnyVerifyingKey';
|
|
2
2
|
import type { DnsRecords } from './DnsRecords';
|
|
3
3
|
import type { GatewayId } from './GatewayId';
|
|
4
|
+
import type { HttpRedirects } from './HttpRedirects';
|
|
4
5
|
import type { NetworkInterfaceInfo } from './NetworkInterfaceInfo';
|
|
6
|
+
import type { Pinholes6 } from './Pinholes6';
|
|
5
7
|
import type { PortForwards } from './PortForwards';
|
|
6
8
|
import type { Sessions } from './Sessions';
|
|
7
9
|
import type { SignerInfo } from './SignerInfo';
|
|
@@ -19,5 +21,12 @@ export type TunnelDatabase = {
|
|
|
19
21
|
};
|
|
20
22
|
wg: WgServer;
|
|
21
23
|
portForwards: PortForwards;
|
|
24
|
+
/**
|
|
25
|
+
* IPv6 GUA firewall pinholes: inbound to a client's own global address is
|
|
26
|
+
* accepted (no NAT — the GUA is directly routable), keyed by the exposed
|
|
27
|
+
* `[GUA]:port`. The v4 analogue is a `PortForward::Dnat`.
|
|
28
|
+
*/
|
|
29
|
+
pinholes6: Pinholes6;
|
|
22
30
|
dnsRecords: DnsRecords;
|
|
31
|
+
httpRedirects: HttpRedirects;
|
|
23
32
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UpdatePinholeLabelParams.js","sourceRoot":"","sources":["../../../lib/osBindings/tunnel/UpdatePinholeLabelParams.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
|
|
@@ -9,4 +9,10 @@ export type WgSubnetConfig = {
|
|
|
9
9
|
* keeps the default masquerade; a per-device `wan_ip` overrides this.
|
|
10
10
|
*/
|
|
11
11
|
wanIp: string | null;
|
|
12
|
+
/**
|
|
13
|
+
* Routed IPv6 prefix delegated to this subnet, if any. Each host on the
|
|
14
|
+
* subnet (the server and every client) gets one `/128` out of it with its
|
|
15
|
+
* tunnel IPv4 embedded — see [`crate::tunnel::wg6`].
|
|
16
|
+
*/
|
|
17
|
+
ipv6: string | null;
|
|
12
18
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { AddDeviceParams } from './AddDeviceParams';
|
|
2
2
|
export { AddDnsRecordParams } from './AddDnsRecordParams';
|
|
3
3
|
export { AddKeyParams } from './AddKeyParams';
|
|
4
|
+
export { AddPinholeParams } from './AddPinholeParams';
|
|
4
5
|
export { AddPortForwardParams } from './AddPortForwardParams';
|
|
5
6
|
export { AddSubnetParams } from './AddSubnetParams';
|
|
6
7
|
export { AnyVerifyingKey } from './AnyVerifyingKey';
|
|
@@ -11,26 +12,34 @@ export { DnsRecordEntry } from './DnsRecordEntry';
|
|
|
11
12
|
export { DnsRecords } from './DnsRecords';
|
|
12
13
|
export { GatewayId } from './GatewayId';
|
|
13
14
|
export { GatewayType } from './GatewayType';
|
|
15
|
+
export { HttpRedirectStatus } from './HttpRedirectStatus';
|
|
16
|
+
export { HttpRedirects } from './HttpRedirects';
|
|
14
17
|
export { IpInfo } from './IpInfo';
|
|
15
18
|
export { ListDevicesParams } from './ListDevicesParams';
|
|
16
19
|
export { NetworkInterfaceInfo } from './NetworkInterfaceInfo';
|
|
17
20
|
export { NetworkInterfaceType } from './NetworkInterfaceType';
|
|
18
21
|
export { Pem } from './Pem';
|
|
19
|
-
export {
|
|
22
|
+
export { Pinholes6 } from './Pinholes6';
|
|
23
|
+
export { Pinhole } from './Pinhole';
|
|
20
24
|
export { PortForwards } from './PortForwards';
|
|
25
|
+
export { PortForward } from './PortForward';
|
|
21
26
|
export { RemoveDeviceParams } from './RemoveDeviceParams';
|
|
22
27
|
export { RemoveDnsRecordParams } from './RemoveDnsRecordParams';
|
|
23
28
|
export { RemoveKeyParams } from './RemoveKeyParams';
|
|
29
|
+
export { RemovePinholeParams } from './RemovePinholeParams';
|
|
24
30
|
export { RemovePortForwardParams } from './RemovePortForwardParams';
|
|
25
|
-
export { Session } from './Session';
|
|
26
31
|
export { Sessions } from './Sessions';
|
|
32
|
+
export { Session } from './Session';
|
|
27
33
|
export { SetAutoPortForwardParams } from './SetAutoPortForwardParams';
|
|
28
34
|
export { SetDeviceKindParams } from './SetDeviceKindParams';
|
|
29
35
|
export { SetDeviceWanParams } from './SetDeviceWanParams';
|
|
30
36
|
export { SetDnsInjectionParams } from './SetDnsInjectionParams';
|
|
37
|
+
export { SetHttpRedirectEnabledParams } from './SetHttpRedirectEnabledParams';
|
|
31
38
|
export { SetPasswordParams } from './SetPasswordParams';
|
|
39
|
+
export { SetPinholeEnabledParams } from './SetPinholeEnabledParams';
|
|
32
40
|
export { SetPortForwardEnabledParams } from './SetPortForwardEnabledParams';
|
|
33
41
|
export { SetSubnetDnsParams } from './SetSubnetDnsParams';
|
|
42
|
+
export { SetSubnetIpv6Params } from './SetSubnetIpv6Params';
|
|
34
43
|
export { SetSubnetWanParams } from './SetSubnetWanParams';
|
|
35
44
|
export { ShowConfigParams } from './ShowConfigParams';
|
|
36
45
|
export { SignerInfo } from './SignerInfo';
|
|
@@ -39,6 +48,7 @@ export { SubnetParams } from './SubnetParams';
|
|
|
39
48
|
export { TunnelCertData } from './TunnelCertData';
|
|
40
49
|
export { TunnelDatabase } from './TunnelDatabase';
|
|
41
50
|
export { TunnelUpdateResult } from './TunnelUpdateResult';
|
|
51
|
+
export { UpdatePinholeLabelParams } from './UpdatePinholeLabelParams';
|
|
42
52
|
export { UpdatePortForwardLabelParams } from './UpdatePortForwardLabelParams';
|
|
43
53
|
export { WebserverInfo } from './WebserverInfo';
|
|
44
54
|
export { WgClientKind } from './WgClientKind';
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
"sideEffects": true,
|
|
6
6
|
"scripts": {
|
|
7
7
|
"peggy": "peggy --allowed-start-rules \"*\" --plugin ./node_modules/ts-pegjs/dist/tspegjs -o lib/exver/exver.ts lib/exver/exver.pegjs",
|
|
8
|
-
"copy": "cpy \"**/*.js\" \"**/*.d.ts\" ../dist --cwd=lib --parents &&
|
|
8
|
+
"copy": "cpy \"**/*.js\" \"**/*.d.ts\" ../dist --cwd=lib --parents && node -e \"fs.cpSync('node_modules','dist/node_modules',{recursive:true,verbatimSymlinks:true})\" && cpy package.json README.md LICENSE dist",
|
|
9
|
+
"clean:dist": "node -e \"fs.rmSync('dist',{recursive:true,force:true})\"",
|
|
10
|
+
"build": "npm run clean:dist && npm run tsc && npm run copy",
|
|
9
11
|
"test": "jest -c ./jest.config.js --coverage",
|
|
10
12
|
"buildOutput": "npx prettier --write \"**/*.ts\"",
|
|
11
13
|
"check": "tsc --noEmit",
|
|
@@ -35,6 +35,13 @@ export declare class IpAddress {
|
|
|
35
35
|
isIpv6(): boolean;
|
|
36
36
|
/** Returns true if this is a public IPv4 address (not in any private range). */
|
|
37
37
|
isPublic(): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Returns true if this is an IPv6 global-unicast address (a GUA) — i.e. IPv6
|
|
40
|
+
* that is not loopback, unique-local (`fc00::/7`), or link-local (`fe80::/10`).
|
|
41
|
+
* Mirrors the backend's `ipv6_is_local`, so it identifies the same globally
|
|
42
|
+
* routable address StartOS advertises for DualStack.
|
|
43
|
+
*/
|
|
44
|
+
isGua(): boolean;
|
|
38
45
|
/**
|
|
39
46
|
* Returns a new IpAddress incremented by `n`.
|
|
40
47
|
* @param n - The integer amount to add (fractional part is truncated)
|
|
@@ -107,5 +114,7 @@ export declare const IPV4_LOOPBACK: IpNet;
|
|
|
107
114
|
export declare const IPV6_LOOPBACK: IpNet;
|
|
108
115
|
/** IPv6 link-local network (fe80::/10). */
|
|
109
116
|
export declare const IPV6_LINK_LOCAL: IpNet;
|
|
117
|
+
/** IPv6 unique-local network (fc00::/7). */
|
|
118
|
+
export declare const IPV6_ULA: IpNet;
|
|
110
119
|
/** Carrier-Grade NAT (CGNAT) address range (100.64.0.0/10), per RFC 6598. */
|
|
111
120
|
export declare const CGNAT: IpNet;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CGNAT = exports.IPV6_LINK_LOCAL = exports.IPV6_LOOPBACK = exports.IPV4_LOOPBACK = exports.PRIVATE_IPV4_RANGES = exports.IpNet = exports.IpAddress = void 0;
|
|
3
|
+
exports.CGNAT = exports.IPV6_ULA = exports.IPV6_LINK_LOCAL = exports.IPV6_LOOPBACK = exports.IPV4_LOOPBACK = exports.PRIVATE_IPV4_RANGES = exports.IpNet = exports.IpAddress = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Represents an IPv4 or IPv6 address as raw octets with arithmetic and comparison operations.
|
|
6
6
|
*
|
|
@@ -77,20 +77,7 @@ class IpAddress {
|
|
|
77
77
|
if (octets.some(o => o > 255)) {
|
|
78
78
|
throw new Error('invalid ip address');
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
while (pre[pre.length - 1] == 0) {
|
|
82
|
-
pre.pop();
|
|
83
|
-
}
|
|
84
|
-
let post = octets.slice(8);
|
|
85
|
-
while (post[0] == 0) {
|
|
86
|
-
post.unshift();
|
|
87
|
-
}
|
|
88
|
-
if (pre.length + post.length == 16) {
|
|
89
|
-
return new IpAddress(octets, octets.join(':'));
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
return new IpAddress(octets, pre.join(':') + '::' + post.join(':'));
|
|
93
|
-
}
|
|
80
|
+
return new IpAddress(octets, renderIpv6(octets));
|
|
94
81
|
}
|
|
95
82
|
else {
|
|
96
83
|
throw new Error('invalid ip address');
|
|
@@ -108,6 +95,18 @@ class IpAddress {
|
|
|
108
95
|
isPublic() {
|
|
109
96
|
return this.isIpv4() && !exports.PRIVATE_IPV4_RANGES.some(r => r.contains(this));
|
|
110
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Returns true if this is an IPv6 global-unicast address (a GUA) — i.e. IPv6
|
|
100
|
+
* that is not loopback, unique-local (`fc00::/7`), or link-local (`fe80::/10`).
|
|
101
|
+
* Mirrors the backend's `ipv6_is_local`, so it identifies the same globally
|
|
102
|
+
* routable address StartOS advertises for DualStack.
|
|
103
|
+
*/
|
|
104
|
+
isGua() {
|
|
105
|
+
return (this.isIpv6() &&
|
|
106
|
+
!exports.IPV6_LOOPBACK.contains(this) &&
|
|
107
|
+
!exports.IPV6_ULA.contains(this) &&
|
|
108
|
+
!exports.IPV6_LINK_LOCAL.contains(this));
|
|
109
|
+
}
|
|
111
110
|
/**
|
|
112
111
|
* Returns a new IpAddress incremented by `n`.
|
|
113
112
|
* @param n - The integer amount to add (fractional part is truncated)
|
|
@@ -188,23 +187,7 @@ class IpAddress {
|
|
|
188
187
|
this.renderedOctets = [...this.octets];
|
|
189
188
|
}
|
|
190
189
|
else if (this.octets.length === 16) {
|
|
191
|
-
|
|
192
|
-
if (x === 0) {
|
|
193
|
-
acc.current++;
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
acc.current = 0;
|
|
197
|
-
}
|
|
198
|
-
if (acc.current > acc.end - acc.start) {
|
|
199
|
-
acc.end = idx + 1;
|
|
200
|
-
acc.start = acc.end - acc.current;
|
|
201
|
-
}
|
|
202
|
-
return acc;
|
|
203
|
-
}, { start: 0, end: 0, current: 0 });
|
|
204
|
-
if (contigZeros.end - contigZeros.start >= 2) {
|
|
205
|
-
return `${this.octets.slice(0, contigZeros.start).join(':')}::${this.octets.slice(contigZeros.end).join(':')}`;
|
|
206
|
-
}
|
|
207
|
-
this.renderedAddress = this.octets.join(':');
|
|
190
|
+
this.renderedAddress = renderIpv6(this.octets);
|
|
208
191
|
this.renderedOctets = [...this.octets];
|
|
209
192
|
}
|
|
210
193
|
else {
|
|
@@ -333,6 +316,41 @@ exports.IPV4_LOOPBACK = IpNet.parse('127.0.0.0/8');
|
|
|
333
316
|
exports.IPV6_LOOPBACK = IpNet.parse('::1/128');
|
|
334
317
|
/** IPv6 link-local network (fe80::/10). */
|
|
335
318
|
exports.IPV6_LINK_LOCAL = IpNet.parse('fe80::/10');
|
|
319
|
+
/** IPv6 unique-local network (fc00::/7). */
|
|
320
|
+
exports.IPV6_ULA = IpNet.parse('fc00::/7');
|
|
336
321
|
/** Carrier-Grade NAT (CGNAT) address range (100.64.0.0/10), per RFC 6598. */
|
|
337
322
|
exports.CGNAT = IpNet.parse('100.64.0.0/10');
|
|
323
|
+
/**
|
|
324
|
+
* Render 16 IPv6 octets to a canonical string: eight 16-bit groups in lowercase
|
|
325
|
+
* hex, with the longest run of two or more all-zero groups collapsed to `::`.
|
|
326
|
+
*/
|
|
327
|
+
function renderIpv6(octets) {
|
|
328
|
+
const groups = [];
|
|
329
|
+
for (let i = 0; i < 16; i += 2) {
|
|
330
|
+
groups.push((octets[i] << 8) | octets[i + 1]);
|
|
331
|
+
}
|
|
332
|
+
let bestStart = -1;
|
|
333
|
+
let bestLen = 0;
|
|
334
|
+
let curStart = -1;
|
|
335
|
+
let curLen = 0;
|
|
336
|
+
for (let i = 0; i <= groups.length; i++) {
|
|
337
|
+
if (i < groups.length && groups[i] === 0) {
|
|
338
|
+
if (curStart < 0)
|
|
339
|
+
curStart = i;
|
|
340
|
+
curLen++;
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
if (curLen > bestLen) {
|
|
344
|
+
bestLen = curLen;
|
|
345
|
+
bestStart = curStart;
|
|
346
|
+
}
|
|
347
|
+
curStart = -1;
|
|
348
|
+
curLen = 0;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
const hex = groups.map(g => g.toString(16));
|
|
352
|
+
return bestLen >= 2
|
|
353
|
+
? `${hex.slice(0, bestStart).join(':')}::${hex.slice(bestStart + bestLen).join(':')}`
|
|
354
|
+
: hex.join(':');
|
|
355
|
+
}
|
|
338
356
|
//# sourceMappingURL=ip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ip.js","sourceRoot":"","sources":["../../lib/util/ip.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACH,MAAa,SAAS;IAEpB,YACS,MAAgB,EACf,eAAuB;QADxB,WAAM,GAAN,MAAM,CAAU;QACf,oBAAe,GAAf,eAAe,CAAQ;QAE/B,IAAI,CAAC,cAAc,GAAG,CAAC,GAAG,MAAM,CAAC,CAAA;IACnC,CAAC;IACD;;;;;;OAMG;IACH,MAAM,CAAC,KAAK,CAAC,OAAe;QAC1B,IAAI,MAAM,CAAA;QACV,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;YAC1B,MAAM,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;YAC9B,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;YAC/B,IAAI,GAAG,GAAG,CAAC,CAAA;YACX,IAAI,MAAM,GAAG,CAAC,CAAA;YACd,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBACjB,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAA;gBACnC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,CAAA;gBAC3B,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,GAAG,GAAG,CAAA;gBAC5B,GAAG,IAAI,CAAC,CAAA;YACV,CAAC;YACD,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;YAClC,IAAI,GAAG,GAAG,UAAU,EAAE,CAAC;gBACrB,GAAG,GAAG,UAAU,CAAA;gB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C;aAAM,CAAC;YACN,IAAI,MAAM,GAAG,OAAO,EAAE,CAAC;gBACrB,OAAO,GAAG,MAAM,CAAA;gBAChB,SAAS,GAAG,QAAQ,CAAA;YACtB,CAAC;YACD,QAAQ,GAAG,CAAC,CAAC,CAAA;YACb,MAAM,GAAG,CAAC,CAAA;QACZ,CAAC;IACH,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3C,OAAO,OAAO,IAAI,CAAC;QACjB,CAAC,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC,SAAS,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACrF,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACnB,CAAC"}
|
package/package.json
CHANGED
package/s9pk.mk
CHANGED
|
@@ -63,12 +63,12 @@ x86 x86_64: arch/x86_64
|
|
|
63
63
|
arm arm64 aarch64: arch/aarch64
|
|
64
64
|
riscv riscv64: arch/riscv64
|
|
65
65
|
|
|
66
|
-
$(BASE_NAME).s9pk: $(INGREDIENTS) $(GIT_DEPS)
|
|
66
|
+
$(BASE_NAME).s9pk: $(INGREDIENTS) $(GIT_DEPS) | check-deps
|
|
67
67
|
@$(MAKE) --no-print-directory ingredients
|
|
68
68
|
@echo " Packing '$@'..."
|
|
69
69
|
start-cli s9pk pack -o $@
|
|
70
70
|
|
|
71
|
-
$(BASE_NAME)_%.s9pk: $(INGREDIENTS) $(GIT_DEPS)
|
|
71
|
+
$(BASE_NAME)_%.s9pk: $(INGREDIENTS) $(GIT_DEPS) | check-deps
|
|
72
72
|
@$(MAKE) --no-print-directory ingredients
|
|
73
73
|
@echo " Packing '$@'..."
|
|
74
74
|
start-cli s9pk pack --arch=$* -o $@
|
|
@@ -101,9 +101,13 @@ publish: | all
|
|
|
101
101
|
|
|
102
102
|
check-deps:
|
|
103
103
|
@command -v start-cli >/dev/null || \
|
|
104
|
-
(echo "Error: start-cli not found.
|
|
104
|
+
(echo "Error: start-cli not found. See https://docs.start9.com/packaging/environment-setup.html" && exit 1)
|
|
105
105
|
@command -v npm >/dev/null || \
|
|
106
|
-
(echo "Error: npm not found.
|
|
106
|
+
(echo "Error: npm not found. Install Node.js and npm. See https://docs.start9.com/packaging/environment-setup.html" && exit 1)
|
|
107
|
+
@command -v git >/dev/null || \
|
|
108
|
+
(echo "Error: git not found. Install git. See https://docs.start9.com/packaging/environment-setup.html" && exit 1)
|
|
109
|
+
@command -v jq >/dev/null || \
|
|
110
|
+
(echo "Error: jq not found. Install jq. See https://docs.start9.com/packaging/environment-setup.html" && exit 1)
|
|
107
111
|
|
|
108
112
|
check-init:
|
|
109
113
|
@if [ ! -f ~/.startos/developer.key.pem ]; then \
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BindingSetGuaAccessParams.js","sourceRoot":"","sources":["../../lib/osBindings/BindingSetGuaAccessParams.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Per-GUA exposure chosen by the operator. Unlike every other address (an
|
|
3
|
-
* on/off toggle), an IPv6 global-unicast address is a single globally-routable
|
|
4
|
-
* address that can be reachable LAN-only or also from the WAN, so it carries a
|
|
5
|
-
* tri-state:
|
|
6
|
-
*
|
|
7
|
-
* - `Disabled` — not bound / rejected.
|
|
8
|
-
* - `Lan` (default) — reachable on-link, source-filtered to the gateway's
|
|
9
|
-
* subnet (traffic from outside the subnet is rejected). No WAN exposure.
|
|
10
|
-
* - `LanWan` — also reachable from the WAN; the host attempts an IPv6 PCP
|
|
11
|
-
* pinhole on the gateway.
|
|
12
|
-
*
|
|
13
|
-
* Mirrors the WAN-opt-in posture of single-port public IPv4 (disabled by
|
|
14
|
-
* default), but with an explicit LAN middle state because a GUA — unlike a
|
|
15
|
-
* private LAN IP — is globally routable, so "on" must distinguish LAN-only
|
|
16
|
-
* (firewalled) from WAN-exposed.
|
|
17
|
-
*/
|
|
18
|
-
export type GuaAccess = 'disabled' | 'lan' | 'lan-wan';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GuaAccess.js","sourceRoot":"","sources":["../../lib/osBindings/GuaAccess.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
|