Skip to content

Commit 1c4288e

Browse files
authored
Merge pull request #12 from VPNclient/revert-9-development
Revert "Merge development to main (#9)"
2 parents 6acd460 + fd8b8cb commit 1c4288e

53 files changed

Lines changed: 342 additions & 1324 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: 0 additions & 16 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 6 additions & 8 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@v4
48+
- uses: actions/upload-artifact@v3
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@v4
63+
- uses: actions/upload-artifact@v3
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@v4
78+
- uses: actions/upload-artifact@v3
7979
with:
8080
name: macos-app
8181
path: build/macos/Build/Products/Release
@@ -85,14 +85,12 @@ 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
9088
- uses: actions/checkout@v4
9189
- uses: subosito/flutter-action@v2
9290
with:
9391
flutter-version: ${{ env.FLUTTER_VERSION }}
9492
- run: flutter build windows --release
95-
- uses: actions/upload-artifact@v4
93+
- uses: actions/upload-artifact@v3
9694
with:
9795
name: windows-app
9896
path: build/windows/runner/Release
@@ -109,7 +107,7 @@ jobs:
109107
- run: |
110108
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev
111109
flutter build linux --release
112-
- uses: actions/upload-artifact@v4
110+
- uses: actions/upload-artifact@v3
113111
with:
114112
name: linux-app
115113
path: build/linux/x64/release/bundle
@@ -120,7 +118,7 @@ jobs:
120118
runs-on: ubuntu-latest
121119
if: github.event_name == 'push' && contains(github.ref, 'tags')
122120
steps:
123-
- uses: actions/download-artifact@v4
121+
- uses: actions/download-artifact@v3
124122
with:
125123
path: artifacts
126124
- uses: softprops/action-gh-release@v1

.github/workflows/quality.yml

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

README.md

Lines changed: 42 additions & 44 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,39 +46,37 @@ 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-
### Install a Pre-built Release (End Users)
49+
**1. 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=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.
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.
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-
### Build from Source (Developers)
56+
**2. Build from Source (Developers):**
5757
If you want to try the latest version or modify the app, you can build it yourself:
5858

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.
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.
8280

8381
## Usage Guide
8482

@@ -89,9 +87,9 @@ Once the VPNclient App is installed and running, using it is straightforward:
8987
- **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.
9088
- **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.
9189
- **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:
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.
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.
9593
- **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.
9694
- **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.
9795
- **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: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if (keystorePropertiesFile.exists()) {
1616
}
1717

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

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

3131
defaultConfig {
32-
applicationId = "click.vpnclient"
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.
3336
minSdk = flutter.minSdkVersion
3437
targetSdk = flutter.targetSdkVersion
3538
versionCode = flutter.versionCode
@@ -38,24 +41,19 @@ android {
3841

3942
signingConfigs {
4043
create("release") {
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-
}
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
4748
}
4849
}
49-
5050
buildTypes {
5151
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-
}
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")
5756

58-
isMinifyEnabled = true
5957
}
6058
}
6159
}

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

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

3+
//
34
import android.content.Intent
45
import android.net.VpnService
56
import android.os.Bundle
67
import io.flutter.plugin.common.MethodChannel
8+
//
79

810
import io.flutter.embedding.android.FlutterActivity
911

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

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

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

android/settings.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,9 @@ 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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flutter build appbundle

build_ipa.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
flutter build ipa

0 commit comments

Comments
 (0)