DEV Community

Cover image for πŸš€ Introducing flutter_v2ray_client: Your Ultimate Flutter VPN Solution!
Amir Ziari
Amir Ziari

Posted on • Originally published at github.com

πŸš€ Introducing flutter_v2ray_client: Your Ultimate Flutter VPN Solution!

Hey Flutter fam! πŸ‘‹ I'm absolutely thrilled to share my very first open-source package with you all! After months of hard work, I'm excited to introduce flutter_v2ray_client - a powerful Flutter plugin that brings the full power of V2Ray/Xray to your mobile applications! 🌟

🎯 What Makes This Special?

As someone who's passionate about privacy and performance, I wanted to create something that would make it incredibly easy for Flutter developers to integrate robust VPN and proxy functionality into their apps. This isn't just another wrapper - it's a thoughtfully designed, modern Flutter plugin with a clean API that you'll actually enjoy using! πŸ’œ

✨ Key Features That'll Blow Your Mind

πŸ” Dual Mode Support

  • VPN Mode: Full system-level tunneling for complete privacy protection
  • Proxy Mode: Lightweight proxy-only connections for specific app traffic

🌐 Multi-Protocol Powerhouse

Seamlessly works with:

  • VMess - The classic choice for speed and reliability
  • VLess - Lightweight and efficient modern protocol
  • Trojan - Stealthy connections that blend with normal traffic
  • Socks - Universal proxy protocol support
  • ShadowSocks - Popular choice for censorship resistance

πŸ“Š Real-Time Monitoring Dashboard

Get live updates on:

  • Connection status and health
  • Upload/download speeds
  • Total traffic usage
  • Connection duration
  • Server response times

πŸŽ›οΈ Flexible Configuration

// Parse any V2Ray sharing link effortlessly
V2RayURL parser = V2ray.parseFromURL("your_v2ray_link_here");

// Customize everything to your needs
parser.inbound['port'] = 10890;
parser.log['loglevel'] = 'info';
parser.dns = {"servers": ["1.1.1.1"]};
Enter fullscreen mode Exit fullscreen mode

πŸ›‘οΈ Smart Traffic Management

  • App Exclusion: Choose specific apps to bypass VPN traffic
  • LAN Bypass: Keep local network traffic flowing normally
  • Socket Protection: Prevents connection loops and ensures stability

πŸš€ Getting Started (It's Super Easy!)

1️⃣ Add to Your Project

flutter pub add flutter_v2ray_client
Enter fullscreen mode Exit fullscreen mode

2️⃣ Basic Implementation

import 'package:flutter_v2ray_client/flutter_v2ray.dart';

final V2ray v2ray = V2ray(
    onStatusChanged: (status) {
        print('Connection status: ${status.state}');
    },
);

// Initialize and connect
await v2ray.initialize(
    notificationIconResourceType: "mipmap",
    notificationIconResourceName: "ic_launcher",
);

V2RayURL parser = V2ray.parseFromURL("your_v2ray_link_here");

if (await v2ray.requestPermission()) {
    await v2ray.startV2Ray(
        remark: parser.remark,
        config: parser.getFullConfiguration(),
        proxyOnly: false,
    );
}
Enter fullscreen mode Exit fullscreen mode

🎨 Real-World Usage

Imagine building apps like:

  • Privacy-First Browsers πŸ›‘οΈ
  • Secure Messaging Apps πŸ’¬
  • Streaming Media Players πŸŽ₯
  • Corporate VPN Solutions 🏒
  • Developer Tools βš™οΈ

🌟 What's Under the Hood?

  • Android-First: Built with Xray 25.9.11 core for maximum performance
  • Modern Flutter: Compatible with Flutter 3.16.0+ and Dart 3.1.0+
  • Clean Architecture: Platform interface ready for iOS, Windows, Linux, macOS expansion
  • Google Play Ready: Full Android 16 KB page size support
  • Open Source: MIT licensed for maximum community benefit

🎯 Perfect For

βœ… App Developers wanting to add VPN functionality
βœ… Privacy Advocates building secure applications
βœ… Network Engineers creating custom proxy solutions
βœ… Students learning Flutter plugin development
βœ… Companies needing enterprise VPN solutions

πŸ›£οΈ Roadmap & Future Plans

I'm committed to making this the best Flutter VPN solution out there! Here's what's coming:

πŸš€ Performance Boost

  • Integration with hev-socks5-tunnel for blazing-fast speeds
  • Enhanced connection stability and resource efficiency

🌍 Multi-Platform Expansion

  • iOS Support (community donations welcome!)
  • Windows, Linux, macOS desktop versions
  • Cross-platform consistency

⚑ Advanced Features

  • Traffic routing and filtering
  • Custom UI components
  • Extended protocol support

πŸ’ Community Love

This project thrives on community contributions! Whether you're:

  • πŸ› Reporting bugs or suggesting improvements
  • πŸ’» Contributing code to new features
  • πŸ“š Improving documentation
  • 🎨 Creating example apps
  • 🌟 Spreading the word

Every contribution makes a difference! Check out our Contributing Guide to get started.

πŸ‘¨β€πŸ’» About Me

Hey there! I'm Amir, a passionate Full Stack developer who loves creating tools that make privacy and security accessible to everyone. This is my first major open-source contribution, and I'm incredibly excited to share it with the community!

πŸ“± Portfolio: Check out more of my work at Amir Ziari Portfolio

πŸŽ‰ Final Thoughts

Building flutter_v2ray_client has been an incredible journey of learning and growth. I'm so grateful to the Flutter community for the amazing ecosystem that made this possible, and I can't wait to see what you'll build with it!

Ready to supercharge your Flutter apps with VPN capabilities? Give flutter_v2ray_client a try today! πŸš€


Tags: #Flutter #VPN #V2Ray #XRay #Android #Proxy #Dart #OpenSource #Privacy #MobileDevelopment

Links:


Have questions? Found a bug? Want to contribute? I'd love to hear from you! Drop a comment below or reach out on GitHub. Let's build something amazing together! 🎯

Top comments (0)