Open source · MPL-2.0 · Rust

A focused Xray client core built for mobile.

Embed VLESS, REALITY, Vision, TUN, routing, and DNS in Apple and Android apps—with native adapters and reproducible binary releases.

$ SwiftPM · XCFramework · Android AAR

iOS 15+tvOS 17+macOS 11+Android API 24+

Core capabilities

The client path, without the weight.

A deliberately scoped implementation for teams embedding modern Xray transport in native apps.

01

VLESS, REALITY, Vision

A focused Xray-compatible client path, including TLS and REALITY with shaped ClientHellos, Vision flow, UDP, and XUDP.

02

Mobile TUN integration

Native adapters for Apple Network Extension and Android VpnService, packaged for SwiftPM, XCFramework, and AAR consumers.

03

Routing and DNS

Field rules, geosite and geoip matching, multi-address resolution, TTL-aware caching, fake IP mapping, and shared outbound policy.

Published benchmark

Small footprint. Competitive throughput.

Read the methodology ↗
Apple M3 Pro / localhostxray-rustXray-coresing-box
Idle RSS lower is better3.84 MiB28.1 MiB20.9 MiB
1,000 held flows lower is better18.3 MiB79.9 MiB46.1 MiB
REALITY + Vision bulk higher is better14.3 Gbps13.7 Gbps14.0 Gbps

Synthetic process-level results are workload- and machine-specific. Commands, inputs, and raw output are published for reproduction.

Native distribution

One Rust core. Two mobile ecosystems.

Use source packages during development or pin a verified binary release in production.

A

Apple platforms

Network Extension adapter

import XrayAppleTunnel

final class PacketTunnelProvider:
    XrayPacketTunnelProvider {}
Apple setup guide ↗
A

Android

VpnService adapter

dependencies  {
    implementation(
        "io.github.aimalygin:xray-rust-mobile:0.3.2"
    )
}
Android setup guide ↗

Release integrity

Binary releases you can verify.

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.

✓ Pinned core revision✓ SHA-256 checksums✓ Reproducible metadata
View releases

FAQ

Useful answers, up front.

What is xray-rust?

xray-rust is an open-source, embeddable Rust client core for the documented Xray configuration subset used by mobile proxy and VPN clients.

Does it support VLESS, REALITY, and Vision?

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.

Can I use it in an iOS Network Extension?

Yes. xray-rust-mobile provides an Apple adapter built around NetworkExtension, with SwiftPM and prebuilt XCFramework distribution options.

Is there an Android SDK?

Yes. The Android adapter targets VpnService and is published as an AAR on Maven Central, with reproducible release metadata in the repository.

Is this project affiliated with XTLS or Xray-core?

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

Start with the core.
Ship with the mobile SDK.