@push.rocks/smartnftables 2.5.1 → 2.6.0
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 +19 -0
- package/dist_rust/smartnftables_linux_amd64_musl +0 -0
- package/dist_rust/smartnftables_linux_amd64_musl.tsrust-build.json +5 -5
- package/dist_rust/smartnftables_linux_arm64_musl +0 -0
- package/dist_rust/smartnftables_linux_arm64_musl.tsrust-build.json +5 -5
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/managed.egress.types.d.ts +44 -0
- package/native-notices/crates/memchr-2.8.3/unlicense +24 -0
- package/native-notices/manifest.json +566 -344
- package/native-notices/readme.md +40 -34
- package/native-notices/runtime/gcc/gpl-3.0.txt +674 -0
- package/native-notices/runtime/gcc/runtime-library-exception-3.1.txt +73 -0
- package/native-notices/{rust-standard-library/dependency-notices.html → rust/copyright-library.html} +185 -991
- package/native-notices/rust/crates/adler2-2.0.1/license-0bsd +12 -0
- package/native-notices/rust/crates/adler2-2.0.1/license-apache +201 -0
- package/native-notices/rust/crates/adler2-2.0.1/license-mit +23 -0
- package/native-notices/rust/crates/memchr-2.7.6/copying +3 -0
- package/native-notices/rust/crates/memchr-2.7.6/license-mit +21 -0
- package/native-notices/rust/crates/memchr-2.7.6/unlicense +24 -0
- package/native-notices/rust/crates/miniz_oxide-0.8.9/license +25 -0
- package/native-notices/{rust-standard-library/llvm-libunwind-license.txt → rust/crates/miniz_oxide-0.8.9/license-apache.md} +11 -145
- package/native-notices/rust/crates/miniz_oxide-0.8.9/license-mit.md +24 -0
- package/native-notices/rust/crates/miniz_oxide-0.8.9/license-zlib.md +14 -0
- package/native-notices/{rust-standard-library → rust/crates/object-0.37.3}/license-apache +25 -0
- package/native-notices/{rust-standard-library → rust/crates/object-0.37.3}/license-mit +1 -1
- package/native-notices/rust/licenses/apache-2.0.txt +73 -0
- package/native-notices/rust/licenses/bsd-2-clause.txt +9 -0
- package/native-notices/rust/licenses/cc-by-sa-4.0.txt +427 -0
- package/native-notices/rust/licenses/gcc-exception-3.1.txt +30 -0
- package/native-notices/rust/licenses/gpl-2.0-only.txt +133 -0
- package/native-notices/rust/licenses/gpl-3.0-or-later.txt +202 -0
- package/native-notices/rust/licenses/isc.txt +7 -0
- package/native-notices/rust/licenses/llvm-exception.txt +15 -0
- package/native-notices/rust/licenses/mit.txt +9 -0
- package/native-notices/rust/licenses/ncsa.txt +29 -0
- package/native-notices/rust/licenses/ofl-1.1.txt +43 -0
- package/native-notices/{rust-standard-library/unicode-license.txt → rust/licenses/unicode-3.0.txt} +1 -1
- package/package.json +4 -5
- package/readme.md +149 -5
- package/rust/src/egress.compile.rs +2 -0
- package/rust/src/egress.host.rs +88 -1
- package/rust/src/egress.hostgrant.rs +13 -13
- package/rust/src/egress.poolguard.rs +45 -0
- package/rust/src/egress.router.rs +3 -1
- package/rust/src/egress.rs +122 -6
- package/rust/src/egress.workloadgrant.rs +88 -0
- package/rust/src/egress_hostgrant_tests.rs +47 -29
- package/rust/src/egress_localplatform_tests.rs +204 -0
- package/rust/src/egress_localport_tests.rs +264 -0
- package/rust/src/egress_workloadgrant_tests.rs +314 -0
- package/rust/src/owner.rs +8 -1
- package/rust/src/owner_hostgrant_traffic_tests.rs +9 -4
- package/rust/src/owner_identity_tests.rs +62 -0
- package/rust/src/owner_localplatform_tests.rs +274 -0
- package/rust/src/owner_localport_tests.rs +241 -0
- package/rust/src/owner_tests.rs +9 -0
- package/rust/src/owner_workloadgrant_tests.rs +278 -0
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/managed.egress.types.ts +46 -0
- package/native-notices/rust-standard-library/cargo.lock +0 -522
- package/scripts/check-native-notices.mjs +0 -27
- /package/native-notices/{rust-standard-library/musl-1.2.5-copyright.txt → runtime/musl-1.2.5/copyright} +0 -0
- /package/native-notices/{rust-standard-library → rust}/compiler-builtins-license.txt +0 -0
- /package/native-notices/{rust-standard-library/addr2line-0.25.1-license-apache → rust/crates/addr2line-0.25.1/license-apache} +0 -0
- /package/native-notices/{rust-standard-library/addr2line-0.25.1-license-mit → rust/crates/addr2line-0.25.1/license-mit} +0 -0
package/changelog.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-09-25 - 2.6.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Add optional loopback TCP port owners to the schema-v2 `allocationPoolGuard` scope: `localTcpPortOwners` entries `{ address, port, uid }` (an exact IPv4 loopback host address, one port and one owning uid, at most 8) compile, ahead of the guard, an OUTPUT rule that rejects with a TCP reset every packet to that address and port from a socket whose uid differs (`meta skuid != uid`, after ordinary output destination NAT) and an INPUT rule that drops the address and port arriving on any interface but loopback. Owner verification now admits the TCP-reset `reject` expression and reads it back like every other operand, so the entries are verified on apply, retained, adopted, recovered and released with the table. Absent and empty keep the previous canonical policy, digest and compiled bytes. The native qualification guest loads the `nf_reject_ipv4`, `nf_reject_ipv6`, `nft_reject` and `nft_reject_inet` modules.
|
|
8
|
+
- Add optional host-local platform endpoints to the schema-v2 `hostTransit` scope: `localPlatformEndpoints` lists ids of `protection.platformEndpoints` the host serves on an exact address of its uplink or a handoff link (verified through rtnetlink at apply, recovery and inspection). INPUT admits leased flows from their exact handoff with the lease's transit source address and a source port in its range for the endpoint's protocol, to the exact endpoint tuple in the live and originally tracked tuple (NEW with a SYN-only TCP opening, or ESTABLISHED), and OUTPUT admits only the ESTABLISHED reply; translated flows and host-origin openings stay denied. The refusal of a platform endpoint on a host address is lifted only for declared ids. Absent and empty keep the previous canonical policy, digest and compiled bytes.
|
|
9
|
+
- Add optional stateful one-way workload grants to the schema-v2 `routerEgress` scope: `workloadGrants` entries `{ protocol, sourceAddress, destinationAddress, destinationPort }` let one veth workload endpoint open one exact port of another. Four constant FORWARD admissions look up the incoming and outgoing link with their addresses in a CONSTANT `workload_link` set and the protocols with the live and originally tracked tuple in a CONSTANT `workload_grant` set, in the default conntrack zone; the destination only answers (ESTABLISHED replies) and can never open toward the source. Up to 1024 grants, sharing the scope's set element budget with host grants. Absent and empty keep the previous canonical policy, digest and compiled bytes.
|
|
10
|
+
|
|
11
|
+
### Maintenance
|
|
12
|
+
|
|
13
|
+
- Bring the release-time tooling current: `@git.zone/tsrust` 1.14.0 → 1.15.0. `@types/node` stays 26.6.1 and pnpm 12.4.2, because their newer releases are younger than the seven-day rule; `@git.zone/cli` 7.2.2, tsbuild 5.0.0, tsrun 3.0.0 and tstest 6.2.0 are already current. The native notices verify unchanged.
|
|
14
|
+
|
|
15
|
+
## 2026-09-24 - 2.5.2
|
|
16
|
+
|
|
17
|
+
### Maintenance
|
|
18
|
+
|
|
19
|
+
- Generate `native-notices/` with `tsrust notices` (configured under `@git.zone/tsrust` `notices` in `.smartconfig.json`) and let the tsrust build verify it before compiling, replacing the hand-maintained `scripts/check-native-notices.mjs`, which is removed from the build script and the published files. The regenerated bundle keeps the 21 crate notice directories byte-for-byte, adds memchr 2.8.3's `unlicense` (the crate is `Unlicense OR MIT`), and moves the standard-library and C runtime texts from `rust-standard-library/` into `rust/` and `runtime/`, adding the GCC runtime library exception texts and the license files of the standard-library dependencies the toolchain inventory omits.
|
|
20
|
+
- Pin the Rust toolchain the notices record, 1.95.0 with the `x86_64-unknown-linux-musl` and `aarch64-unknown-linux-musl` targets and the `rust-src` component, in `rust-toolchain.toml`.
|
|
21
|
+
|
|
3
22
|
## 2026-09-24 - 2.5.1
|
|
4
23
|
|
|
5
24
|
### Maintenance
|
|
Binary file
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "tsrust.build-provenance.v2",
|
|
3
|
-
"binarySha256": "
|
|
3
|
+
"binarySha256": "8b0883d60ba14c1971ce50bd7ec45ea4cbb8a79c292e9063166fed168779dd52",
|
|
4
4
|
"buildInfo": {
|
|
5
5
|
"projectName": "@push.rocks/smartnftables",
|
|
6
|
-
"projectVersion": "2.
|
|
7
|
-
"gitCommit": "
|
|
6
|
+
"projectVersion": "2.6.0",
|
|
7
|
+
"gitCommit": "8032aac9d7b1b78650f0947574e5aab783b2d5db",
|
|
8
8
|
"gitDirty": false,
|
|
9
|
-
"builtAt": "2026-09-
|
|
10
|
-
"tsrustVersion": "1.
|
|
9
|
+
"builtAt": "2026-09-25T13:42:00.180Z",
|
|
10
|
+
"tsrustVersion": "1.15.0",
|
|
11
11
|
"binary": "smartnftables",
|
|
12
12
|
"target": "linux_amd64_musl"
|
|
13
13
|
}
|
|
Binary file
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "tsrust.build-provenance.v2",
|
|
3
|
-
"binarySha256": "
|
|
3
|
+
"binarySha256": "86d2a679f4f1968b9ae9e0a3681572f5c4a6dc913993747abf5422f3adf4916b",
|
|
4
4
|
"buildInfo": {
|
|
5
5
|
"projectName": "@push.rocks/smartnftables",
|
|
6
|
-
"projectVersion": "2.
|
|
7
|
-
"gitCommit": "
|
|
6
|
+
"projectVersion": "2.6.0",
|
|
7
|
+
"gitCommit": "8032aac9d7b1b78650f0947574e5aab783b2d5db",
|
|
8
8
|
"gitDirty": false,
|
|
9
|
-
"builtAt": "2026-09-
|
|
10
|
-
"tsrustVersion": "1.
|
|
9
|
+
"builtAt": "2026-09-25T13:42:10.633Z",
|
|
10
|
+
"tsrustVersion": "1.15.0",
|
|
11
11
|
"binary": "smartnftables",
|
|
12
12
|
"target": "linux_arm64_musl"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@push.rocks/smartnftables',
|
|
6
|
-
version: '2.
|
|
6
|
+
version: '2.6.0',
|
|
7
7
|
description: 'A TypeScript module for managing nftables rules including NAT, firewall, and rate limiting with a high-level API.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSwyQkFBMkI7SUFDakMsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLG1IQUFtSDtDQUNqSSxDQUFBIn0=
|
|
@@ -91,6 +91,21 @@ export interface IManagedNftHostGrant {
|
|
|
91
91
|
/** The workload's exact listening port, 1–65535; never a range. */
|
|
92
92
|
destinationPort: number;
|
|
93
93
|
}
|
|
94
|
+
/** One stateful one-way flow between two workloads behind the same router: the source workload opens
|
|
95
|
+
* connections to one exact port of the destination workload, which may only answer. Both addresses are
|
|
96
|
+
* exact current addresses of two different veth workload endpoints of the scope. It admits the tuple
|
|
97
|
+
* (a TCP opening only with SYN) and its ESTABLISHED replies in the default conntrack zone and nothing
|
|
98
|
+
* else: no reverse opening, no translation and no source-port selection. Grant the reverse direction as
|
|
99
|
+
* a second grant. */
|
|
100
|
+
export interface IManagedNftWorkloadGrant {
|
|
101
|
+
protocol: 'tcp' | 'udp';
|
|
102
|
+
/** Exact unicast address of the dialling workload endpoint, never a prefix. */
|
|
103
|
+
sourceAddress: string;
|
|
104
|
+
/** Exact unicast address of the dialled workload endpoint, never a prefix. */
|
|
105
|
+
destinationAddress: string;
|
|
106
|
+
/** The destination workload's exact listening port, 1–65535; never a range. */
|
|
107
|
+
destinationPort: number;
|
|
108
|
+
}
|
|
94
109
|
/** One combined private/TUN/local/egress table; never compose a second ACCEPT over v1 terminal drops. */
|
|
95
110
|
export interface IManagedNftRouterEgressScopeV2 {
|
|
96
111
|
kind: 'routerEgress';
|
|
@@ -114,6 +129,10 @@ export interface IManagedNftRouterEgressScopeV2 {
|
|
|
114
129
|
* workload. Absent and empty are the same canonical policy, digest and compiled graph; at most 1024,
|
|
115
130
|
* held in a named set behind a constant number of rules. */
|
|
116
131
|
hostGrants?: IManagedNftHostGrant[];
|
|
132
|
+
/** Optional stateful one-way workload-to-workload grants. Absent and empty are the same canonical
|
|
133
|
+
* policy, digest and compiled graph; at most 1024, held in two named sets behind four rules. They
|
|
134
|
+
* share the scope's set element budget with `hostGrants`. */
|
|
135
|
+
workloadGrants?: IManagedNftWorkloadGrant[];
|
|
117
136
|
}
|
|
118
137
|
/** One inbound uplink publication, compiled inside the same host-transit generation. */
|
|
119
138
|
export interface IManagedNftPublishedPortV2 {
|
|
@@ -147,6 +166,27 @@ export interface IManagedNftHostTransitScopeV2 {
|
|
|
147
166
|
* host-local, a platform endpoint nor a leased transit source address. Absent and empty are the
|
|
148
167
|
* same canonical policy; at most 1024, held in a named set behind a constant number of rules. */
|
|
149
168
|
hostGrants?: IManagedNftHostGrant[];
|
|
169
|
+
/** Optional ids of `protection.platformEndpoints` this host serves itself, on an exact current address
|
|
170
|
+
* of the uplink or of a handoff link (rtnetlink verifies it at apply, recovery and inspection). Only a
|
|
171
|
+
* declared endpoint may hold a host address. Leased flows reach it from their exact handoff with the
|
|
172
|
+
* leased source address and a source port of the allocation's range for the endpoint's protocol; its
|
|
173
|
+
* ESTABLISHED replies return. Absent and empty are the same canonical policy, digest and compiled graph. */
|
|
174
|
+
localPlatformEndpoints?: string[];
|
|
175
|
+
}
|
|
176
|
+
/** One loopback TCP service that only one local user may dial. Every packet the host sends to the
|
|
177
|
+
* exact address and port from a socket of any other user is rejected with a TCP reset, after ordinary
|
|
178
|
+
* output destination NAT; the address and port arriving on any interface but loopback are dropped.
|
|
179
|
+
* The service must bind exactly this address: a wildcard listener stays reachable through others. */
|
|
180
|
+
export interface IManagedNftLocalTcpPortOwner {
|
|
181
|
+
/** Exact IPv4 loopback host address in 127.0.0.0/8, e.g. `127.0.0.1`. Never a prefix or wildcard. */
|
|
182
|
+
address: string;
|
|
183
|
+
/** The service's exact listening port, 1–65535; never a range. */
|
|
184
|
+
port: number;
|
|
185
|
+
/** The only user id whose sockets may send to the port: the socket file's file-system uid as
|
|
186
|
+
* the user namespace owning the network namespace sees it, 0–4294967294. Packets without a socket file carry no uid and
|
|
187
|
+
* are not matched: kernel replies, the teardown of an orphaned socket, and in-kernel sockets such as NFS or CIFS clients,
|
|
188
|
+
* which only privileged mounts create. */
|
|
189
|
+
uid: number;
|
|
150
190
|
}
|
|
151
191
|
/** Host-wide IPv4 destination denial for caller-authenticated private allocation pools.
|
|
152
192
|
* It has no link dependency; exact host grants are its only exceptions. It is not allocation-release or boot-order proof. */
|
|
@@ -159,6 +199,10 @@ export interface IManagedNftAllocationPoolGuardScopeV2 {
|
|
|
159
199
|
* listed pool, and their replies. Absent and empty are the same canonical policy; at most 1024,
|
|
160
200
|
* held in a named set behind a constant number of rules. */
|
|
161
201
|
hostGrants?: IManagedNftHostGrant[];
|
|
202
|
+
/** Optional host-wide loopback port ownership, compiled ahead of the guard in the same table.
|
|
203
|
+
* Absent and empty are the same canonical policy, digest and compiled graph; at most 8, one per
|
|
204
|
+
* exact address and port. */
|
|
205
|
+
localTcpPortOwners?: IManagedNftLocalTcpPortOwner[];
|
|
162
206
|
}
|
|
163
207
|
export interface IManagedNftPolicyV2 {
|
|
164
208
|
schemaVersion: 2;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
+
distribute this software, either in source code form or as a compiled
|
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
+
means.
|
|
7
|
+
|
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
+
of this software dedicate any and all copyright interest in the
|
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
|
11
|
+
of the public at large and to the detriment of our heirs and
|
|
12
|
+
successors. We intend this dedication to be an overt act of
|
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
+
software under copyright law.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For more information, please refer to <http://unlicense.org/>
|