[PR #158] [MERGED] OpenVPN over Cloak for Android and iOS #1624

Closed
opened 2026-10-13 20:46:05 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-client/pull/158
Author: @outspace
Created: 1/20/2023
Status: ✅ Merged
Merged: 5/23/2023
Merged by: @pokamest

Base: dev ← Head: android_pt_transport_source


📝 Commits (10+)

  • 0bb4ad2 Add android OpenVPN3 submodules
  • 995a60c Remove prebuilded native libraries
  • a19e69a Update swig output
  • 82e831f Add Cloak plugin android build script
  • 32b355a Update deploy env for GO support
  • 799c3ec Remove strip from plugin build script
  • 3f265b8 Remove prebuilded native libraries from cmake
  • cc93898 Add lzo module for Android build
  • 2d624b3 Add android plugin into apk
  • 9a67d26 Remove unused files

📊 Changes

94 files changed (+3212 additions, -1287 deletions)

View changed files

📝 .github/workflows/deploy.yml (+5 -0)
📝 .gitmodules (+25 -4)
📝 CMakeLists.txt (+1 -1)
📝 client/3rd/OpenVPNAdapter (+1 -1)
📝 client/CMakeLists.txt (+6 -13)
📝 client/android/build.gradle (+17 -9)
➕ client/android/cpp/CMakeLists.txt (+267 -0)
➕ client/android/cpp/GetGitRevisionDescription.cmake (+169 -0)
➕ client/android/cpp/GetGitRevisionDescription.cmake.in (+42 -0)
➕ client/android/cpp/asio (+1 -0)
➕ client/android/cpp/cloak (+1 -0)
➕ client/android/cpp/cloak.cmake (+50 -0)
➕ client/android/cpp/lz4 (+1 -0)
➕ client/android/cpp/lz4.cmake (+7 -0)
➕ client/android/cpp/lzo (+1 -0)
➕ client/android/cpp/lzo.cmake (+78 -0)
➕ client/android/cpp/mbedtls (+1 -0)
➕ client/android/cpp/minivpn/minivpn.c (+0 -0)
➕ client/android/cpp/openssl (+1 -0)
➕ client/android/cpp/openvpn (+1 -0)

...and 74 more files

📄 Description

  • Remove prebuilded android native libraries and build them from sources.
  • Change openvpn native libraries for libraries with pt transport.
  • Build openvpn pt transport plugin from sources.

This PR adds support for a "Cloak PT transport" into the android OpenVPN library.

PT transport is disabled by default. You need to enable PT transport by setUsePluggableTransports call and export environment CLOAK_CONFIG with Cloak config. CLOAK_CONFIG is base64 encoded.
setUsePluggableTransports function in swig output.

Example:

qputenv("CLOAK_CONFIG", "ewogICAgIkJyb3dzZXJTaWciOiAiY2hyb21lIiwKICAgICJFbmNyeXB0aW9uTWV0aG9kIjogImFlcy1nY20iLAogICAgIk51bUNvbm4iOiAxLAogICAgIlByb3h5TWV0aG9kIjogIm9wZW52cG4iLAogICAgIlB1YmxpY0tleSI6ICIyNVJzbmkrTmo3U01KVTl0TE04ejRhYXNZWHdpUCtDMkVkS0xyS21MbndjPSIsCiAgICAiU2VydmVyTmFtZSI6ICJ0aWxlLm9wZW5zdHJlZXRtYXAub3JnIiwKICAgICJTdHJlYW1UaW1lb3V0IjogMzAwLAogICAgIlRyYW5zcG9ydCI6ICJkaXJlY3QiLAogICAgIlVJRCI6ICJueEMxSVRaeDhpZXg1bUVjeDlTbkZnPT0iLAogICAgIlJlbW90ZVBvcnQiOiAiNDQzIiwKICAgICJSZW1vdGVIb3N0IjogIjE5Mi4xNjguMS4xMDQiCn0=");

Note:

  1. NumConn in the config should be 1
  2. remote port and IP sets by variable RemotePort and RemoteHost
  3. OpenVPN must be configured for TCP transport.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amnezia-client/pull/158 **Author:** [@outspace](https://github.com/outspace) **Created:** 1/20/2023 **Status:** ✅ Merged **Merged:** 5/23/2023 **Merged by:** [@pokamest](https://github.com/pokamest) **Base:** `dev` ← **Head:** `android_pt_transport_source` --- ### 📝 Commits (10+) - [`0bb4ad2`](https://github.com/amnezia-vpn/amnezia-client/commit/0bb4ad2fbe33c1de7745e7a77e09234ea0a21600) Add android OpenVPN3 submodules - [`995a60c`](https://github.com/amnezia-vpn/amnezia-client/commit/995a60c5034d490c58834f41a7a851fca67ac605) Remove prebuilded native libraries - [`a19e69a`](https://github.com/amnezia-vpn/amnezia-client/commit/a19e69ae61843b897f76e2732b1f400fd3ab1f8f) Update swig output - [`82e831f`](https://github.com/amnezia-vpn/amnezia-client/commit/82e831f6d89f0625dcd93f7e891929f032e354cd) Add Cloak plugin android build script - [`32b355a`](https://github.com/amnezia-vpn/amnezia-client/commit/32b355a54e2ce3bd9a2f11506aeba993b273dcfb) Update deploy env for GO support - [`799c3ec`](https://github.com/amnezia-vpn/amnezia-client/commit/799c3ec6e66ac0bdc99a302ede213e3a15435d24) Remove strip from plugin build script - [`3f265b8`](https://github.com/amnezia-vpn/amnezia-client/commit/3f265b899eae6bb67af2386019fd0fac4d5ab349) Remove prebuilded native libraries from cmake - [`cc93898`](https://github.com/amnezia-vpn/amnezia-client/commit/cc93898c60f889229ef10451962c375e1af44fab) Add lzo module for Android build - [`2d624b3`](https://github.com/amnezia-vpn/amnezia-client/commit/2d624b3b59b29be189ce3f6e9a21cfeafd1b2c13) Add android plugin into apk - [`9a67d26`](https://github.com/amnezia-vpn/amnezia-client/commit/9a67d2684ec431fb93de8770086b58538a8c07e0) Remove unused files ### 📊 Changes **94 files changed** (+3212 additions, -1287 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/deploy.yml` (+5 -0) 📝 `.gitmodules` (+25 -4) 📝 `CMakeLists.txt` (+1 -1) 📝 `client/3rd/OpenVPNAdapter` (+1 -1) 📝 `client/CMakeLists.txt` (+6 -13) 📝 `client/android/build.gradle` (+17 -9) ➕ `client/android/cpp/CMakeLists.txt` (+267 -0) ➕ `client/android/cpp/GetGitRevisionDescription.cmake` (+169 -0) ➕ `client/android/cpp/GetGitRevisionDescription.cmake.in` (+42 -0) ➕ `client/android/cpp/asio` (+1 -0) ➕ `client/android/cpp/cloak` (+1 -0) ➕ `client/android/cpp/cloak.cmake` (+50 -0) ➕ `client/android/cpp/lz4` (+1 -0) ➕ `client/android/cpp/lz4.cmake` (+7 -0) ➕ `client/android/cpp/lzo` (+1 -0) ➕ `client/android/cpp/lzo.cmake` (+78 -0) ➕ `client/android/cpp/mbedtls` (+1 -0) ➕ `client/android/cpp/minivpn/minivpn.c` (+0 -0) ➕ `client/android/cpp/openssl` (+1 -0) ➕ `client/android/cpp/openvpn` (+1 -0) _...and 74 more files_ </details> ### 📄 Description - Remove prebuilded android native libraries and build them from sources. - Change openvpn native libraries for libraries with pt transport. - Build openvpn pt transport plugin from sources. This PR adds support for a "[Cloak PT transport](https://github.com/amnezia-vpn/Cloak)" into the android OpenVPN library. # PT transport is disabled by default. You need to enable PT transport by setUsePluggableTransports call and export environment CLOAK_CONFIG with Cloak config. CLOAK_CONFIG is base64 encoded. setUsePluggableTransports function in swig output. # Example: `qputenv("CLOAK_CONFIG", "ewogICAgIkJyb3dzZXJTaWciOiAiY2hyb21lIiwKICAgICJFbmNyeXB0aW9uTWV0aG9kIjogImFlcy1nY20iLAogICAgIk51bUNvbm4iOiAxLAogICAgIlByb3h5TWV0aG9kIjogIm9wZW52cG4iLAogICAgIlB1YmxpY0tleSI6ICIyNVJzbmkrTmo3U01KVTl0TE04ejRhYXNZWHdpUCtDMkVkS0xyS21MbndjPSIsCiAgICAiU2VydmVyTmFtZSI6ICJ0aWxlLm9wZW5zdHJlZXRtYXAub3JnIiwKICAgICJTdHJlYW1UaW1lb3V0IjogMzAwLAogICAgIlRyYW5zcG9ydCI6ICJkaXJlY3QiLAogICAgIlVJRCI6ICJueEMxSVRaeDhpZXg1bUVjeDlTbkZnPT0iLAogICAgIlJlbW90ZVBvcnQiOiAiNDQzIiwKICAgICJSZW1vdGVIb3N0IjogIjE5Mi4xNjguMS4xMDQiCn0=");` # Note: 1. NumConn in the config should be 1 2. remote port and IP sets by variable RemotePort and RemoteHost 3. OpenVPN must be configured for TCP transport. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 20:46:05 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#1624
No description provided.