π§© Following the success of flutter_v2ray_client (mobile), I'm excited to introduce the Desktop Edition β a premium Flutter plugin that brings V2Ray, Xray, and Sing-Box VPN/TUN capabilities to Windows, macOS, and Linux.
Ideal for developers and companies building cross-platform VPN or proxy tools.
π₯ Quick Youtube Video Demo
π Premium Highlights
π 2-Year Guarantee β Free updates & maintenance
π¬ Priority Support β Fast Telegram support for all premium users
π Advanced Features β Real-time stats, VPN/TUN mode, delay testsβ οΈ Need help? Contact @AmirZrDevv or open a GitHub issue. Support replies within 24 hours.
π₯οΈ Overview
flutter_v2ray_client_desktop lets you run V2Ray/Xray and Sing-Box (VPN/TUN) with a unified Flutter API.
It includes system proxy management, URL parsing, and real-time network stats β all in pure Dart.
| Component | Version |
|---|---|
| Xray Core | 25.10.15 |
| Sing-Box | 1.12.10 |
With each Xray and Sing-Box update, you will receive new updates.
π Key Use Cases
- Build a crossβplatform VPN client with TUN/VPN and system proxy modes.
- Parse
vmess/vless/trojan/ss/sockslinks to valid Xray configs. - Show live bandwidth, totals, and uptime in your UI.
- Run delay tests (HTTP/ICMP/TCP) to autoβpick the fastest server.
β¨ Core Features
- π Connection Modes:
proxy,systemProxy,vpn - π Live Status: speed, totals, uptime, connection state
- βοΈ System Proxy Control: Windows/macOS/Linux
- π VPN/TUN with Sing-Box
- β±οΈ Server Delay Test: HTTP / ICMP / TCP
- π Share-Link Parser: vmess/vless/trojan/ss/socks β Xray JSON
π Platform Setup
| Platform | Binary Location | Notes |
|---|---|---|
| Windows | windows/resources/ |
Run app as Administrator for VPN mode |
| macOS | macos/Resources/ |
Requires sudoPassword at runtime for VPN |
| Linux | linux/resources/ |
Requires sudoPassword at runtime for VPN |
β οΈ VPN mode requires admin/root privileges.
π¦ Installation
dependencies:
flutter:
sdk: flutter
flutter_v2ray_client_desktop:
git:
url: # Replace with the actual path to your local flutter_v2ray_client_desktop directory
# Example (uncomment and modify as needed):
# path: /path/to/your/local/flutter_v2ray_client_desktop
Run flutter pub get.
π Quick Start
import 'package:flutter_v2ray_client_desktop/flutter_v2ray_client_desktop.dart';
final client = FlutterV2rayClientDesktop(
logListener: print,
statusListener: print,
);
await client.startV2Ray(
config: jsonConfig,
connectionType: ConnectionType.systemProxy,
);
Stop it:
await client.stopV2Ray();
π§ Logs & Status
logListener(String log)
β Receives raw logs: "[Xray]...", "[sing-box]...".
statusListener(V2rayStatus status)
β Fires every second:
V2rayStatus(
state: ConnectionState.connected,
duration: 0:02:15,
download: 12456,
upload: 2345,
totalDownload: 3456789,
totalUpload: 456789,
)
π§© Parser API (V2rayParser)
Convert links into full configs:
final parser = V2rayParser();
await parser.parse('vmess://...');
final fullJson = parser.json();
await client.startV2Ray(
config: fullJson,
connectionType: ConnectionType.systemProxy,
);
Supported protocols:
vmess://,vless://,trojan://,ss://,socks://
π§° API Reference (Summary)
| Type | Description |
|---|---|
ConnectionType |
proxy, systemProxy, vpn
|
DelayType |
http, icmp, tcp
|
V2rayStatus |
Tracks speed, totals, duration |
FlutterV2rayClientDesktop |
Main controller |
β FAQ
- Does VPN/TUN work on all platforms? Yes. TUN mode uses SingβBox. It requires admin/root privileges.
-
How do I disable the system proxy when stopping?
stopV2Ray()automatically disables the system proxy or stops VPN depending onConnectionType(seeFlutterV2rayClientDesktop.stopV2Ray()inlib/flutter_v2ray_client_desktop.dart). -
Can I query versions at runtime?
Yes:
getXrayVersion()andgetSingBoxVersion()return core versions. -
Which outbound does live stats track?
By default it reads
outbound>>>proxyuplink/downlink via Xray API (see_startStatusTimer()implementation).
βοΈ Utility Methods
await client.setSystemProxy('socks://127.0.0.1:10808');
await client.setSystemProxy(''); // disable proxy
final delay = await client.getServerDelay(
url: 'vmess://...',
type: DelayType.tcp,
);
print('Delay: ${delay}ms');
πΌ Screenshots
Android
Desktop
π Related Links
- π± flutter v2ray | Pub.dev
- π¬ Telegram Support
- π amirzr.dev
π¨βπ» About the Author
Iβm Amir Ziari, a full-stack developer passionate about privacy, VPN technologies, and Flutter performance.
I help developers build secure and reliable network apps.
π Final Words
With flutter_v2ray_client_desktop, you can bring V2Ray/Xray & Sing-Box to desktop Flutter apps β with one unified API and cross-platform control.
Build your next-gen VPN or proxy tool with confidence β‘






Top comments (0)