@ac-kit/net-transport-node 0.3.1 → 0.4.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 +53 -0
- package/README.md +68 -2
- package/dist/connect-tcp.d.ts +33 -0
- package/dist/connect-tcp.d.ts.map +1 -1
- package/dist/connect-tcp.js +64 -0
- package/dist/connect-tcp.js.map +1 -1
- package/package.json +9 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,58 @@
|
|
|
1
1
|
# @ac-kit/net-transport-node
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5152230: `createTcpConnector({ checkAddress })`: every address a connection could reach —
|
|
8
|
+
the literal, or every address the name resolves to, resolved once — is passed
|
|
9
|
+
(canonical, unzoned, as `@ac-kit/net-address`'s `BitAddress`) with the target
|
|
10
|
+
before anything is sent; throwing refuses the connection with that error. Only
|
|
11
|
+
the checked addresses are connected to, so DNS rebinding cannot bypass it; TLS
|
|
12
|
+
still verifies the target's host. The check receives the attempt's `signal` as a
|
|
13
|
+
third argument; aborting gives a pending check (or name lookup) up at once,
|
|
14
|
+
nothing dialled. It guards the connector only: the destination policy,
|
|
15
|
+
translated destinations (NAT64), proxies and pooled connections are the
|
|
16
|
+
deployment's (see the README).
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [5152230]
|
|
21
|
+
- Updated dependencies [2a0fe74]
|
|
22
|
+
- Updated dependencies [2a0fe74]
|
|
23
|
+
- Updated dependencies [5152230]
|
|
24
|
+
- Updated dependencies [2a0fe74]
|
|
25
|
+
- Updated dependencies [5152230]
|
|
26
|
+
- Updated dependencies [5152230]
|
|
27
|
+
- Updated dependencies [2a0fe74]
|
|
28
|
+
- Updated dependencies [2a0fe74]
|
|
29
|
+
- Updated dependencies [5152230]
|
|
30
|
+
- Updated dependencies [5152230]
|
|
31
|
+
- Updated dependencies [5152230]
|
|
32
|
+
- Updated dependencies [5152230]
|
|
33
|
+
- Updated dependencies [5152230]
|
|
34
|
+
- Updated dependencies [5152230]
|
|
35
|
+
- Updated dependencies [5152230]
|
|
36
|
+
- Updated dependencies [5152230]
|
|
37
|
+
- Updated dependencies [5152230]
|
|
38
|
+
- Updated dependencies [5152230]
|
|
39
|
+
- @ac-kit/async@0.6.0
|
|
40
|
+
- @ac-kit/core@0.10.0
|
|
41
|
+
- @ac-kit/net-address@0.5.0
|
|
42
|
+
- @ac-kit/node@0.9.0
|
|
43
|
+
- @ac-kit/net-core@0.4.3
|
|
44
|
+
|
|
45
|
+
## 0.3.2
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- Updated dependencies [20341eb]
|
|
50
|
+
- Updated dependencies [20341eb]
|
|
51
|
+
- @ac-kit/async@0.5.0
|
|
52
|
+
- @ac-kit/core@0.9.0
|
|
53
|
+
- @ac-kit/net-core@0.4.2
|
|
54
|
+
- @ac-kit/node@0.8.1
|
|
55
|
+
|
|
3
56
|
## 0.3.1
|
|
4
57
|
|
|
5
58
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -82,8 +82,8 @@ const { alpnProtocol } = await connect({
|
|
|
82
82
|
|
|
83
83
|
`connectTcp` is `createTcpConnector()` with no options: it opens a `secure`
|
|
84
84
|
target with Node's default trust store, verifying the certificate against the
|
|
85
|
-
target host. `createTcpConnector` adds trust (`ca`), client certificates
|
|
86
|
-
`noDelay`.
|
|
85
|
+
target host. `createTcpConnector` adds trust (`ca`), client certificates,
|
|
86
|
+
`noDelay` and `checkAddress`.
|
|
87
87
|
|
|
88
88
|
`noDelay` defaults to `false`, as in `node:net`: small writes are coalesced
|
|
89
89
|
(Nagle's algorithm). It is only the starting point: a protocol that needs
|
|
@@ -91,6 +91,72 @@ writes sent at once asks for it through the transport's `setWriteCoalescing`,
|
|
|
91
91
|
as `@ac-kit/net-http` does on every connection, and `DuplexTransport` maps it
|
|
92
92
|
to Nagle on a TCP or TLS socket.
|
|
93
93
|
|
|
94
|
+
### Refusing addresses
|
|
95
|
+
|
|
96
|
+
`checkAddress(address, target, signal)` sees every address a connection could
|
|
97
|
+
reach before any is tried: the target's own for an IP literal, otherwise every
|
|
98
|
+
address its name resolves to. Throw to refuse; the connection then fails with
|
|
99
|
+
that error, unchanged. The name is resolved once and the socket connects to
|
|
100
|
+
the checked addresses only, so a DNS answer that changes between the check and
|
|
101
|
+
the connection (DNS rebinding) cannot reach an address that was not checked.
|
|
102
|
+
TLS still sends SNI for, and verifies the certificate against, the target's
|
|
103
|
+
host. Aborting the attempt gives a pending check up at once; its late answer
|
|
104
|
+
is dropped and nothing is dialled.
|
|
105
|
+
|
|
106
|
+
The destination policy below is an example only:
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
import {
|
|
110
|
+
type BitAddress,
|
|
111
|
+
bitPrefixContains,
|
|
112
|
+
isIpv4SpecialPurpose,
|
|
113
|
+
isIpv6SpecialPurpose,
|
|
114
|
+
parseIpv4Prefix,
|
|
115
|
+
parseIpv6Prefix,
|
|
116
|
+
} from "@ac-kit/net-address";
|
|
117
|
+
|
|
118
|
+
export class ForbiddenDestinationError extends Error {}
|
|
119
|
+
|
|
120
|
+
// Owned by the deployment, not by this package: what a fetched URL must never
|
|
121
|
+
// reach from this network. The special-purpose registries are a floor only.
|
|
122
|
+
const DENIED = [
|
|
123
|
+
parseIpv4Prefix("10.20.0.0/16"), // this deployment's own services
|
|
124
|
+
parseIpv6Prefix("64:ff9b::/96"), // NAT64: translated to IPv4 by the network
|
|
125
|
+
parseIpv6Prefix("64:ff9b:1::/48"), // local-use NAT64
|
|
126
|
+
];
|
|
127
|
+
|
|
128
|
+
export function checkDestination(address: BitAddress): void {
|
|
129
|
+
const special =
|
|
130
|
+
address.bitWidth === 32 ? isIpv4SpecialPurpose(address) : isIpv6SpecialPurpose(address);
|
|
131
|
+
// A prefix only contains addresses of its own family.
|
|
132
|
+
const denied = DENIED.some(
|
|
133
|
+
(prefix) =>
|
|
134
|
+
prefix.address.bitWidth === address.bitWidth && bitPrefixContains(prefix, address),
|
|
135
|
+
);
|
|
136
|
+
if (special || denied) {
|
|
137
|
+
throw new ForbiddenDestinationError("Destination refused by policy");
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
```ts
|
|
143
|
+
import { createTcpConnector } from "@ac-kit/net-transport-node";
|
|
144
|
+
|
|
145
|
+
const connect = createTcpConnector({ checkAddress: checkDestination });
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The address comes as `tryParseResolvedIpAddress` from `@ac-kit/net-address`
|
|
149
|
+
reads it: canonical — an IPv4-mapped IPv6 address as its IPv4 address — and
|
|
150
|
+
without a zone. The policy is the deployment's: an address classifying as `"global"` is not
|
|
151
|
+
thereby safe, since the classifiers disclaim routability and know nothing of
|
|
152
|
+
the network. It must cover destinations the network translates (NAT64
|
|
153
|
+
prefixes, a load balancer's virtual addresses), traffic sent through a proxy
|
|
154
|
+
— which resolves names itself, so a connector check sees only the proxy —
|
|
155
|
+
both the TCP and the QUIC connector, and connections a client already pooled:
|
|
156
|
+
keep a pool (an `HttpAgent`) per stable policy, and close it when the policy
|
|
157
|
+
changes. What a connector guarantees is narrower: it connects only to the
|
|
158
|
+
addresses it checked.
|
|
159
|
+
|
|
94
160
|
Writes are corked around the whole buffer list, so a multi-fragment frame
|
|
95
161
|
reaches the socket as one vectored write rather than one syscall per fragment.
|
|
96
162
|
|
package/dist/connect-tcp.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { MaybeAsyncCallable } from "@ac-kit/core";
|
|
2
|
+
import { type BitAddress } from "@ac-kit/net-address";
|
|
1
3
|
import type { ConnectTarget, Connector, TransportConnection } from "@ac-kit/net-core";
|
|
2
4
|
import { type TlsSocketConnectOptions } from "@ac-kit/node";
|
|
3
5
|
/**
|
|
@@ -15,6 +17,37 @@ export type TcpConnectorOptions = {
|
|
|
15
17
|
readonly tls?: TcpConnectTlsOptions;
|
|
16
18
|
/** Disable Nagle's algorithm. Defaults to `false`. */
|
|
17
19
|
readonly noDelay?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Checked against every address a connection could reach before any of them
|
|
22
|
+
* is tried: the target's own when it is an IP literal, otherwise every
|
|
23
|
+
* address its name resolves to, resolved once. Throw, or reject, to refuse:
|
|
24
|
+
* the connection fails with that error, unchanged, and nothing is sent
|
|
25
|
+
* anywhere. The connection then reaches only the addresses checked — the name
|
|
26
|
+
* is not resolved again — so DNS rebinding cannot slip another address in
|
|
27
|
+
* between the check and the connection. TLS still verifies the certificate
|
|
28
|
+
* against, and sends SNI for, `target.host`.
|
|
29
|
+
*
|
|
30
|
+
* The address comes canonical (`canonicalIpAddress` from
|
|
31
|
+
* `@ac-kit/net-address`: an IPv4-mapped IPv6 address as its IPv4 address) and
|
|
32
|
+
* without a zone, ready for `classifyIpv4Address` and `classifyIpv6Address`.
|
|
33
|
+
* This is where a client refusing private and loopback addresses (server-side
|
|
34
|
+
* request forgery) checks them: a check of the URL's host alone is bypassed
|
|
35
|
+
* by a name resolving to them.
|
|
36
|
+
*
|
|
37
|
+
* Receives the connection attempt's `signal`: aborting it gives the check up
|
|
38
|
+
* at once, its late answer dropped and nothing dialled.
|
|
39
|
+
*
|
|
40
|
+
* It guards this connector only: a proxy resolving names itself, a translated
|
|
41
|
+
* destination (NAT64, a load balancer) and connections already pooled by a
|
|
42
|
+
* client are the deployment's policy to cover.
|
|
43
|
+
*
|
|
44
|
+
* Absent, names are resolved by the socket as it connects, with no check.
|
|
45
|
+
*/
|
|
46
|
+
readonly checkAddress?: MaybeAsyncCallable<[
|
|
47
|
+
address: BitAddress,
|
|
48
|
+
target: ConnectTarget,
|
|
49
|
+
signal: AbortSignal | undefined
|
|
50
|
+
]>;
|
|
18
51
|
};
|
|
19
52
|
/**
|
|
20
53
|
* A `Connector` over TCP: cleartext for a target with `secure` unset, TLS with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect-tcp.d.ts","sourceRoot":"","sources":["../src/connect-tcp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"connect-tcp.d.ts","sourceRoot":"","sources":["../src/connect-tcp.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACN,KAAK,UAAU,EAEf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACX,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAGN,KAAK,uBAAuB,EAC5B,MAAM,cAAc,CAAC;AAItB;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CACtC,uBAAuB,EACvB,MAAM,GAAG,YAAY,GAAG,eAAe,GAAG,eAAe,GAAG,QAAQ,CACpE,CAAC;AAEF,8CAA8C;AAC9C,MAAM,MAAM,mBAAmB,GAAG;IACjC;;;;OAIG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,oBAAoB,CAAC;IAEpC,sDAAsD;IACtD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,kBAAkB,CACzC;QACC,OAAO,EAAE,UAAU;QACnB,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,WAAW,GAAG,SAAS;KAC/B,CACD,CAAC;CACF,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAE3E;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACzB,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,mBAAmB,CAAC,CAE9B"}
|
package/dist/connect-tcp.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { lookup } from "node:dns/promises";
|
|
1
2
|
import { isIP } from "node:net";
|
|
3
|
+
import { withTimeout } from "@ac-kit/async";
|
|
4
|
+
import { tryParseResolvedIpAddress, } from "@ac-kit/net-address";
|
|
2
5
|
import { TcpSocket, TlsSocket, } from "@ac-kit/node";
|
|
3
6
|
import { composeTcpConnection_ } from "./_compose-tcp-connection.js";
|
|
4
7
|
/**
|
|
@@ -35,6 +38,9 @@ export function connectTcp(target, signal) {
|
|
|
35
38
|
}
|
|
36
39
|
async function connect_(target, options, signal) {
|
|
37
40
|
signal?.throwIfAborted();
|
|
41
|
+
const pinned = options.checkAddress === undefined
|
|
42
|
+
? undefined
|
|
43
|
+
: await resolveChecked_(target, options.checkAddress, signal);
|
|
38
44
|
let socket;
|
|
39
45
|
if (target.secure) {
|
|
40
46
|
// Let `tls.connect` open the TCP connection itself: wrapping a socket still
|
|
@@ -48,6 +54,7 @@ async function connect_(target, options, signal) {
|
|
|
48
54
|
ALPNProtocols: [...target.alpnProtocols],
|
|
49
55
|
}),
|
|
50
56
|
allowHalfOpen: true,
|
|
57
|
+
...(pinned && { lookup: pinned }),
|
|
51
58
|
...(signal && { signal }),
|
|
52
59
|
};
|
|
53
60
|
socket = await TlsSocket.connect(target.port, secureOptions);
|
|
@@ -56,10 +63,67 @@ async function connect_(target, options, signal) {
|
|
|
56
63
|
socket = TcpSocket.from({ allowHalfOpen: true });
|
|
57
64
|
await socket.connect(target.port, {
|
|
58
65
|
host: target.host,
|
|
66
|
+
...(pinned && { lookup: pinned }),
|
|
59
67
|
...(signal && { signal }),
|
|
60
68
|
});
|
|
61
69
|
}
|
|
62
70
|
socket.setNoDelay(options.noDelay ?? false);
|
|
63
71
|
return composeTcpConnection_(socket);
|
|
64
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Resolves `target.host` once, checks every address, and answers a `lookup` for
|
|
75
|
+
* the socket that hands back those addresses only; `undefined` for an IP
|
|
76
|
+
* literal, which the socket never resolves.
|
|
77
|
+
*/
|
|
78
|
+
async function resolveChecked_(target, checkAddress, signal) {
|
|
79
|
+
const literalFamily = isIP(target.host);
|
|
80
|
+
const peers = literalFamily === 0
|
|
81
|
+
? await abortable_(() => lookup(target.host, { all: true }), signal)
|
|
82
|
+
: [{ address: target.host, family: literalFamily }];
|
|
83
|
+
signal?.throwIfAborted();
|
|
84
|
+
for (const peer of peers) {
|
|
85
|
+
await abortable_((checkSignal) => checkAddress(checkedAddress_(peer.address), target, checkSignal), signal);
|
|
86
|
+
}
|
|
87
|
+
if (literalFamily !== 0) {
|
|
88
|
+
return undefined;
|
|
89
|
+
}
|
|
90
|
+
return (_hostname, lookupOptions, callback) => {
|
|
91
|
+
const family = lookupOptions.family;
|
|
92
|
+
const wanted = family === 4 || family === "IPv4"
|
|
93
|
+
? 4
|
|
94
|
+
: family === 6 || family === "IPv6"
|
|
95
|
+
? 6
|
|
96
|
+
: 0;
|
|
97
|
+
const matching = wanted === 0 ? peers : peers.filter((peer) => peer.family === wanted);
|
|
98
|
+
if (lookupOptions.all === true) {
|
|
99
|
+
callback(null, matching);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const first = matching[0];
|
|
103
|
+
if (first === undefined) {
|
|
104
|
+
const error = new Error(`No IPv${wanted} address checked for ${target.host}`);
|
|
105
|
+
error.code = "ENOTFOUND";
|
|
106
|
+
callback(error, "", 0);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
callback(null, first.address, first.family);
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* `work`, given up with `signal`'s reason as soon as it aborts: a pending
|
|
114
|
+
* lookup or check is left behind, its late result dropped.
|
|
115
|
+
*/
|
|
116
|
+
function abortable_(work, signal) {
|
|
117
|
+
return signal === undefined
|
|
118
|
+
? Promise.resolve().then(() => work(undefined))
|
|
119
|
+
: withTimeout((combined) => work(combined), Number.POSITIVE_INFINITY, signal);
|
|
120
|
+
}
|
|
121
|
+
/** A resolved address as `checkAddress` receives it: parsed, unzoned, canonical. */
|
|
122
|
+
function checkedAddress_(text) {
|
|
123
|
+
const address = tryParseResolvedIpAddress(text);
|
|
124
|
+
if (address === null) {
|
|
125
|
+
throw new TypeError(`Resolved address ${text} is not an IP address`);
|
|
126
|
+
}
|
|
127
|
+
return address;
|
|
128
|
+
}
|
|
65
129
|
//# sourceMappingURL=connect-tcp.js.map
|
package/dist/connect-tcp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect-tcp.js","sourceRoot":"","sources":["../src/connect-tcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"connect-tcp.js","sourceRoot":"","sources":["../src/connect-tcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAuB,MAAM,UAAU,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAEN,yBAAyB,GACzB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,EACN,SAAS,EACT,SAAS,GAET,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AA0DrE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAA6B;IAC/D,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,CAAC,CAAC;AACpE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CACzB,MAAqB,EACrB,MAAoB;IAEpB,OAAO,QAAQ,CAAC,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,KAAK,UAAU,QAAQ,CACtB,MAAqB,EACrB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ACtB,MAAM,IAAI,SAAS,CAAC,oBAAoB,IAAI,uBAAuB,CAAC,CAAC;IACtE,CAAC;IAED,OAAO,OAAO,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ac-kit/net-transport-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Node.js Transport adapters for @ac-kit/net-core: TCP, TLS, IPC and UDP.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nodejs",
|
|
@@ -45,16 +45,17 @@
|
|
|
45
45
|
"prepack": "yarn build"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@ac-kit/async": "^0.
|
|
49
|
-
"@ac-kit/core": "^0.
|
|
50
|
-
"@ac-kit/net-
|
|
51
|
-
"@ac-kit/
|
|
48
|
+
"@ac-kit/async": "^0.6.0",
|
|
49
|
+
"@ac-kit/core": "^0.10.0",
|
|
50
|
+
"@ac-kit/net-address": "^0.5.0",
|
|
51
|
+
"@ac-kit/net-core": "^0.4.3",
|
|
52
|
+
"@ac-kit/node": "^0.9.0",
|
|
52
53
|
"@types/node": "^26.5.1"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"@ac-kit/format-core": "0.
|
|
56
|
-
"@ac-kit/format-netstring": "0.1.
|
|
57
|
-
"@ac-kit/integration-test-util": "0.4.
|
|
56
|
+
"@ac-kit/format-core": "0.4.0",
|
|
57
|
+
"@ac-kit/format-netstring": "0.1.9",
|
|
58
|
+
"@ac-kit/integration-test-util": "0.4.5",
|
|
58
59
|
"@ac-kit/tsconfig": "0.1.0",
|
|
59
60
|
"@ac-kit/typedoc-config": "0.1.0",
|
|
60
61
|
"@ac-kit/vitest-config": "0.1.1",
|