The example app is the fastest way to verify that platform setup, native Xray integration, proxy-only mode, tunnel mode, import parsing, and status updates work before copying the plugin into your own app.
- Clipboard import through
FlutterVless.parse() - Generated Xray config preview and editing
- Proxy-only startup
- VPN/tunnel startup
- Runtime
VlessStatusupdates - Upload/download counters
- Server core version display
- Android
blockedApps - Route/domain editing helpers in
lib/routing.dart
Run on a device:
cd example
flutter pub get
flutter run -d androidFor Android emulators, the main Maven runtime AAR already provides x86/x86_64 binaries.
The app Gradle file enables extracted native executables for the Xray runtime:
<application
android:extractNativeLibs="true">
...
</application>
## iOS
iOS tunnel mode requires a signed real device.
```bash
cd example
flutter pub get
open ios/Runner.xcworkspaceIn Xcode:
- Select a real iPhone.
- Set the same Apple Team for
RunnerandXrayTunnel. - Confirm App Groups and Network Extension capabilities.
- Run from Xcode.
After signing is configured, CLI runs can also work:
flutter run -d <your-iphone-id>macOS tunnel mode requires the Packet Tunnel target and signing setup.
cd example
flutter pub get
open macos/Runner.xcworkspaceSet your Apple Team on both macOS targets, then run from Xcode or:
flutter run -d macosRead doc/macos_packet_tunnel_architecture.md before changing macOS routing,
DNS, or Packet Tunnel behavior.
Windows needs a local xray.exe.
Expected example layout:
example/
windows/
xray/
xray.exe
Then run:
cd example
flutter pub get
flutter run -d windowsThe Windows backend does not download Xray automatically.
- Use proxy-only mode first when you want the smallest runtime path.
- Use VPN/tunnel mode only after platform setup is complete.
- Import a known-good share link or raw Xray config from the clipboard.
- Watch
state,connectionState, upload, and download counters after startup. - Stop the session from the app before closing the example during testing.