Build cross-platform VPN and proxy apps for Android, iOS, macOS and Windows with VLESS Reality/XHTTP, VMess, Trojan, Shadowsocks, SOCKS5 and Hysteria2. Import share links, subscriptions, raw Xray JSON, Clash YAML, sing-box JSON and WireGuard profiles.
flutter_vless provides a compact Dart API for parsing share links and subscriptions, importing raw Xray JSON, Clash YAML, and sing-box JSON, generating Xray configurations, and running proxy-only or VPN/tunnel modes through native platform backends. WireGuard profiles are supported through Clash YAML and sing-box JSON imports.
The package is open source and free to use. Platform-specific setup may be required for VPN/tunnel mode. See the documentation, platform guides, and compatibility matrix.
flutter_vless is developed and maintained by 13FOX Studio / tfox.dev.
- Official package: pub.dev/packages/flutter_vless
- Official publisher: pub.dev/publishers/tfox.dev
- Official repository: github.com/XIIIFOX/flutter_vless
- Website: tfox.dev/flutter-vless
- Listed in the official Xray-core README under Xray Wrapper: XTLS/Xray-core
Redistributions and derived packages must preserve the copyright and MIT license notices required by the license. See NOTICE and TRADEMARKS.md.
Have a question for 13FOX Studio, need help integrating flutter_vless, or want
to discuss a custom Flutter app? Reach us on Telegram
or at [email protected].
| Platform | VPN tunnel | Proxy only | Key setup requirements |
|---|---|---|---|
| Android | ✅ | ✅ | Uses VpnService; supports per-app bypass through blockedApps. |
| iOS | ✅ | ✅ | Requires Network Extension, App Group, and a signed physical device for tunnel testing. |
| macOS | ✅ | ✅ | Requires a Packet Tunnel extension, App Group, and application signing. |
| Windows | ✅ | ✅ | Requires local runtime/helper files; tunnel mode requires administrator privileges. |
| Protocol/profile | Clash YAML | sing-box JSON | Raw Xray JSON |
|---|---|---|---|
| VLESS Reality/XHTTP | ✅ | ✅ | ✅ |
| VMess | ✅ | ✅ | ✅ |
| Trojan | ✅ | ✅ | ✅ |
| Shadowsocks | ✅ | ✅ | ✅ |
| Hysteria2 | ✅ | ✅ | ✅ |
| WireGuard | ✅ | ✅ | ✅ |
- Android 16KB page size support for modern builds.
- Swift Package Manager support for iOS and macOS integration.
- Android device and emulator runtime binaries delivered through the main Maven runtime AAR.
- Share-link, subscription, raw JSON, Clash YAML, and sing-box import paths.
- Proxy-only mode and VPN/tunnel mode.
- Connection status, traffic counters and delay measurements.
- Full-profile VPN routing with caller DNS and IPv4/IPv6 payload support.
- Immutable Xray profiles, typed routing and balancers, and exact JSON edits for Core fields.
- Typed notification, quick access, reconnect, protection and diagnostics options.
- New user setup: Getting Started
- Platform setup: Platform Guides
- Public API contract: API Contract
- Practical scenarios: Examples
- Config formats and advanced editing: Configuration Guide
- Compatibility and limits: Compatibility
- Security and runtime boundaries: Security
- If something fails: Troubleshooting
The example app is the quickest way to verify platform setup before copying the plugin into your own project.
If you downloaded a source archive, rename the top-level folder to
flutter_vless before running the bundled example. Flutter's SwiftPM
integration derives the root plugin package identity from the path dependency
directory name.
cd example
flutter pub get
flutter run -d android
# Or select your iOS device or Windows target.iOS needs a signed real device for VPN mode, macOS needs the generated SwiftPM
metadata prepared for macOS 13.0 plus a valid Apple Team on Runner and
XrayTunnel, and Windows needs example/windows/xray/xray.exe.
For iOS or macOS, prepare SwiftPM metadata on macOS with
../tool/prepare_apple_swiftpm.sh. For macOS, open
example/macos/Runner.xcworkspace, select your Apple Team on both macOS targets
if signing is not already valid, then run:
flutter run -d macosIf Xcode is already open after running the prepare script, close it and reopen the workspace.
Add the dependency to pubspec.yaml:
dependencies:
flutter_vless: ^1.1.8Then run flutter pub get.
From your Flutter app, prepare the platform and connection mode you need:
dart run flutter_vless:setup --platform macos --proxy
dart run flutter_vless:doctor --platform macos --proxyFor VPN mode or setup on Android, iOS, and Windows, see the project setup guide.
Follow the flutter_vless 1.1.8 online guide to run the bundled example in VPN or proxy-only mode on Android, iOS, macOS, or Windows.
import 'package:flutter/foundation.dart';
import 'package:flutter_vless/flutter_vless.dart';
final flutterVless = FlutterVless(
onStatusChanged: (status) {
debugPrint(
'status=${status.state} connection=${status.connectionState.name} '
'duration=${status.duration}s',
);
},
);
Future<void> connect(String shareLink) async {
final parsed = FlutterVless.parse(shareLink);
final config = parsed.getFullConfiguration();
await flutterVless.initializeVless(
providerBundleIdentifier: 'com.example.myapp',
groupIdentifier: 'group.com.example.myapp',
);
if (await flutterVless.requestPermission()) {
await flutterVless.startVless(
remark: parsed.remark,
config: config,
);
}
}For proxy-only mode, set proxyOnly: true in startVless() and skip the VPN permission step on the paths that do not require a tunnel.
startVless() and getServerDelay() validate that the provided config is a
well-formed Xray JSON object before the native layer sees it.
Got your first connection working with flutter_vless? Give it a
like on pub.dev or a
star on GitHub to help other Flutter
developers discover the package.
FlutterVless.parse() and FlutterVless.parseMany() support:
vmess://vless://trojan://ss://socks://hysteria2://hy2://- raw Xray JSON
- base64 subscription payloads
- Clash YAML
- sing-box JSON
Clash YAML and sing-box JSON imports also cover supported Xray profile objects such as WireGuard and Hysteria2.
Use parse() for a single share link or a raw config, and parseMany() when you want to keep every supported profile from a subscription payload.
Use XrayProfile.build() to compose proxy nodes, balancers and ordered
routing rules. Use XrayProfile.fromJson() to import a full JSON or JSONC
profile, and edit() to create an independent copy. CorePath and the draft's
setRaw() and removeRaw() methods edit Xray fields by exact JSON path.
Pass profile.toCoreJson() to startVless().
See the profile contract
and profile examples.
Read the configuration guide for how native startup prepares the resulting profile.
The bundled app demonstrates clipboard import, routing edits, proxy-only mode, VPN mode and status tracking. Its balancer entry point accepts multiple share links or an HTTPS subscription and uses the same connection controls.
- Docs index
- Getting Started
- API Contract
- Examples
- Configuration Guide
- Compatibility
- Security
- Architecture Notes
- Troubleshooting
- Release history
Read CONTRIBUTING.md before opening a pull request.
flutter_vless is maintained by 13FOX Studio / tfox.dev. See
AUTHORS, NOTICE, and TRADEMARKS.md for
attribution and brand-use notes.
