Skip to content

Commit 55de725

Browse files
Merge remote-tracking branch 'origin/dev' into release
2 parents b995b06 + b1e187f commit 55de725

5 files changed

Lines changed: 30 additions & 29 deletions

File tree

android/app/src/main/kotlin/com/defyx/defyx/VpnService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ class DefyxVpnService : VpnService() {
235235
updateNotification("DefyxVPN", "Disconnecting...")
236236
}
237237

238-
Android.stop()
238+
Android.stopVPN()
239239

240240
try {
241241
vpnInterface?.close()

ios/PacketTunnel/PacketTunnelProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class PacketTunnelProvider: NEPacketTunnelProvider {
7474
os_log("⏹ VPN stopped with reason: %d", reason.rawValue)
7575
os_log("⏹ Stopping VPN tunnel...")
7676
Socks5Tunnel.quit()
77-
IosStop()
77+
IosStopVPN()
7878
os_log("✅ Tunnel stopped successfully.")
7979
completionHandler()
8080
}

lib/modules/core/vpn.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class VPN {
2626
final log = Log();
2727
final analyticsService = FirebaseAnalyticsService();
2828
final alertService = AlertService();
29+
bool _isReconnectMode = false;
2930

3031
factory VPN(ProviderContainer container) {
3132
_instance._init(container);
@@ -215,8 +216,7 @@ class VPN {
215216
return;
216217
}
217218

218-
final isTunnelRunning = await _vpnBridge.isTunnelRunning();
219-
if (!isTunnelRunning) {
219+
if (!_isReconnectMode) {
220220
await _createTunnel();
221221
}
222222
connectionNotifier?.setConnected();
@@ -251,6 +251,7 @@ class VPN {
251251
loggerNotifier?.setLoading();
252252
connectionNotifier?.setAnalyzing();
253253
await vpnData?.disableVPN();
254+
_isReconnectMode = true;
254255
}
255256

256257
Future<void> refreshPing() async {
@@ -267,6 +268,7 @@ class VPN {
267268
await _vpnBridge.stopVPN();
268269
_clearData(ref);
269270
connectionNotifier.setDisconnected();
271+
_isReconnectMode = false;
270272
}
271273

272274
Future<void> _disconnect(WidgetRef ref) async {

lib/modules/main/presentation/widgets/connection_state_widgets.dart

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -254,23 +254,10 @@ class AnalyzingContent extends ConsumerWidget {
254254
Consumer(builder: (context, ref, child) {
255255
final deepScanEnabled =
256256
ref.read(settingsProvider.notifier).isDeepScanEnabled();
257-
if (deepScanEnabled) {
258-
return Container(
259-
margin: const EdgeInsets.only(bottom: 3.0),
260-
child: Text(
261-
"∞",
262-
style: TextStyle(
263-
color: const Color(0xFFA7A7A7),
264-
fontSize: 24.sp,
265-
fontFamily: 'Lato',
266-
fontWeight: FontWeight.w400,
267-
),
268-
));
269-
}
270257

271258
final flowLineState = ref.watch(flowLineStepProvider);
272259
final currentStep = flowLineState.step;
273-
final totalSteps = flowLineState.totalSteps;
260+
final totalSteps = deepScanEnabled ? "∞" : flowLineState.totalSteps;
274261

275262
if (totalSteps == 0 || currentStep == 0) {
276263
return Shimmer.fromColors(
@@ -281,16 +268,28 @@ class AnalyzingContent extends ConsumerWidget {
281268
);
282269
}
283270

284-
return Text(
285-
"$currentStep/$totalSteps",
286-
textAlign: TextAlign.start,
287-
style: TextStyle(
288-
color: const Color(0xFFA7A7A7),
289-
fontSize: 16.sp,
290-
fontFamily: 'Lato',
291-
fontWeight: FontWeight.w300,
271+
return Row(children: [
272+
Text(
273+
"$currentStep/",
274+
textAlign: TextAlign.start,
275+
style: TextStyle(
276+
color: const Color(0xFFA7A7A7),
277+
fontSize: 16.sp,
278+
fontFamily: 'Lato',
279+
fontWeight: FontWeight.w300,
280+
),
292281
),
293-
);
282+
Text(
283+
"$totalSteps",
284+
textAlign: TextAlign.start,
285+
style: TextStyle(
286+
color: const Color(0xFFA7A7A7),
287+
fontSize: deepScanEnabled ? 24.sp : 16.sp,
288+
fontFamily: 'Lato',
289+
fontWeight: FontWeight.w400,
290+
),
291+
),
292+
]);
294293
}),
295294
SizedBox(width: 10.w),
296295
AppIcons.arrowLeft(width: 14.w, height: 14.h),

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: defyx_vpn
22
description: "A new Vpn app"
33
publish_to: "none"
4-
version: 4.3.0+240
4+
version: 4.3.1+241
55

66
environment:
77
sdk: ^3.5.3
@@ -103,7 +103,7 @@ msix_config:
103103
display_name: Defyx VPN
104104
publisher_display_name: UnboundTech UG
105105
identity_name: UnboundTechUG.6065AEC5A207
106-
msix_version: 4.3.0.0
106+
msix_version: 4.3.1.0
107107
publisher: "CN=62937938-2AE2-4C12-9ED8-4C418C0CADF2"
108108
logo_path: assets/images/logo.png
109109
capabilities: runFullTrust,internetClientServer,privateNetworkClientServer,unvirtualizedResources

0 commit comments

Comments
 (0)