@push.rocks/smartvpn 1.19.4 → 1.21.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/dist_rust/smartvpn_daemon_linux_amd64 +0 -0
- package/dist_rust/smartvpn_daemon_linux_arm64 +0 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/smartvpn.interfaces.d.ts +8 -3
- package/package.json +5 -4
- package/readme.hints.md +8 -0
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/smartvpn.interfaces.ts +8 -3
|
Binary file
|
|
Binary file
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@push.rocks/smartvpn',
|
|
6
|
-
version: '1.
|
|
6
|
+
version: '1.21.0',
|
|
7
7
|
description: 'A VPN solution with TypeScript control plane and Rust data plane daemon'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxzQkFBc0I7SUFDNUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHlFQUF5RTtDQUN2RixDQUFBIn0=
|
|
@@ -105,10 +105,15 @@ export interface IVpnServerConfig {
|
|
|
105
105
|
* Supports exact IPs, CIDR, wildcards, ranges. */
|
|
106
106
|
connectionIpBlockList?: string[];
|
|
107
107
|
/** When true and forwardingMode is 'socket', the userspace NAT engine prepends
|
|
108
|
-
* PROXY protocol v2 headers on outbound TCP connections
|
|
109
|
-
* tunnel IP as the source address. This allows downstream services (e.g. SmartProxy)
|
|
110
|
-
* to see the real VPN client identity instead of 127.0.0.1. */
|
|
108
|
+
* PROXY protocol v2 headers on outbound TCP connections. */
|
|
111
109
|
socketForwardProxyProtocol?: boolean;
|
|
110
|
+
/** Source address to place into outbound PROXY v2 headers.
|
|
111
|
+
* 'tunnelIp' preserves legacy behavior. 'remoteIp' exposes the VPN client's
|
|
112
|
+
* real connecting IP when known, with tunnel IP fallback. */
|
|
113
|
+
socketForwardProxyProtocolSource?: 'tunnelIp' | 'remoteIp';
|
|
114
|
+
/** When true, outbound PROXY v2 headers include authenticated SmartVPN metadata
|
|
115
|
+
* in a vendor TLV: clientId, assignedIp, transportType, and remoteAddr. */
|
|
116
|
+
socketForwardProxyProtocolVpnMetadata?: boolean;
|
|
112
117
|
/** Destination routing policy for VPN client traffic (socket mode).
|
|
113
118
|
* Controls where decrypted traffic goes: allow through, block, or redirect to a target.
|
|
114
119
|
* Default: all traffic passes through (backward compatible). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@push.rocks/smartvpn",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A VPN solution with TypeScript control plane and Rust data plane daemon",
|
|
6
6
|
"type": "module",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"@push.rocks/smartrust": "^1.4.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@git.zone/tsbuild": "^4.4.
|
|
31
|
+
"@git.zone/tsbuild": "^4.4.2",
|
|
32
32
|
"@git.zone/tsrun": "^2.0.4",
|
|
33
|
-
"@git.zone/tsrust": "^1.
|
|
33
|
+
"@git.zone/tsrust": "^1.4.1",
|
|
34
34
|
"@git.zone/tstest": "^3.6.6",
|
|
35
|
-
"@types/node": "^25.
|
|
35
|
+
"@types/node": "^25.9.1"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"ts/**/*",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"build": "(tsbuild tsfolders) && (tsrust)",
|
|
50
50
|
"test:before": "(tsrust)",
|
|
51
51
|
"test": "tstest test/ --verbose --logfile --timeout 90",
|
|
52
|
+
"test:rust": "cd rust && cargo test",
|
|
52
53
|
"buildDocs": "tsdoc"
|
|
53
54
|
}
|
|
54
55
|
}
|
package/readme.hints.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# smartvpn hints
|
|
2
|
+
|
|
3
|
+
## Static Rust Binaries
|
|
4
|
+
|
|
5
|
+
- The Rust binaries in `dist_rust/` are statically linked (static-pie) via `"static": true` in the `@git.zone/tsrust` block of `.smartconfig.json` (tsrust >= 1.4.1). They run on both glibc (Debian/Ubuntu) and musl (Alpine) systems.
|
|
6
|
+
- tsrust injects `RUSTFLAGS="-C target-feature=+crt-static"` only into its own per-target cargo invocations and verifies the result (no `PT_INTERP` ELF header). Keep `rust/.cargo/config.toml` free of `rustflags` entries: the injected env variable would replace them, and a repo-wide `rustflags` would also break plain `cargo test`/`cargo check` (proc-macros cannot build with `+crt-static` on linux-gnu without an explicit `--target`).
|
|
7
|
+
- `pnpm run test:rust` runs the Rust unit tests; plain `cargo test` in `rust/` works as well.
|
|
8
|
+
- Verify linkage manually with `ldd dist_rust/<binary>_linux_amd64` → "statically linked".
|
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -122,10 +122,15 @@ export interface IVpnServerConfig {
|
|
|
122
122
|
* Supports exact IPs, CIDR, wildcards, ranges. */
|
|
123
123
|
connectionIpBlockList?: string[];
|
|
124
124
|
/** When true and forwardingMode is 'socket', the userspace NAT engine prepends
|
|
125
|
-
* PROXY protocol v2 headers on outbound TCP connections
|
|
126
|
-
* tunnel IP as the source address. This allows downstream services (e.g. SmartProxy)
|
|
127
|
-
* to see the real VPN client identity instead of 127.0.0.1. */
|
|
125
|
+
* PROXY protocol v2 headers on outbound TCP connections. */
|
|
128
126
|
socketForwardProxyProtocol?: boolean;
|
|
127
|
+
/** Source address to place into outbound PROXY v2 headers.
|
|
128
|
+
* 'tunnelIp' preserves legacy behavior. 'remoteIp' exposes the VPN client's
|
|
129
|
+
* real connecting IP when known, with tunnel IP fallback. */
|
|
130
|
+
socketForwardProxyProtocolSource?: 'tunnelIp' | 'remoteIp';
|
|
131
|
+
/** When true, outbound PROXY v2 headers include authenticated SmartVPN metadata
|
|
132
|
+
* in a vendor TLV: clientId, assignedIp, transportType, and remoteAddr. */
|
|
133
|
+
socketForwardProxyProtocolVpnMetadata?: boolean;
|
|
129
134
|
/** Destination routing policy for VPN client traffic (socket mode).
|
|
130
135
|
* Controls where decrypted traffic goes: allow through, block, or redirect to a target.
|
|
131
136
|
* Default: all traffic passes through (backward compatible). */
|