V2Ray Manual
repository·master·Indexed 21 days ago
https://github.com/v2ray/manualDocumentation for V2Ray, the core component of Project V, a suite of tools for building private networks. It covers JSON configuration formats, data types, API setup via gRPC, and core features including multiple inbound/outbound proxies, customizable routing, obfuscation, and reverse proxy support. The manual also provides a list of compatible graphical clients for Windows, macOS, Linux, iOS, and Android.
What's inside V2Ray
- Project V is a toolkit designed to help users build custom underlying communication networks. The core component is V2Ray, which implements network protocols and functions to communicate with other Project V tools. V2Ray can run as a standalone process or be integrated with other tools to create streamlined workflows.
Overview of Project V and V2Ray
masterProject V is a suite of tools designed for building private networks over the internet. The core component isV2Ray, which manages network protocols and communications. V2Ray can operate as a standalone tool or be integrated with other networking tools.V2Ray Core release cycle and planning
masterRelease Cycle
V2Ray Core follows a weekly release schedule. Since version 2.0, each Milestone is intended to last for one year.
Feature Planning
All discussions and planning for new features are managed in the v2ray/Planning repository.
Supported protocols in V2Ray
masterV2Ray supports a variety of protocols that can be used as either an inbound protocol (receiving connections), an outbound protocol (sending connections), or both. The available protocols are:
- Blackhole: Used for blocking traffic or simulating a sinkhole.
- Dokodemo-door: A generic protocol used to forward traffic to any destination.
- Freedom: Used to allow traffic to pass through directly without proxying (often used for local routing).
- HTTP: Standard HTTP proxy protocol.
- MTProto: Telegram's MTProto proxy protocol.
- Shadowsocks: The Shadowsocks proxy protocol.
- Socks: Standard SOCKS (SOCKS4/SOCKS5) proxy protocol.
- VMess: V2Ray's custom proxy protocol.
Supported Platforms for V2Ray
masterV2Ray is available on the following platforms:
- Windows: 7 and later (x86 / amd64).
- macOS: 10.10 Yosemite and later (amd64).
- Linux: 2.6.23 and later (x86, amd64, arm, arm64, mips64, mips). Supported distributions include Debian 7/8, Ubuntu 12.04/14.04+, CentOS 6/7, and Arch Linux.
- BSD: FreeBSD (x86/amd64), OpenBSD (x86/amd64), and Dragonfly BSD (amd64).
What is Multiplexing (Mux) in V2Ray
masterMultiplexing (Mux) allows using a single physical TCP connection to carry multiple virtual TCP connections.
Key characteristics:
- Purpose: Designed to reduce TCP handshake latency.
- Limitation: It is NOT intended for high throughput. Using Mux for downloading large files or speed measurements typically results in slower performance compared to standard TCP connections.
What is VMess and how to ensure it works
masterVMess is an encrypted transport protocol used as a bridge between V2Ray clients and servers. It is available as both an
InboundandOutboundprotocol.Critical Requirement: Time Synchronization VMess relies heavily on system time. You must ensure that the system UTC time used by V2Ray has an error of less than 90 seconds. Timezone settings do not matter, but absolute UTC time does. On Linux, it is recommended to install and use the
ntpservice to automatically synchronize system time.Overview of the mKCP protocol
mastermKCP is a streaming transport 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 stream identifier (Conv) carried in every packet. When a packet is received, the receiver uses the identifier to determine if it belongs to an existing session or a new one.
- Packet Structure: mKCP breaks data streams into packets, and each packet contains one or more segments (Data, ACK, or Ping).
What is in the V2Ray Application Layer?
masterThe Application Layer contains abstract, pure-software modules that provide common functionality to the proxy layer. Key modules include:
- Dispatcher: Responsible for transmitting data received from Inbound proxies to Outbound proxies.
- Router: Handles built-in routing logic (see routing configuration).
- DNS: Provides built-in DNS caching.
- Proxy Manager: Manages Inbound proxies.
What is Dokodemo-door
masterDokodemo-door is an inbound protocol that listens on a local port and forwards all incoming data to a specific destination address and port. This effectively achieves port mapping, allowing V2Ray to act as a transparent proxy or a gateway for various types of traffic.What is Mux Multiplexing and when to use it
masterMux (Multiplexing) is a feature that distributes data from multiple TCP connections over a single TCP connection.
Purpose: It is designed to reduce TCP handshake latency.
When NOT to use it: Do not use Mux for high-throughput tasks like watching videos, downloading large files, or speed testing, as it may actually decrease performance.
Deployment: Mux only needs to be enabled on the client side; the server side adapts automatically.
What is the Mux.Cool protocol?
masterMux.Cool is a multiplexing transport protocol (Version 1 Beta) designed to transmit multiple independent data streams (sub-connections) over a single established reliable data stream (the "main connection").
Key Concepts
- Main Connection: The underlying reliable stream (e.g., TCP) that carries the Mux.Cool traffic.
- Sub-connection: An independent logical stream within the main connection, identified by a unique ID.
- Frames: The unit of transmission. Each frame carries metadata and optionally payload data for a specific sub-connection.
- Compatibility: To maintain compatibility with protocols like Shadowsocks or VMess that require a destination address, Mux.Cool uses the special address
v1.mux.cool. If the main connection's target address matches this string, Mux.Cool multiplexing is used; otherwise, traditional forwarding is used.