feat(rustproxy): add authenticated VPN route security

This commit is contained in:
2026-05-24 01:25:06 +00:00
parent c161ac664d
commit c7785d2f78
12 changed files with 310 additions and 14 deletions
+8 -1
View File
@@ -16,6 +16,12 @@ export interface IRouteContext {
domain?: string; // The domain from SNI or Host header
clientIp: string; // The client's IP address
serverIp: string; // The server's IP address
vpn?: { // Authenticated VPN identity from trusted PROXY v2 metadata
clientId: string;
assignedIp: string;
transportType?: string;
remoteAddr?: string;
};
// HTTP specifics (NetworkProxy only)
path?: string; // URL path (for HTTP connections)
@@ -88,6 +94,7 @@ export function toBaseContext(httpContext: IHttpRouteContext): IRouteContext {
domain: httpContext.domain,
clientIp: httpContext.clientIp,
serverIp: httpContext.serverIp,
vpn: httpContext.vpn,
path: httpContext.path,
query: httpContext.query,
headers: httpContext.headers,
@@ -110,4 +117,4 @@ export function toBaseContext(httpContext: IHttpRouteContext): IRouteContext {
}
return baseContext;
}
}