@push.rocks/smartvpn 1.11.0 → 1.13.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.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@push.rocks/smartvpn',
6
- version: '1.11.0',
6
+ version: '1.13.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=
@@ -46,6 +46,8 @@ export interface IVpnClientConfig {
46
46
  wgEndpoint?: string;
47
47
  /** WireGuard: allowed IPs (CIDR strings, e.g. ['0.0.0.0/0']) */
48
48
  wgAllowedIps?: string[];
49
+ /** Client-defined tags reported to the server after connection (informational, not for access control) */
50
+ clientDefinedClientTags?: string[];
49
51
  }
50
52
  export interface IVpnClientOptions {
51
53
  transport: TVpnTransportOptions;
@@ -101,6 +103,11 @@ export interface IVpnServerConfig {
101
103
  /** Server-level IP block list — applied at TCP accept, before Noise handshake.
102
104
  * Supports exact IPs, CIDR, wildcards, ranges. */
103
105
  connectionIpBlockList?: string[];
106
+ /** When true and forwardingMode is 'socket', the userspace NAT engine prepends
107
+ * PROXY protocol v2 headers on outbound TCP connections, conveying the VPN client's
108
+ * tunnel IP as the source address. This allows downstream services (e.g. SmartProxy)
109
+ * to see the real VPN client identity instead of 127.0.0.1. */
110
+ socketForwardProxyProtocol?: boolean;
104
111
  }
105
112
  export interface IVpnServerOptions {
106
113
  transport: TVpnTransportOptions;
@@ -228,7 +235,11 @@ export interface IClientEntry {
228
235
  priority?: number;
229
236
  /** Whether this client is enabled (default: true) */
230
237
  enabled?: boolean;
231
- /** Tags for grouping (e.g. ["engineering", "office"]) */
238
+ /** Tags assigned by the server admin — trusted, used for access control (e.g. ["engineering", "office"]) */
239
+ serverDefinedClientTags?: string[];
240
+ /** Tags reported by the connecting client — informational only, never used for access control */
241
+ clientDefinedClientTags?: string[];
242
+ /** @deprecated Use serverDefinedClientTags instead. Legacy field kept for backward compatibility. */
232
243
  tags?: string[];
233
244
  /** Optional description */
234
245
  description?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@push.rocks/smartvpn",
3
- "version": "1.11.0",
3
+ "version": "1.13.0",
4
4
  "private": false,
5
5
  "description": "A VPN solution with TypeScript control plane and Rust data plane daemon",
6
6
  "type": "module",
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@push.rocks/smartvpn',
6
- version: '1.11.0',
6
+ version: '1.13.0',
7
7
  description: 'A VPN solution with TypeScript control plane and Rust data plane daemon'
8
8
  }
@@ -57,6 +57,8 @@ export interface IVpnClientConfig {
57
57
  wgEndpoint?: string;
58
58
  /** WireGuard: allowed IPs (CIDR strings, e.g. ['0.0.0.0/0']) */
59
59
  wgAllowedIps?: string[];
60
+ /** Client-defined tags reported to the server after connection (informational, not for access control) */
61
+ clientDefinedClientTags?: string[];
60
62
  }
61
63
 
62
64
  export interface IVpnClientOptions {
@@ -118,6 +120,11 @@ export interface IVpnServerConfig {
118
120
  /** Server-level IP block list — applied at TCP accept, before Noise handshake.
119
121
  * Supports exact IPs, CIDR, wildcards, ranges. */
120
122
  connectionIpBlockList?: string[];
123
+ /** When true and forwardingMode is 'socket', the userspace NAT engine prepends
124
+ * PROXY protocol v2 headers on outbound TCP connections, conveying the VPN client's
125
+ * tunnel IP as the source address. This allows downstream services (e.g. SmartProxy)
126
+ * to see the real VPN client identity instead of 127.0.0.1. */
127
+ socketForwardProxyProtocol?: boolean;
121
128
  }
122
129
 
123
130
  export interface IVpnServerOptions {
@@ -285,7 +292,11 @@ export interface IClientEntry {
285
292
  priority?: number;
286
293
  /** Whether this client is enabled (default: true) */
287
294
  enabled?: boolean;
288
- /** Tags for grouping (e.g. ["engineering", "office"]) */
295
+ /** Tags assigned by the server admin — trusted, used for access control (e.g. ["engineering", "office"]) */
296
+ serverDefinedClientTags?: string[];
297
+ /** Tags reported by the connecting client — informational only, never used for access control */
298
+ clientDefinedClientTags?: string[];
299
+ /** @deprecated Use serverDefinedClientTags instead. Legacy field kept for backward compatibility. */
289
300
  tags?: string[];
290
301
  /** Optional description */
291
302
  description?: string;