/** * Socket options (sockopt) configuration for Xray-Core. * * @see https://xtls.github.io/en/config/transport.html#sockoptobject */ export interface SocketConfig { /** SO_MARK value for outbound connections (Linux only). */ mark?: number; /** Enable TCP Fast Open. true/false or integer queue length. */ tcpFastOpen?: boolean | number; /** Transparent proxy mode (Linux only). */ tproxy?: TProxyMode; /** Accept PROXY protocol on inbound connections. */ acceptProxyProtocol?: boolean; /** Domain resolution strategy for this connection. */ domainStrategy?: SockoptDomainStrategy; /** Tag of another outbound to use as dialer proxy. */ dialerProxy?: string; /** TCP keep-alive probe interval in seconds. */ tcpKeepAliveInterval?: number; /** TCP keep-alive idle time before first probe in seconds. */ tcpKeepAliveIdle?: number; /** TCP congestion control algorithm (e.g. "bbr", "cubic"). */ tcpCongestion?: string; /** TCP window clamp value. */ tcpWindowClamp?: number; /** TCP maximum segment size. */ tcpMaxSeg?: number; /** Enable NAT penetration mode. */ penetrate?: boolean; /** TCP user timeout in milliseconds. */ tcpUserTimeout?: number; /** Restrict to IPv6 only. */ v6only?: boolean; /** Bind to specific network interface. */ interface?: string; /** Enable Multipath TCP (MPTCP). */ tcpMptcp?: boolean; /** Custom socket options (advanced). */ customSockopt?: CustomSockoptConfig[]; /** Address and port binding strategy. */ addressPortStrategy?: string; /** Happy Eyeballs (RFC 8305) settings. */ happyEyeballs?: HappyEyeballsConfig; /** Trusted X-Forwarded-For IP addresses. */ trustedXForwardedFor?: string[]; } export interface CustomSockoptConfig { /** System/OS type (e.g. "linux"). */ system?: string; /** Network type (e.g. "tcp", "udp"). */ network?: string; /** Socket option level (e.g. "SOL_SOCKET", "IPPROTO_TCP"). */ level?: string; /** Socket option name (e.g. "SO_REUSEADDR"). */ opt?: string; /** Socket option value. */ value?: string; /** Value type (e.g. "int", "str"). */ type?: string; } export interface HappyEyeballsConfig { /** Prefer IPv6 over IPv4. */ prioritizeIPv6?: boolean; /** Delay in ms before trying next address family. */ tryDelayMs?: number; /** Interleave factor for address sorting. */ interleave?: number; /** Maximum concurrent connection attempts. */ maxConcurrentTry?: number; } export type TProxyMode = 'off' | 'redirect' | 'tproxy'; export type SockoptDomainStrategy = 'AsIs' | 'UseIP' | 'UseIPv4' | 'UseIPv6' | 'UseIPv4v6' | 'UseIPv6v4' | 'ForceIP' | 'ForceIPv4' | 'ForceIPv6' | 'ForceIPv4v6' | 'ForceIPv6v4'; //# sourceMappingURL=sockopt.d.ts.map