Skip to content

Repository files navigation

⚡ XConnect

A fast, privacy-first Xray client for Android — built for simplicity and speed

Release Downloads CI License Android Kotlin

English | فارسی

Crafted with 🍍 by Ananas (آناناس)


📖 About

XConnect is an open-source VPN / proxy client for Android built on top of the battle-tested Xray-core engine. It is designed with a simple philosophy: connect fast, stay out of your way, and respect your battery and data.

The UI is built entirely with Jetpack Compose + Material 3, is RTL-first (designed in Persian and fully localized in English), and ships with a smart Iran-bypass routing profile out of the box — Iranian domains and IPs go direct, everything else goes through the tunnel, with optional ad-blocking.

⚠️ Uninstall any previous copy before installing v1.5.1 — the signing key was rotated in this release.

✨ Features

Xray-core engine Powered by the latest Xray core (v26.x) via libv2ray
🔐 Modern protocols VMess, VLESS, Trojan, Shadowsocks, SOCKS — with TLS & REALITY
🌐 Transports TCP (+HTTP header), WebSocket, gRPC, HTTP/2, HTTPUpgrade, SplitHTTP
🧭 Smart routing Bypass-Iran profile (geoip:ir, geosite:category-ir, domain:ir), optional ad blocking, private-network rules
📱 Per-app proxy Include / Exclude mode with search — route only the apps you choose (user and system apps)
🛰 Two modes Full VPN (TUN) mode or local Proxy mode (SOCKS5 + HTTP)
📥 Flexible import Share-link intent, QR scanner, clipboard, full Xray JSON, Clash YAML, base64 subscription blobs, HTML pages
🔄 Subscriptions Auto-update (older than 6 h refresh automatically), per-node latency test with color-coded badges
🎨 Modern UI Material 3, dynamic color, animated connect switch, system / light / dark themes
🇮🇷🌍 Bilingual Persian (RTL) & English, Vazirmatn typography
🔎 No nonsense No analytics, no trackers, no accounts — your config stays on your device

📲 Download

Grab the latest APK from the Releases page — or use the direct links below (v1.5.1):

Variant Best for Size SHA-256
arm64-v8a Most modern phones ~44 MB 64b96b26…e2f09223
armeabi-v7a Older 32-bit phones ~42 MB 3907e99a…cd063626
x86_64 Emulators / x86 devices ~46 MB 2ff66bb1…2d0f05e5
universal All of the above ~144 MB a840d95a…a4441f99
Full checksums (SHA-256)
64b96b266927695ad1ccb2506620b5eb5bedfd3b8da52a3ebd3f17f2e2f09223  XConnect-v1.5.1-arm64-v8a.apk
3907e99a930c513d23a5aa59c2d20f1f0b971d1f96a701e39419ee38cd063626  XConnect-v1.5.1-armeabi-v7a.apk
2ff66bb1b657ac0201f81f68752412e94c0a734bb84583efc95f30b12d0f05e5  XConnect-v1.5.1-x86_64.apk
a840d95a16b68a8fe135100b838ab94b1149005fd517ee9476a7df76a4441f99  XConnect-v1.5.1-universal.apk

🚀 Quick start

  1. Install the APK for your device architecture.
  2. Add a server — paste a vless:// / vmess:// / trojan:// / ss:// link, scan a QR, import a full Xray JSON, a Clash config, or a subscription URL.
  3. Tap the big switch — that's it. Default profile routes Iranian traffic direct and everything else through the tunnel.
  4. Optional polish in Settings: per-app routing, ad blocking, bypass-Iran on/off, theme & language.

🛠 Building from source

Requirements: JDK 21 · Android SDK 35 (build-tools 35.0.0) · Gradle 8.14+ (wrapper included)

git clone https://github.com/MRGhust/XConnect.git
cd XConnect

# Run the unit-test suite (39 tests: config builder, link parsing, regression guards)
./gradlew testReleaseUnitTest

# Build all APK variants (unsigned unless you add a keystore — see below)
./gradlew assembleRelease

Signing (optional): drop your own xconnect-release.jks at the repo root plus a git-ignored keystore.properties:

storePassword=your_password
keyAlias=your_alias
keyPassword=your_password

…or provide XCONNECT_STORE_PASS / XCONNECT_KEY_ALIAS / XCONNECT_KEY_PASS environment variables. Without a keystore, release APKs are built unsigned — perfect for CI and forks.

Noteapp/libs/libv2ray.aar and app/src/main/assets/{geoip,geosite}.dat are committed so the repo builds out of the box. The bundled geo files come from Loyalsoldier/geoip and include geosite:category-ir.

🧱 Tech stack

  • Kotlin 2.0 + coroutines & StateFlow
  • Jetpack Compose (BOM 2024.12) + Material 3
  • Xray-core v26.x via AndroidLibXrayLite (libv2ray.aar)
  • Gson for config JSON, ZXing for QR scanning
  • AGP 8.7.3, minSdk 29 (Android 10), targetSdk 35

🗂 Project layout

app/src/main/java/com/xconnect/vpn/
├── App.kt / MainActivity.kt        ← application + single-activity Compose host
├── core/
│   ├── XrayConfigBuilder.kt        ← builds full Xray JSON (routing, DNS, TUN/socks)
│   ├── OutboundFactory.kt          ← share-link → outbound JSON (all transports)
│   ├── LinkParser.kt               ← vmess/vless/trojan/ss/socks + JSON/HTML/base64
│   ├── ClashParser.kt              ← Clash YAML proxies → links
│   ├── ConnectionVpnService.kt     ← VpnService (TUN) + foreground service
│   ├── ProxyService.kt             ← local SOCKS5/HTTP proxy mode
│   ├── CoreController.kt           ← libv2ray wrapper (start/stop/measure)
│   ├── LatencyTester.kt            ← concurrent per-server ping
│   ├── AppListProvider.kt          ← installed-app enumeration (per-app routing)
│   └── SubscriptionManager.kt      ← fetch/update subscriptions safely
├── data/
│   ├── Models.kt                   ← ServerProfile, Subscription, AppSettings…
│   └── Store.kt                    ← SharedPreferences + Gson repository
└── ui/                             ← Compose screens (home/servers/subs/settings) + I18n

🤝 Contributing

Issues and pull requests are welcome! For big changes, please open an issue first to discuss what you'd like to change. Keep PRs focused, and add/adjust unit tests for anything in core/.

⚠️ Disclaimer

This project is provided as-is, for personal and educational use. You are responsible for complying with the laws of your jurisdiction. The authors are not affiliated with the Xray project.

🙏 Credits

📄 License

Released under the GNU GPL v3.0.


🍍 راهنما به فارسی (Persian)

XConnect یک کلاینت متن‌باز VPN و پروکسی برای اندروید است که با موتور قدرتمند Xray-core کار می‌کند؛ ساخته‌شده با Compose و Material 3، با رابط راست‌به‌چپ و فونت وزیرمتن.

✨ امکانات

  • 🔐 پروتکل‌های VMess / VLESS / Trojan / Shadowsocks / SOCKS با TLS و REALITY
  • 🌐 ترنسپورت‌های TCP / WebSocket / gRPC / HTTP2 / HTTPUpgrade / SplitHTTP
  • 🧭 دور زدن هوشمند ایران — دامنه و آی‌پی ایرانی مستقیم، بقیه از تونل + اختیاری مسدودسازی تبلیغات
  • 📱 پروکسی بر اساس برنامه — حالت شامل/مستثنا با جستجو، هم اپ‌های کاربری هم سیستمی
  • 🛰 دو حالت: VPN کامل یا پروکسی محلی (SOCKS5 + HTTP)
  • 📥 افزودن کانفیگ: لینک، QR، کلیپ‌بورد، JSON کامل Xray، کانفیگ Clash، ساب‌کریپشن Base64 و حتی صفحات HTML
  • 🔄 ساب‌کریپشن با به‌روزرسانی خودکار و تست پینگ هر نود با نشانگر رنگی
  • 🎨 تم سیستم/روشن/تیره، انیمیشن روشن‌وخاموش، دو زبانه (فارسی/انگلیسی)

📲 دانلود

آخرین نسخه را از صفحه Releases بگیرید. برای بیشتر گوشی‌های امروزی فایل arm64-v8a مناسب است؛ اگر مطمئن نیستید universal را نصب کنید.

⚠️ قبل از نصب نسخه ۱.۵.۱، نسخه‌های قبلی را حذف کنید (کلید امضا تغییر کرده است).

🚀 استفاده سریع

۱. نصب برنامه ← ۲. افزودن کانفیگ یا ساب‌کریپشن ← ۳. زدن کلید بزرگ صفحه اصلی. تمام! تنظیمات اختیاری: مسیریابی بر اساس برنامه، مسدودسازی تبلیغات، تم و زبان.

🛠 بیلد از سورس

پیش‌نیاز: JDK 21 و Android SDK 35. کافیست:

./gradlew assembleRelease        # ساخت همه فایل‌های نصبی
./gradlew testReleaseUnitTest    # اجرای تست‌ها

برای امضا، فایل xconnect-release.jks خودتان را در ریشه پروژه بگذارید و keystore.properties بسازید (توضیح کامل در بخش انگلیسی). بدون کلید، خروجی بدون امضا ساخته می‌شود.

⚠️ سلب مسئولیت

این پروژه صرفاً برای استفاده شخصی و آموزشی منتشر شده و رعایت قوانین محل سکونت شما بر عهده خودتان است.

ساخته‌شده با 🍍 توسط آناناس

About

XConnect — fast & secure Xray VPN client for Android (VLESS/VMess/Trojan/Shadowsocks) with smart Iran routing, per-app split tunneling and a bilingual RTL UI. Kotlin + Jetpack Compose, Material 3.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages