Skip to content

Commit f48b8f6

Browse files
committed
fix user ca'a, test job
1 parent 1b29321 commit f48b8f6

6 files changed

Lines changed: 76 additions & 22 deletions

File tree

.github/workflows/build.yaml

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- dev
77
- "release/**"
88
- "hotfix/**"
9+
- 'use-system-certs-android'
910
tags:
1011
- v*.*.*
1112
paths-ignore:
@@ -54,17 +55,17 @@ jobs:
5455
- name: Build iOS
5556
run: flutter build ipa --release --obfuscate --split-debug-info=build/debug-info --build-number=${{ github.run_number }}
5657

57-
- name: Upload app to TestFlight
58-
uses: apple-actions/upload-testflight-build@v3
59-
# Mobile applications are published to the App Store manually, with release tags applied
60-
# post-publication. To avoid redundant uploads, this step executes only for non-tagged
61-
# builds, ensuring tagged releases are distributed exclusively to GitHub.
62-
if: "!startsWith(github.ref, 'refs/tags/')"
63-
with:
64-
app-path: "client/build/ios/ipa/Defguard.ipa"
65-
issuer-id: ${{ secrets.API_ISSUER_ID }}
66-
api-key-id: ${{ secrets.ASC_API_KEY_ID }}
67-
api-private-key: ${{ secrets.PRIVATE_KEY_CONTENTS }}
58+
# - name: Upload app to TestFlight
59+
# uses: apple-actions/upload-testflight-build@v3
60+
# # Mobile applications are published to the App Store manually, with release tags applied
61+
# # post-publication. To avoid redundant uploads, this step executes only for non-tagged
62+
# # builds, ensuring tagged releases are distributed exclusively to GitHub.
63+
# if: "!startsWith(github.ref, 'refs/tags/')"
64+
# with:
65+
# app-path: "client/build/ios/ipa/Defguard.ipa"
66+
# issuer-id: ${{ secrets.API_ISSUER_ID }}
67+
# api-key-id: ${{ secrets.ASC_API_KEY_ID }}
68+
# api-private-key: ${{ secrets.PRIVATE_KEY_CONTENTS }}
6869

6970
build-android:
7071
runs-on: [self-hosted, macOS]
@@ -112,17 +113,17 @@ jobs:
112113
keyStorePassword: "${{ secrets.ANDROID_KEYSTORE_PASSWORD }}"
113114
keyPassword: "${{ secrets.ANDROID_KEYSTORE_PASSWORD }}"
114115

115-
- name: Publish to Play Store
116-
uses: r0adkll/upload-google-play@v1
117-
# Mobile applications are published to the Play Store manually, with release tags applied
118-
# post-publication. To avoid redundant uploads, this step executes only for non-tagged
119-
# builds, ensuring tagged releases are distributed exclusively to GitHub.
120-
if: "!startsWith(github.ref, 'refs/tags/')"
121-
with:
122-
serviceAccountJsonPlainText: "${{ secrets.ANDROID_SERVICE_ACCOUNT_JSON }}"
123-
packageName: net.defguard.mobile
124-
releaseFiles: client/build/app/outputs/bundle/release/app-release.aab
125-
track: internal
116+
# - name: Publish to Play Store
117+
# uses: r0adkll/upload-google-play@v1
118+
# # Mobile applications are published to the Play Store manually, with release tags applied
119+
# # post-publication. To avoid redundant uploads, this step executes only for non-tagged
120+
# # builds, ensuring tagged releases are distributed exclusively to GitHub.
121+
# if: "!startsWith(github.ref, 'refs/tags/')"
122+
# with:
123+
# serviceAccountJsonPlainText: "${{ secrets.ANDROID_SERVICE_ACCOUNT_JSON }}"
124+
# packageName: net.defguard.mobile
125+
# releaseFiles: client/build/app/outputs/bundle/release/app-release.aab
126+
# track: internal
126127

127128
- name: Upload Android Artifact
128129
uses: actions/upload-artifact@v4

client/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
android:enableOnBackInvokedCallback="true"
1818
android:allowBackup="false"
1919
android:fullBackupContent="false"
20+
android:networkSecurityConfig="@xml/network_security_config"
2021
android:dataExtractionRules="@xml/data_extraction_rules">
2122
<activity
2223
android:name=".MainActivity"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<network-security-config>
3+
<base-config>
4+
<trust-anchors>
5+
<certificates src="system" />
6+
<certificates src="user" />
7+
</trust-anchors>
8+
</base-config>
9+
</network-security-config>

client/lib/open/api.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import 'package:cookie_jar/cookie_jar.dart';
55
import 'package:device_info_plus/device_info_plus.dart';
66
import 'package:dio/dio.dart';
77
import 'package:dio_cookie_manager/dio_cookie_manager.dart';
8+
import 'package:native_dio_adapter/native_dio_adapter.dart';
89
import 'package:mobile/data/db/enums.dart';
910
import 'package:mobile/data/proto/client_platform_info.pb.dart';
1011
import 'package:mobile/data/proxy/config.dart';
@@ -45,6 +46,7 @@ class _ProxyApi {
4546
);
4647

4748
_ProxyApi._internal() {
49+
_dio.httpClientAdapter = NativeAdapter();
4850
final cookieJar = CookieJar();
4951
_dio.interceptors.add(CookieManager(cookieJar));
5052
_dio.interceptors.add(TalkerDioLogger(talker: talker));

client/pubspec.lock

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,14 @@ packages:
281281
url: "https://pub.dev"
282282
source: hosted
283283
version: "1.15.0"
284+
cronet_http:
285+
dependency: transitive
286+
description:
287+
name: cronet_http
288+
sha256: "8e77bc6f203e0bc9126e6a9092508a3435dbcb04da3b53ed1a358909385c5e0e"
289+
url: "https://pub.dev"
290+
source: hosted
291+
version: "1.8.0"
284292
cross_file:
285293
dependency: transitive
286294
description:
@@ -305,6 +313,14 @@ packages:
305313
url: "https://pub.dev"
306314
source: hosted
307315
version: "1.0.2"
316+
cupertino_http:
317+
dependency: transitive
318+
description:
319+
name: cupertino_http
320+
sha256: "82cbec60c90bf785a047a9525688b6dacac444e177e1d5a5876963d3c50369e8"
321+
url: "https://pub.dev"
322+
source: hosted
323+
version: "2.4.0"
308324
cupertino_icons:
309325
dependency: "direct main"
310326
description:
@@ -752,6 +768,14 @@ packages:
752768
url: "https://pub.dev"
753769
source: hosted
754770
version: "4.1.2"
771+
http_profile:
772+
dependency: transitive
773+
description:
774+
name: http_profile
775+
sha256: "7e679e355b09aaee2ab5010915c932cce3f2d1c11c3b2dc177891687014ffa78"
776+
url: "https://pub.dev"
777+
source: hosted
778+
version: "0.1.0"
755779
image:
756780
dependency: transitive
757781
description:
@@ -776,6 +800,14 @@ packages:
776800
url: "https://pub.dev"
777801
source: hosted
778802
version: "1.0.5"
803+
jni:
804+
dependency: transitive
805+
description:
806+
name: jni
807+
sha256: "8706a77e94c76fe9ec9315e18949cc9479cc03af97085ca9c1077b61323ea12d"
808+
url: "https://pub.dev"
809+
source: hosted
810+
version: "0.15.2"
779811
js:
780812
dependency: transitive
781813
description:
@@ -920,6 +952,14 @@ packages:
920952
url: "https://pub.dev"
921953
source: hosted
922954
version: "7.2.0"
955+
native_dio_adapter:
956+
dependency: "direct main"
957+
description:
958+
name: native_dio_adapter
959+
sha256: "9bbfa5221fd287eb063962bbe6534290e5f87933e576fac210149fb80253b89a"
960+
url: "https://pub.dev"
961+
source: hosted
962+
version: "1.5.1"
923963
native_toolchain_c:
924964
dependency: transitive
925965
description:

client/pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ dependencies:
5050
cookie_jar: ^4.0.8
5151
dio: ^5.8.0+1
5252
dio_cookie_manager: ^3.2.0
53+
native_dio_adapter: ^1.3.0
5354
flutter_native_splash: ^2.4.6
5455
flutter_launcher_icons: ^0.14.4
5556
flutter_svg: ^2.1.0

0 commit comments

Comments
 (0)