VLESS, REALITY, Vision
A focused Xray-compatible client path, including TLS and REALITY with shaped ClientHellos, Vision flow, UDP, and XUDP.
Open source · MPL-2.0 · Rust
Embed VLESS, REALITY, Vision, TUN, routing, and DNS in Apple and Android apps—with native adapters and reproducible binary releases.
$ SwiftPM · XCFramework · Android AAR
Core capabilities
A deliberately scoped implementation for teams embedding modern Xray transport in native apps.
A focused Xray-compatible client path, including TLS and REALITY with shaped ClientHellos, Vision flow, UDP, and XUDP.
Native adapters for Apple Network Extension and Android VpnService, packaged for SwiftPM, XCFramework, and AAR consumers.
Field rules, geosite and geoip matching, multi-address resolution, TTL-aware caching, fake IP mapping, and shared outbound policy.
Published benchmark
| Apple M3 Pro / localhost | xray-rust | Xray-core | sing-box |
|---|---|---|---|
| Idle RSS lower is better | 3.84 MiB | 28.1 MiB | 20.9 MiB |
| 1,000 held flows lower is better | 18.3 MiB | 79.9 MiB | 46.1 MiB |
| REALITY + Vision bulk higher is better | 14.3 Gbps | 13.7 Gbps | 14.0 Gbps |
Synthetic process-level results are workload- and machine-specific. Commands, inputs, and raw output are published for reproduction.
Native distribution
Use source packages during development or pin a verified binary release in production.
Apple platforms
import XrayAppleTunnel
final class PacketTunnelProvider:
XrayPacketTunnelProvider {}Apple setup guide ↗Android
dependencies {
implementation(
"io.github.aimalygin:xray-rust-mobile:0.3.2"
)
}Android setup guide ↗Release integrity
Each mobile release records the wrapper version, exact core revision, binary revision, and checksums. The same source is available if you prefer to build it yourself.
FAQ
xray-rust is an open-source, embeddable Rust client core for the documented Xray configuration subset used by mobile proxy and VPN clients.
Yes. The supported client path includes VLESS over TCP, TLS or REALITY, xtls-rprx-vision flow, UDP, and XUDP. The repository documents the exact compatibility boundary.
Yes. xray-rust-mobile provides an Apple adapter built around NetworkExtension, with SwiftPM and prebuilt XCFramework distribution options.
Yes. The Android adapter targets VpnService and is published as an AAR on Maven Central, with reproducible release metadata in the repository.
No. xray-rust is an independent open-source implementation and is not affiliated with or endorsed by the XTLS or Xray-core projects.
Build with xray-rust