@push.rocks/smartvpn 1.13.0 → 1.14.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.13.0',
6
+ version: '1.14.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=
@@ -108,6 +108,26 @@ export interface IVpnServerConfig {
108
108
  * tunnel IP as the source address. This allows downstream services (e.g. SmartProxy)
109
109
  * to see the real VPN client identity instead of 127.0.0.1. */
110
110
  socketForwardProxyProtocol?: boolean;
111
+ /** Destination routing policy for VPN client traffic (socket mode).
112
+ * Controls where decrypted traffic goes: allow through, block, or redirect to a target.
113
+ * Default: all traffic passes through (backward compatible). */
114
+ destinationPolicy?: IDestinationPolicy;
115
+ }
116
+ /**
117
+ * Destination routing policy for VPN client traffic.
118
+ * Evaluated per-packet in the NAT engine before per-client ACLs.
119
+ */
120
+ export interface IDestinationPolicy {
121
+ /** Default action for traffic not matching allow/block lists */
122
+ default: 'forceTarget' | 'block' | 'allow';
123
+ /** Target IP address for 'forceTarget' mode (e.g. '127.0.0.1'). Required when default is 'forceTarget'. */
124
+ target?: string;
125
+ /** Destinations that pass through directly — not rewritten, not blocked.
126
+ * Supports: exact IP, CIDR, wildcards (192.168.190.*), ranges. */
127
+ allowList?: string[];
128
+ /** Destinations that are always blocked. Overrides allowList (deny wins).
129
+ * Supports: exact IP, CIDR, wildcards, ranges. */
130
+ blockList?: string[];
111
131
  }
112
132
  export interface IVpnServerOptions {
113
133
  transport: TVpnTransportOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@push.rocks/smartvpn",
3
- "version": "1.13.0",
3
+ "version": "1.14.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.13.0',
6
+ version: '1.14.0',
7
7
  description: 'A VPN solution with TypeScript control plane and Rust data plane daemon'
8
8
  }
@@ -125,6 +125,27 @@ export interface IVpnServerConfig {
125
125
  * tunnel IP as the source address. This allows downstream services (e.g. SmartProxy)
126
126
  * to see the real VPN client identity instead of 127.0.0.1. */
127
127
  socketForwardProxyProtocol?: boolean;
128
+ /** Destination routing policy for VPN client traffic (socket mode).
129
+ * Controls where decrypted traffic goes: allow through, block, or redirect to a target.
130
+ * Default: all traffic passes through (backward compatible). */
131
+ destinationPolicy?: IDestinationPolicy;
132
+ }
133
+
134
+ /**
135
+ * Destination routing policy for VPN client traffic.
136
+ * Evaluated per-packet in the NAT engine before per-client ACLs.
137
+ */
138
+ export interface IDestinationPolicy {
139
+ /** Default action for traffic not matching allow/block lists */
140
+ default: 'forceTarget' | 'block' | 'allow';
141
+ /** Target IP address for 'forceTarget' mode (e.g. '127.0.0.1'). Required when default is 'forceTarget'. */
142
+ target?: string;
143
+ /** Destinations that pass through directly — not rewritten, not blocked.
144
+ * Supports: exact IP, CIDR, wildcards (192.168.190.*), ranges. */
145
+ allowList?: string[];
146
+ /** Destinations that are always blocked. Overrides allowList (deny wins).
147
+ * Supports: exact IP, CIDR, wildcards, ranges. */
148
+ blockList?: string[];
128
149
  }
129
150
 
130
151
  export interface IVpnServerOptions {