BREAKING CHANGE(vpn): replace tag-based VPN access control with source and target profiles

This commit is contained in:
2026-04-05 00:37:37 +00:00
parent 25365678e0
commit 1ddf83b28d
38 changed files with 1546 additions and 321 deletions

View File

@@ -0,0 +1,29 @@
/**
* A specific IP:port target within a TargetProfile.
*/
export interface ITargetProfileTarget {
host: string;
port: number;
}
/**
* A reusable, named target profile that defines what resources a VPN client can reach.
* Assigned to VPN clients via targetProfileIds.
*
* SourceProfile = source-side (who can access: ipAllowList, rateLimit, auth)
* TargetProfile = target-side (what can be accessed: domains, IP:port targets, route refs)
*/
export interface ITargetProfile {
id: string;
name: string;
description?: string;
/** Domain patterns this profile grants access to (supports wildcards: '*.example.com') */
domains?: string[];
/** Specific IP:port targets this profile grants access to */
targets?: ITargetProfileTarget[];
/** Route references by stored route ID or route name */
routeRefs?: string[];
createdAt: number;
updatedAt: number;
createdBy: string;
}