feat(rustproxy): add authenticated VPN route security
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user