Skip to content

Commit 6acd460

Browse files
authored
Merge development to main (#9)
Added localization Fix GitHub Actions Make android signing optional Remove build/run scripts Remove vpnclient-engine project include from android Update flutter version to v3.29.3
1 parent b2868d9 commit 6acd460

53 files changed

Lines changed: 1324 additions & 342 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root=true
2+
3+
[*.md]
4+
indent_style=tab
5+
6+
[*.{yml,yaml}]
7+
indent_style=space
8+
indent_size=2
9+
10+
[*.{kt,kts}]
11+
indent_style=space
12+
indent_size=4
13+
14+
[*.dart]
15+
indent_style=space
16+
indent_size=2

.github/workflows/main.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
java-version: '17'
4646
distribution: 'temurin'
4747
- run: flutter build apk --release
48-
- uses: actions/upload-artifact@v3
48+
- uses: actions/upload-artifact@v4
4949
with:
5050
name: android-apk
5151
path: build/app/outputs/flutter-apk/app-release.apk
@@ -60,7 +60,7 @@ jobs:
6060
with:
6161
flutter-version: ${{ env.FLUTTER_VERSION }}
6262
- run: flutter build ios --release --no-codesign
63-
- uses: actions/upload-artifact@v3
63+
- uses: actions/upload-artifact@v4
6464
with:
6565
name: ios-app
6666
path: build/ios/Release
@@ -75,7 +75,7 @@ jobs:
7575
with:
7676
flutter-version: ${{ env.FLUTTER_VERSION }}
7777
- run: flutter build macos --release
78-
- uses: actions/upload-artifact@v3
78+
- uses: actions/upload-artifact@v4
7979
with:
8080
name: macos-app
8181
path: build/macos/Build/Products/Release
@@ -85,12 +85,14 @@ jobs:
8585
needs: [analyze, test]
8686
runs-on: windows-latest
8787
steps:
88+
- name: Enable long paths on Windows
89+
run: git config --system core.longpaths true
8890
- uses: actions/checkout@v4
8991
- uses: subosito/flutter-action@v2
9092
with:
9193
flutter-version: ${{ env.FLUTTER_VERSION }}
9294
- run: flutter build windows --release
93-
- uses: actions/upload-artifact@v3
95+
- uses: actions/upload-artifact@v4
9496
with:
9597
name: windows-app
9698
path: build/windows/runner/Release
@@ -107,7 +109,7 @@ jobs:
107109
- run: |
108110
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev
109111
flutter build linux --release
110-
- uses: actions/upload-artifact@v3
112+
- uses: actions/upload-artifact@v4
111113
with:
112114
name: linux-app
113115
path: build/linux/x64/release/bundle
@@ -118,7 +120,7 @@ jobs:
118120
runs-on: ubuntu-latest
119121
if: github.event_name == 'push' && contains(github.ref, 'tags')
120122
steps:
121-
- uses: actions/download-artifact@v3
123+
- uses: actions/download-artifact@v4
122124
with:
123125
path: artifacts
124126
- uses: softprops/action-gh-release@v1

.github/workflows/quality.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
- run: flutter pub get
1414
- run: dart format --set-exit-if-changed .
1515
- run: flutter analyze
16+
- run: flutter test
1617
- name: Run Dart Code Metrics
18+
run: |
1719
dart pub global activate dart_code_metrics
1820
dart pub global run dart_code_metrics:metrics analyze lib

README.md

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ VPNclient App is architected in layers to separate the user interface from core
2222

2323
```mermaid
2424
flowchart LR
25-
subgraph subGraph0["Flutter Application"]
26-
UI@{ label: "VPNclient App (<span style=\"color:\">Flutter UI)</span>" }
27-
end
28-
subgraph subGraph1["Flutter Plugin"]
29-
Plugin["VPNclient Engine Flutter"]
30-
end
31-
subgraph subGraph2["Native Core"]
32-
Core["VPNclient Engine Library"]
33-
end
34-
UI --> Plugin
35-
Plugin --> Core
36-
Core --> iOS["iOS"] & Android["Android"] & macOS["macOS"] & Windows["Windows"] & Linux["Linux"]
37-
38-
UI@{ shape: rect}
25+
subgraph subGraph0["Flutter Application"]
26+
UI@{ label: "VPNclient App (<span style=\"color:\">Flutter UI)</span>" }
27+
end
28+
subgraph subGraph1["Flutter Plugin"]
29+
Plugin["VPNclient Engine Flutter"]
30+
end
31+
subgraph subGraph2["Native Core"]
32+
Core["VPNclient Engine Library"]
33+
end
34+
UI --> Plugin
35+
Plugin --> Core
36+
Core --> iOS["iOS"] & Android["Android"] & macOS["macOS"] & Windows["Windows"] & Linux["Linux"]
37+
38+
UI@{ shape: rect}
3939
```
4040

4141
*Diagram: The Flutter UI calls into the VPNclient Engine via a Flutter plugin. The native engine runs on each supported platform (iOS, Android, etc.), handling low-level network operations.*
@@ -46,37 +46,39 @@ This modular design makes it easy to maintain and extend. UI/UX changes can be m
4646

4747
There are two ways to get VPNclient App:
4848

49-
**1. Install a Pre-built Release (End Users):**
49+
### Install a Pre-built Release (End Users)
5050
VPNclient App is in active development and available in beta form:
51-
- **Android:** Download via Google Play [VPNclient on Google Play](https://play.google.com/store/apps/details?id=vpnclient.click) (or join the testing program). Requires Android 6.0 or higher.
52-
- **iOS:** Download via App Store – [VPNclient on App Store](https://testflight.apple.com/join/KQr4SeS7). Requires iOS 15.6 or higher.
51+
- **Android:** Download via Google Play [VPNclient on Google Play](https://play.google.com/store/apps/details?id=click.vpnclient) (or join the testing program). Requires Android 6.0 or higher.
52+
- **iOS:** Download via App Store – [VPNclient on App Store](https://testflight.apple.com/join/KQr4SeS7). Requires iOS 15.6 or higher.
5353

5454
After installing, simply launch the app. On first launch, you may be prompted to accept VPN permissions (Android) or install a VPN profile (iOS) – these are required to create the VPN tunnel.
5555

56-
**2. Build from Source (Developers):**
56+
### Build from Source (Developers)
5757
If you want to try the latest version or modify the app, you can build it yourself:
5858

59-
- **Prerequisites:** Install Flutter (Flutter 3 or later recommended) and Dart SDK on your system. Ensure you can run `flutter` commands and have setup Flutter for your target platforms (e.g. Xcode for iOS, Android SDK for Android).
60-
- **Clone the Repositories:** This app depends on the VPNclient Engine Flutter plugin. Clone the following repository from GitHub:
61-
```bash
62-
git clone https://github.com/VPNclient/VPNclient-app.git
63-
```
64-
- **Get Dependencies:** Navigate into the `VPNclient-app` directory and run:
65-
```bash
66-
flutter pub get
67-
```
68-
This will fetch Flutter packages and link the local plugin.
69-
- **Platform Setup:**
70-
- For **Android**, ensure you have an Android device/emulator and the Android SDK. The app uses the VpnService API; no additional setup is required except granting VPN permissions when prompted.
71-
- For **iOS**, open the Xcode workspace (`ios/Runner.xcworkspace`) and **enable the “Personal VPN” capability** in the project (this automatically updates entitlements). Also, in `ios/Runner/Info.plist`, ensure the required VPN usage descriptions are present (the engine may use a custom key such as `allow-vpn`). You will need a valid Apple Developer Team provisioning for running VPN entitlements on device.
72-
- For **macOS/Windows/Linux**, additional setup may be needed (e.g., on Windows, the `wintun` driver should be present; on Linux, you might need root or capabilities to create a TUN interface). Desktop support is experimental and may require manual configuration.
73-
- **Run the App:** Use Flutter CLI to run on your desired platform:
74-
```bash
75-
flutter run
76-
```
77-
This will launch the app on an emulator or connected device. You can also build release APKs or app bundles using `flutter build apk` / `flutter build appbundle` (Android) or an IPA (iOS) with Xcode. For desktop, `flutter run -d macos` or `-d windows` can be used if enabled.
78-
79-
*Note:* The repository includes helper shell scripts (`build_android.sh`, `build_ipa.sh`, etc.) which automate some build steps for CI or local packaging.
59+
1. **Prerequisites:** Install Flutter (Flutter 3 or later recommended) and Dart SDK on your system. Ensure you can run `flutter` commands and have setup Flutter for your target platforms (e.g. Xcode for iOS, Android SDK for Android).
60+
61+
2. **Clone the Repositories:** This app depends on the VPNclient Engine Flutter plugin. Clone the following repository from GitHub:
62+
```sh
63+
git clone https://github.com/VPNclient/VPNclient-app.git
64+
```
65+
66+
3. **Get Dependencies:** Navigate into the `VPNclient-app` directory and run:
67+
```sh
68+
flutter pub get
69+
```
70+
This will fetch Flutter packages and link the local plugin.
71+
72+
4. **Platform Setup:**
73+
- For **Android**, ensure you have an Android device/emulator and the Android SDK. The app uses the VpnService API; no additional setup is required except granting VPN permissions when prompted.
74+
- For **iOS**, open the Xcode workspace (`ios/Runner.xcworkspace`) and **enable the “Personal VPN” capability** in the project (this automatically updates entitlements). Also, in `ios/Runner/Info.plist`, ensure the required VPN usage descriptions are present (the engine may use a custom key such as `allow-vpn`). You will need a valid Apple Developer Team provisioning for running VPN entitlements on device.
75+
- For **macOS/Windows/Linux**, additional setup may be needed (e.g., on Windows, the `wintun` driver should be present; on Linux, you might need root or capabilities to create a TUN interface). Desktop support is experimental and may require manual configuration.
76+
77+
5. **Run the App:** Use Flutter CLI to run on your desired platform:
78+
```sh
79+
flutter run
80+
```
81+
This will launch the app on an emulator or connected device. You can also build release APKs or app bundles using `flutter build apk` / `flutter build appbundle` (Android). There is also a lot of other option to build, you can use `flutter build -h` to list all avaliable options.
8082

8183
## Usage Guide
8284

@@ -87,9 +89,9 @@ Once the VPNclient App is installed and running, using it is straightforward:
8789
- **Connecting:** On the main screen, tap the **Connect** button (often a large toggle or icon). The first time, your device will ask for VPN connection permission – accept it. The app will then initiate the connection using the selected server and protocol. Within a few seconds, you should see the status change to "Connected", along with a key icon on your status bar (mobile) indicating an active VPN.
8890
- **During Connection:** While connected, the app may show real-time stats such as upload/download speeds and total data used this session. It will also indicate the current server name or IP. If any error occurs (e.g., invalid credentials or network unreachable), the app will display an error message.
8991
- **Routing Rules:** If you want to customize which traffic goes through the VPN, go to the **Settings** or **Routing** section. Here you can add rules. For example:
90-
- Route specific apps through VPN (e.g., route your web browser and video apps through the VPN for privacy, but let banking apps go direct).
91-
- Route or block specific domains (e.g., send `*.example.com` through VPN or block `ads.example.net`).
92-
Set your desired rules and save. The VPNclient Engine will enforce these rules when connected.
92+
- Route specific apps through VPN (e.g., route your web browser and video apps through the VPN for privacy, but let banking apps go direct).
93+
- Route or block specific domains (e.g., send `*.example.com` through VPN or block `ads.example.net`).
94+
Set your desired rules and save. The VPNclient Engine will enforce these rules when connected.
9395
- **Disconnecting:** To stop the VPN, tap the **Disconnect** button. The status will change to "Disconnected" and your internet traffic will resume normal direct routing. You can reconnect at any time by tapping Connect again.
9496
- **Auto-Connect & Kill Switch:** In settings, you may enable **Auto-Connect** so that the app automatically connects to the last used or a preferred server on startup or when it detects internet connectivity. Enabling the **Kill Switch** ensures that if the VPN drops, the app will block all internet traffic until the VPN is reconnected (preventing leaks). Use these features if you require always-on protection.
9597
- **Profiles and Configs:** If you use multiple VPN profiles (for example, personal VPN vs. work VPN), you can manage them via separate subscription links or configuration import. The app can handle multiple profiles – they will be listed separately. Select the profile or server group you want before connecting.

android/app/build.gradle.kts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (keystorePropertiesFile.exists()) {
1616
}
1717

1818
android {
19-
namespace = "vpnclient.click"
19+
namespace = "click.vpnclient"
2020
compileSdk = flutter.compileSdkVersion
2121

2222
compileOptions {
@@ -29,10 +29,7 @@ android {
2929
}
3030

3131
defaultConfig {
32-
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
33-
applicationId = "vpnclient.click"
34-
// You can update the following values to match your application needs.
35-
// For more information, see: https://flutter.dev/to/review-gradle-config.
32+
applicationId = "click.vpnclient"
3633
minSdk = flutter.minSdkVersion
3734
targetSdk = flutter.targetSdkVersion
3835
versionCode = flutter.versionCode
@@ -41,19 +38,24 @@ android {
4138

4239
signingConfigs {
4340
create("release") {
44-
keyAlias = keystoreProperties["keyAlias"] as String
45-
keyPassword = keystoreProperties["keyPassword"] as String
46-
storeFile = keystoreProperties["storeFile"]?.let { file(it) }
47-
storePassword = keystoreProperties["storePassword"] as String
41+
if (keystorePropertiesFile.exists()) {
42+
keyAlias = keystoreProperties["keyAlias"] as String
43+
keyPassword = keystoreProperties["keyPassword"] as String
44+
storeFile = keystoreProperties["storeFile"]?.let { file(it) }
45+
storePassword = keystoreProperties["storePassword"] as String
46+
}
4847
}
4948
}
49+
5050
buildTypes {
5151
release {
52-
// TODO: Add your own signing config for the release build.
53-
// Signing with the debug keys for now, so `flutter run --release` works.
54-
// signingConfig = signingConfigs.getByName("debug")
55-
signingConfig = signingConfigs.getByName("release")
52+
if (keystorePropertiesFile.exists()) {
53+
signingConfig = signingConfigs.getByName("release")
54+
} else {
55+
println("Warning: No release signing config defined, the release build will be unsigned.")
56+
}
5657

58+
isMinifyEnabled = true
5759
}
5860
}
5961
}

android/app/src/main/kotlin/vpnclient/click/MainActivity.kt renamed to android/app/src/main/kotlin/click/vpnclient/MainActivity.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
package vpnclient.click
1+
package click.vpnclient
22

3-
//
43
import android.content.Intent
54
import android.net.VpnService
65
import android.os.Bundle
76
import io.flutter.plugin.common.MethodChannel
8-
//
97

108
import io.flutter.embedding.android.FlutterActivity
119

android/app/src/main/kotlin/vpnclient/click/VPNService.kt renamed to android/app/src/main/kotlin/click/vpnclient/VPNService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package vpnclient.click
1+
package click.vpnclient
22

33
import android.net.VpnService
44
import android.os.ParcelFileDescriptor

android/settings.gradle.kts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,3 @@ plugins {
2323
}
2424

2525
include(":app")
26-
27-
val targetPath = File(settingsDir, "../../VPNclient-engine/android")
28-
println("[DEBUG111] Expected project dir: ${targetPath.absolutePath}")
29-
30-
include(":vpnclient-engine-android")
31-
project(":vpnclient-engine-android").projectDir = targetPath

build_android.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

build_ipa.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)