/** * Policy configuration for Xray-Core. * * @see https://xtls.github.io/en/config/policy.html */ export interface PolicyConfig { /** Per-level policy settings. Key is the user level number. */ levels?: Record; /** System-wide policy settings. */ system?: SystemPolicy; } export interface LevelPolicy { /** Handshake timeout in seconds (default: 4). */ handshake?: number; /** Connection idle timeout in seconds (default: 300). */ connIdle?: number; /** Time in seconds to keep upstream connection alive after downstream closes (default: 2). */ uplinkOnly?: number; /** Time in seconds to keep downstream connection alive after upstream closes (default: 5). */ downlinkOnly?: number; /** Enable per-user upload traffic statistics. */ statsUserUplink?: boolean; /** Enable per-user download traffic statistics. */ statsUserDownlink?: boolean; /** Enable per-user online status tracking. */ statsUserOnline?: boolean; /** Per-connection buffer size in kB. -1 for unlimited. */ bufferSize?: number; } export interface SystemPolicy { /** Enable inbound upload traffic statistics. */ statsInboundUplink?: boolean; /** Enable inbound download traffic statistics. */ statsInboundDownlink?: boolean; /** Enable outbound upload traffic statistics. */ statsOutboundUplink?: boolean; /** Enable outbound download traffic statistics. */ statsOutboundDownlink?: boolean; } //# sourceMappingURL=policy.d.ts.map