Project X Documentation
repository·main·Indexed 43 days ago
https://github.com/xtls/xray-docs-nextDocumentation for Project X and Xray, focusing on advanced networking configurations, transparent proxying, and core components. Includes detailed guides on configuring the gRPC API (HandlerService, RoutingService, LoggerService, StatsService, ReflectionService), DNS settings (DnsObject, DnsServerObject, FakeDNS), and environment variable management.
What's inside Project X
- Xray supports various transport configurations to define how data is encapsulated and transmitted. These configurations are categorized into transport protocols (the method of transmission), transport security (encryption and identity layers), and additional settings (low-level socket or masking options).
Learning Paths for Xray Users
mainThe documentation is organized by user expertise level:
- Project X for Dummies (Level 0): User insights and fundamental guidance for absolute beginners.
- Beginner Tips (Level 1): Intermediate usage methods for those who have mastered the basics.
- Advanced Documentation (Level 2): Specialized tips and guidance for advanced users.
Access the Project X documentation website
mainThe official documentation for Project X is hosted at the following URL. This site contains all the content presented in the repository's documentation structure.
https://xtls.github.io/Core Features of Xray-core
mainXray-core provides a comprehensive suite of networking and security features:
- Original Protocols: Includes VLESS, XTLS, XUDP, XHTTP, and REALITY, covering proxy, flow control, multiplexing, transport, and security layers.
- Advanced Routing: A flexible routing and DNS system that allows fine-grained traffic scheduling based on domain, IP, port, protocol, process, and user.
- Traffic Obfuscation: Uses VLESS fallback, REALITY, XTLS flow control, and FinalMask to reduce traffic fingerprints and enhance anti-detection capabilities.
- Modular Composition: Proxy protocols, flow control modes, transport layers, and routing systems can be freely combined to suit different scenarios.
- Low Resource Consumption: VLESS eliminates redundant encryption and uses
Spliceto reduce forwarding overhead, making it suitable for low-power devices like OpenWRT or Raspberry Pi.
Determine if this guide is suitable for you
mainThis documentation is specifically designed for beginners with zero foundation who wish to learn how to self-host a VPS (Virtual Private Server) for secure internet access.
This guide is NOT for:
- Technical experts or advanced users.
- Users who prefer using 'Airports' (subscription-based proxy services).
- Users who want to use one-click automated scripts.
- Users who do not wish to learn the underlying technical processes.
If you are looking for a quick, automated, or managed solution, you should skip this documentation.
Configure Xray outbound protocols
mainXray supports a variety of outbound protocols used to direct traffic out of the proxy server to a destination. Depending on your routing requirements, you can configure protocols such asBlackholefor blocking traffic,Freedomfor direct connections, or various proxy protocols likeShadowsocks,Trojan,VLESS,VMess,WireGuard, andHysteriato tunnel traffic through remote servers. Other specialized outbounds includeDNSfor name resolution,HTTPandSocksfor standard proxying, andLoopbackfor local traffic.Determine if this guide is suitable for your needs
mainThis guide is specifically designed for newcomers with zero technical background who want to learn how to self-host a VPS (Virtual Private Server) for circumvention purposes.
This guide is NOT for:
- Technical experts or gurus.
- Users who prefer using "Airports" (VPN/Proxy service providers).
- Users who want to use one-click scripts without understanding the underlying process.
- Beginners who are unwilling to tinker or learn basic technical foundations.
What is the HTTPUpgrade transport protocol
mainHTTPUpgrade is a protocol that implements HTTP 1.1 upgrade requests and responses, similar to WebSocket. This allows it to be reverse-proxied by CDNs or Nginx. It is designed for high efficiency by avoiding the full WebSocket protocol implementation.
Note: It is intended to work with security protocols like TLS rather than being used standalone.
::: danger It is recommended to switch to XHTTP to avoid significant traffic fingerprints such as
ALPN is http/1.1. :::What is Sockopt and when to use it
mainSockopt is used to configure low-level network behavior. It allows you to adjust settings for transparent proxying, domain name resolution strategies, and various underlying socket options.Overview of the mKCP Protocol
mainmKCP is a streaming protocol modified from the KCP protocol. It allows for the ordered transmission of arbitrary data streams over UDP.
Key Characteristics:
- Transport Layer: Uses UDP for all communications.
- Connection Model: There is no formal handshake process. A session is identified by a unique
Conv(Connection) ID carried in every packet. When a packet is received, the receiver uses theConvID to determine if it belongs to an existing session or a new one. - Data Unit: mKCP splits data streams into packets. Each packet contains one or more Segments.
- Versioning: There is no version number, and compatibility between different versions is not guaranteed.
What is REALITY and how to use it
mainREALITY is a modified form of TLS that uses the appearance and handshake characteristics of a target site as camouflage. It makes traffic shape consistent with ordinary web browsing.
Key Requirements:
- It can only be used with
RAW,XHTTP, orgRPCtransport methods. - For optimal performance, enable REALITY together with a suitable XTLS Vision flow-control mode.
- On the client side, it requires handling a fully random session ID and custom certificate verification.
Security Warning: For camouflage reasons, Xray directly forwards traffic that fails authentication to the
targetsite. If yourtargetis behind a CDN like Cloudflare, your server may be abused as a port forwarder. To mitigate this, use a proxy like Nginx to filter SNI values or uselimitFallbackUpload/limitFallbackDownloadto rate-limit unverified traffic.- It can only be used with
What is the Mux.Cool protocol?
mainMux.Cool is a multiplexing transport protocol (version 1 Beta) designed to transmit multiple independent data streams (sub-connections) within a single established reliable data stream (the "main connection").
Key Concepts
- Main Connection: The underlying reliable stream (e.g., TCP) that carries all multiplexed traffic.
- Sub-connection: An independent logical stream within the main connection, identified by a unique ID.
- Frames: The unit of transmission. Each frame carries data for a specific sub-connection.
- Symmetric Format: Both clients and servers use the same frame structure to send and receive data.
Dependencies
Mux.Cool must run on top of an established reliable data stream.