패키지, 저장소 및 앱 카테고리 검색

패키지 상세v2.0.0

flutter_v2ray

v2ray 연결(VPN 모드 및 프록시 전용)을 가능하게 하는 플러그인

AndroidiOS
30일 다운로드
2.2천
좋아요
98
Pub 점수
160

패키지 설치

flutter pub add flutter_v2ray

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

flutter_v2ray는 Android 및 iOS 기기에서 V2Ray 연결을 가능하게 하는 Flutter 플러그인으로, VPN 모드와 프록시 전용 구성 모두를 지원합니다. 개발자들이 앱에 안전하고 사용자 정의 가능한 네트워크 라우팅을 통합할 수 있게 하여 제한된 콘텐츠 또는 개인 네트워크 서비스에 접근할 수 있도록 합니다. 이 플러그인은 V2Ray 연결을 설정하고 관리하기 위한 간단한 인터페이스를 제공하며, 신뢰할 수 있는 성능을 위해 네이티브 플랫폼 기능을 활용합니다. 고급 네트워킹 기능과 강력한 개인정보 보호 제어가 필요한 애플리케이션에서 특히 유용합니다.

사용 사례

  • 안전한 앱에서 서버로의 통신
  • 지역 콘텐츠 제한 회피
  • 개인정보 보호 중심 애플리케이션 개발
  • 사용자 지정 프록시 구성 통합
  • 암호화된 네트워크 터널 활성화

주요 기능

  • VPN 모드와 프록시 전용 연결 유형을 모두 지원합니다
  • 크로스 플랫폼 호환성 (Android 및 iOS)
  • 안정적인 성능을 위한 네이티브 통합
  • 연결 관리를 위한 간단한 API
  • V2Ray JSON 설정을 통해 구성 가능

적합한 대상

  • 안전한 통신 앱을 개발하는 개발자
  • 네트워크 제한을 우회해야 하는 앱
  • 개인정보 보호 중심 모바일 애플리케이션
  • 네트워크 도구 통합
  • 사용자 지정 프록시 솔루션

고려 사항

  • Android 및 iOS에서 적절한 시스템 권한이 필요합니다
  • 복잡한 V2Ray 설정을 위해 추가 구성이 필요할 수 있습니다
  • VPN 기능으로 인한 앱 스토어 리뷰 도전 과제
  • 일부 작업은 외부 V2Ray 바이너리에 의존합니다
  • 고급 설정 없이 기본 HTTP 요청에는 적합하지 않습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

flutter_v2ray

Open Source Love

Table of contents

Change logs

1.0.10
  • update xray core version to 25.3.6
see more

Features

  • Run V2Ray Proxy & VPN Mode
  • Get Server Delay
  • Parsing V2Ray sharing links and making changes to them

Supported Platforms

Platform Status Info
Android Done ✅ Xray 25.3.6
IOS Done ✅ For purchase: t.me/blueboy_tm
Desktop Done ✅ For purchase: t.me/blueboy_tm

Get started

Add dependency

You can use the command to add flutter_v2ray as a dependency with the latest stable version:

$ flutter pub add flutter_v2ray

Or you can manually add flutter_v2ray into the dependencies section in your pubspec.yaml:

dependencies:
  flutter_v2ray: ^replace-with-latest-version

Examples

URL Parser
import 'package:flutter_v2ray/flutter_v2ray.dart';

// v2ray share link like vmess://, vless://, ...
String link = "link_here";
V2RayURL parser = FlutterV2ray.parseFromURL(link);

// Remark of the v2ray
print(parser.remark);

// generate full v2ray configuration (json)
print(parser.getFullConfiguration());
Edit Configuration
// Change v2ray listening port
parser.inbound['port'] = 10890;
// Change v2ray listening host
parser.inbound['listen'] = '0.0.0.0';
// Change v2ray log level
parser.log['loglevel'] = 'info';
// Change v2ray dns
parser.dns = {
    "servers": ["1.1.1.1"]
};
// and ...

// generate configuration with new settings
parser.getFullConfiguration()

Making V2Ray connection
import 'package:flutter_v2ray/flutter_v2ray.dart';

final FlutterV2ray flutterV2ray = FlutterV2ray(
    onStatusChanged: (status) {
        // do something
    },
);

// You must initialize V2Ray before using it.
await flutterV2ray.initializeV2Ray();



// v2ray share link like vmess://, vless://, ...
String link = "link_here";
V2RayURL parser = FlutterV2ray.parseFromURL(link);


// Get Server Delay
print('${flutterV2ray.getServerDelay(config: parser.getFullConfiguration())}ms');

// Permission is not required if you using proxy only
if (await flutterV2ray.requestPermission()){
    flutterV2ray.startV2Ray(
        remark: parser.remark,
        // The use of parser.getFullConfiguration() is not mandatory,
        // and you can enter the desired V2Ray configuration in JSON format
        config: parser.getFullConfiguration(),
        blockedApps: null,
        bypassSubnets: null,
        proxyOnly: false,
    );
}

// Disconnect
flutterV2ray.stopV2Ray();

Bypass LAN Traffic
final List<String> subnets = [
    "0.0.0.0/5",
    "8.0.0.0/7",
    "11.0.0.0/8",
    "12.0.0.0/6",
    "16.0.0.0/4",
    "32.0.0.0/3",
    "64.0.0.0/2",
    "128.0.0.0/3",
    "160.0.0.0/5",
    "168.0.0.0/6",
    "172.0.0.0/12",
    "172.32.0.0/11",
    "172.64.0.0/10",
    "172.128.0.0/9",
    "173.0.0.0/8",
    "174.0.0.0/7",
    "176.0.0.0/4",
    "192.0.0.0/9",
    "192.128.0.0/11",
    "192.160.0.0/13",
    "192.169.0.0/16",
    "192.170.0.0/15",
    "192.172.0.0/14",
    "192.176.0.0/12",
    "192.192.0.0/10",
    "193.0.0.0/8",
    "194.0.0.0/7",
    "196.0.0.0/6",
    "200.0.0.0/5",
    "208.0.0.0/4",
    "240.0.0.0/4",
];

flutterV2ray.startV2Ray(
    remark: parser.remark,
    config: parser.getFullConfiguration(),
    blockedApps: null,
    bypassSubnets: subnets,
    proxyOnly: false,
);

Android configuration before publish to Google Play🚀

gradle.preperties
  • add this line
android.bundle.enableUncompressedNativeLibs = false
build.gradle (app)
  • Find the buildTypes block:
buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
               signingConfig signingConfigs.release
        }
    }
  • And replace it with the following configuration info:
splits {
        abi {
            enable true
            reset()
            //noinspection ChromeOsAbiSupport
            include "x86_64", "armeabi-v7a", "arm64-v8a"

            universalApk true
        }
    }

   buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
               signingConfig signingConfigs.release
               ndk {
                //noinspection ChromeOsAbiSupport
                abiFilters "x86_64", "armeabi-v7a", "arm64-v8a"
                debugSymbolLevel 'FULL'
            }
        }
    }

More examples

Credits

badvpn (tun2socks) Copyright (C) Ambroz Bizjak

All rights reserved.

Donation

If you liked this package, you can support me with one of the following links.

Buy me a coffee

Buy Me A Coffee

Cryptocurrency
  • BTC:
    • bc1qrtq0ygmxw7meak3ukvxn03za2j7t7s4uxuujct
  • Tron
    • TVQQdim3pxa4XoZyRRVHQ8GsY42rEgB4ow
  • USDT
    • TRC20
      • TVQQdim3pxa4XoZyRRVHQ8GsY42rEgB4ow
    • ERC20
      • 0xD5d931BB40F02Ed45172faebD805B3f0ba70Fe73
  • DogeCoin
    • DNFaHFzmUfeUB6NFgQX1sLn9q8kknTmKd8

카테고리

의존성

의존성 목록 1 개

  • plugin_platform_interface^2.0.2

소스 저장소

이 패키지를 사용하는 프로젝트