Skip to content

Commit 4d9b806

Browse files
committed
server
1 parent 8c35000 commit 4d9b806

4 files changed

Lines changed: 10 additions & 52 deletions

File tree

build_android.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
flutter build appbundle
2+
flutter build apk

lib/pages/main/main_btn.dart

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,7 @@ import 'package:vpn_client/design/colors.dart';
55
import 'package:vpn_client/design/dimensions.dart';
66
import 'package:vpnclient_engine_flutter/vpnclient_engine_flutter.dart';
77

8-
///
9-
import 'package:flutter_v2ray/flutter_v2ray.dart';
108

11-
final FlutterV2ray flutterV2ray = FlutterV2ray(
12-
onStatusChanged: (status) {
13-
// do something
14-
},
15-
);
16-
17-
///
189

1910
class MainBtn extends StatefulWidget {
2011
const MainBtn({super.key});
@@ -117,40 +108,7 @@ class MainBtnState extends State<MainBtn> with SingleTickerProviderStateMixin {
117108

118109
//END TODO
119110

120-
///
121-
// You must initialize V2Ray before using it.
122-
await flutterV2ray.initializeV2Ray();
123-
124-
// v2ray share link like vmess://, vless://, ...
125-
String link =
126-
"vless://c61daf3e-83ff-424f-a4ff-5bfcb46f0b30@5.35.98.91:8443?encryption=none&flow=&security=reality&sni=yandex.ru&fp=chrome&pbk=rLCmXWNVoRBiknloDUsbNS5ONjiI70v-BWQpWq0HCQ0&sid=108108108108#%F0%9F%87%B7%F0%9F%87%BA+%F0%9F%99%8F+Russia+%231";
127-
V2RayURL parser = FlutterV2ray.parseFromURL(link);
128-
129-
// Get Server Delay
130-
log(
131-
'${flutterV2ray.getServerDelay(config: parser.getFullConfiguration())}ms',
132-
name: 'ServerDelay',
133-
);
134-
135-
// Permission is not required if you using proxy only
136-
if (await flutterV2ray.requestPermission()) {
137-
flutterV2ray.startV2Ray(
138-
remark: parser.remark,
139-
// The use of parser.getFullConfiguration() is not mandatory,
140-
// and you can enter the desired V2Ray configuration in JSON format
141-
config: parser.getFullConfiguration(),
142-
blockedApps: null,
143-
bypassSubnets: null,
144-
proxyOnly: false,
145-
);
146-
}
147-
148-
// Disconnect
149-
///flutterV2ray.stopV2Ray();
150-
151-
///
152111

153-
//TODO:move to right place
154112
// =======
155113
//
156114
// >>>>>>> Stashed changes

pubspec.lock

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ packages:
177177
source: sdk
178178
version: "0.0.0"
179179
flutter_v2ray:
180-
dependency: "direct main"
180+
dependency: transitive
181181
description:
182182
name: flutter_v2ray
183183
sha256: "09dce3b4b58ea6a4220409d948a4d92a6eb3416184e6512ec0f5773fd48e5ab0"
@@ -541,11 +541,9 @@ packages:
541541
vpnclient_engine_flutter:
542542
dependency: "direct main"
543543
description:
544-
path: "."
545-
ref: c3bf79010c05a2474a24f763d428a61788a13e9b
546-
resolved-ref: c3bf79010c05a2474a24f763d428a61788a13e9b
547-
url: "https://github.com/VPNclient/VPNclient-engine-flutter.git"
548-
source: git
544+
path: "../VPNclient-engine-flutter"
545+
relative: true
546+
source: path
549547
version: "0.0.1"
550548
web:
551549
dependency: transitive

pubspec.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@ dependencies:
3838
flutter_native_splash: ^2.3.1
3939
flutter_bloc: ^9.0.0
4040
vpnclient_engine_flutter:
41-
git:
42-
url: https://github.com/VPNclient/VPNclient-engine-flutter.git
43-
ref: c3bf79010c05a2474a24f763d428a61788a13e9b
41+
path: ../VPNclient-engine-flutter
42+
# git:
43+
# url: https://github.com/VPNclient/VPNclient-engine-flutter.git
44+
# ref: c3bf79010c05a2474a24f763d428a61788a13e9b
4445

4546
# The following adds the Cupertino Icons font to your application.
4647
# Use with the CupertinoIcons class for iOS style icons.
4748
cupertino_icons: ^1.0.8
48-
flutter_v2ray: ^1.0.10
49+
#flutter_v2ray: ^1.0.10
4950

5051
dev_dependencies:
5152
flutter_test:

0 commit comments

Comments
 (0)