[GH-ISSUE #25] Is it possible to use this plugin with openvpn? #19

Open
opened 2026-02-26 12:35:14 +03:00 by kerem · 5 comments
Owner

Originally created by @Alexey104 on GitHub (Apr 3, 2022).
Original GitHub issue: https://github.com/cbeuw/Cloak-android/issues/25

Hi!
I succesfully use Cloak with both Openvpn and Shadowsocks on a desktop Linux machine connected to a VPS. I want to also use it on my LineageOS phone. After installing Cloak-android plugin I am able to choose it in the "plugin" section of Shadowsocks app on my phone. Is it possible to also use this plugin with Openvpn app from Fdroid? Can I somehow run Cloak-android in standalone mode and connect my Openvpn client to it?

Originally created by @Alexey104 on GitHub (Apr 3, 2022). Original GitHub issue: https://github.com/cbeuw/Cloak-android/issues/25 Hi! I succesfully use Cloak with both Openvpn and Shadowsocks on a desktop Linux machine connected to a VPS. I want to also use it on my LineageOS phone. After installing Cloak-android plugin I am able to choose it in the "plugin" section of Shadowsocks app on my phone. Is it possible to also use this plugin with Openvpn app from Fdroid? Can I somehow run Cloak-android in standalone mode and connect my Openvpn client to it?
Author
Owner

@valerius2k commented on GitHub (Jun 17, 2022):

Cloak-android is only implemented as a plugin to Shadowsocks. It seems, no standalone mode on Android. So, I decided to pass OpenVPN inside a Shadowsocks tunnel inside Cloak. This works. Shadowsocks works as a socks proxy. But OpenVPN app for android does not support socks, but supports working via http proxies. But Shadowsocks can work as socks proxy, only. So, I used Matsuri proxy toolkit I installed from F-droid. It seems to use V2Ray for supporting Shadowsocks protocol. Plus, besides socks proxy support, it supports access via a http proxy. So, you can use Matsuri app instead of Shadowsocks Android version, create a Shadowsocks connection with Cloak plugin, and choose a connection via a http proxy in OpenVPN app. It works. The only thing I am cannot make working so far is CDN mode in Cloak-android. "Direct" connection works, but CDN mode won't work, for some reason. I use Cloudflare as a CDN. Strangely, CDN mode works fine under Linux, but it fails on Android, for some reason.

<!-- gh-comment-id:1159221897 --> @valerius2k commented on GitHub (Jun 17, 2022): Cloak-android is only implemented as a plugin to Shadowsocks. It seems, no standalone mode on Android. So, I decided to pass OpenVPN inside a Shadowsocks tunnel inside Cloak. This works. Shadowsocks works as a socks proxy. But OpenVPN app for android does not support socks, but supports working via http proxies. But Shadowsocks can work as socks proxy, only. So, I used Matsuri proxy toolkit I installed from F-droid. It seems to use V2Ray for supporting Shadowsocks protocol. Plus, besides socks proxy support, it supports access via a http proxy. So, you can use Matsuri app instead of Shadowsocks Android version, create a Shadowsocks connection with Cloak plugin, and choose a connection via a http proxy in OpenVPN app. It works. The only thing I am cannot make working so far is CDN mode in Cloak-android. "Direct" connection works, but CDN mode won't work, for some reason. I use Cloudflare as a CDN. Strangely, CDN mode works fine under Linux, but it fails on Android, for some reason.
Author
Owner

@igor-bespalchuk-boden commented on GitHub (Sep 25, 2023):

@valerius2k Could you please provide a bit more elaborate instruction on how to use the Cloak plugin with Matsuri and OpenVPN on Android?

<!-- gh-comment-id:1733289891 --> @igor-bespalchuk-boden commented on GitHub (Sep 25, 2023): @valerius2k Could you please provide a bit more elaborate instruction on how to use the Cloak plugin with Matsuri and OpenVPN on Android?
Author
Owner

@vladislavzl commented on GitHub (Feb 16, 2024):

I'm able to use this apps for openvpn with udp:

  1. OpenVPN for Android
  2. Shadowsocks
  3. Cloak-android plugin
    You can set any configurations into the plugin using json file. So using json file you can set any supported parameters https://github.com/cbeuw/Cloak/blob/master/internal/client/state.go#L23
    As a fast solution I added all settings using Shadowsocks GUI for a default profile, than downloaded it as json file, edited it and than uploaded.
    So now it's possible to use the plugin as a standalone client like windows or linux client.
<!-- gh-comment-id:1948752196 --> @vladislavzl commented on GitHub (Feb 16, 2024): I'm able to use this apps for openvpn with udp: 1. [OpenVPN for Android](https://play.google.com/store/apps/details?id=de.blinkt.openvpn&hl=en) 2. [Shadowsocks](https://play.google.com/store/apps/details?id=com.github.shadowsocks&hl=en_US) 3. Cloak-android plugin You can set any configurations into the plugin using json file. So using json file you can set any supported parameters https://github.com/cbeuw/Cloak/blob/master/internal/client/state.go#L23 As a fast solution I added all settings using Shadowsocks GUI for a default profile, than downloaded it as json file, edited it and than uploaded. So now it's possible to use the plugin as a standalone client like windows or linux client.
Author
Owner

@Rom1985 commented on GitHub (Oct 23, 2024):

I'm able to use this apps for openvpn with udp:

  1. OpenVPN for Android
  2. Shadowsocks
  3. Cloak-android plugin
    You can set any configurations into the plugin using json file. So using json file you can set any supported parameters https://github.com/cbeuw/Cloak/blob/master/internal/client/state.go#L23
    As a fast solution I added all settings using Shadowsocks GUI for a default profile, than downloaded it as json file, edited it and than uploaded.
    So now it's possible to use the plugin as a standalone client like windows or linux client.

Hello.
Could you please send me an example of json file?

<!-- gh-comment-id:2432083088 --> @Rom1985 commented on GitHub (Oct 23, 2024): > I'm able to use this apps for openvpn with udp: > > 1. [OpenVPN for Android](https://play.google.com/store/apps/details?id=de.blinkt.openvpn&hl=en) > 2. [Shadowsocks](https://play.google.com/store/apps/details?id=com.github.shadowsocks&hl=en_US) > 3. Cloak-android plugin > You can set any configurations into the plugin using json file. So using json file you can set any supported parameters https://github.com/cbeuw/Cloak/blob/master/internal/client/state.go#L23 > As a fast solution I added all settings using Shadowsocks GUI for a default profile, than downloaded it as json file, edited it and than uploaded. > So now it's possible to use the plugin as a standalone client like windows or linux client. Hello. Could you please send me an example of json file?
Author
Owner

@vladislavzl commented on GitHub (Nov 2, 2024):

Hi @Rom1985 . Sure:
file profiles.json:
[ { "server": "12.34.56.78", "server_port": 123456, "password": "p@ssw0rd", "method": "aes-256-cfb", "plugin": "ck-client", "plugin_opts": "StreamTimeout=300;PublicKey=aaaaaaaaaaaaaaaaaaaaaaaaa\\=;EncryptionMethod=aes-gcm;ProxyMethod=openvpn;UID=uuuuuuuuuuuuuuuuuu\\=\\=;CDNWsUrlPath=;AlternativeNames=;KeepAlive=0;ServerName=server.net;BrowserSig=chrome;Transport=direct;CDNOriginHost=;NumConn=4;RemoteHost=12.34.56.78;RemotePort=443;UDP=true;LocalPort=123456;LocalHost=127.0.0.1", "remarks": "Ck2Service", "route": "custom-rules", "remote_dns": "dns.google", "ipv6": false, "metered": false, "proxy_apps": { "enabled": false }, "udpdns": false } ]

<!-- gh-comment-id:2452952036 --> @vladislavzl commented on GitHub (Nov 2, 2024): Hi @Rom1985 . Sure: file profiles.json: `[ { "server": "12.34.56.78", "server_port": 123456, "password": "p@ssw0rd", "method": "aes-256-cfb", "plugin": "ck-client", "plugin_opts": "StreamTimeout=300;PublicKey=aaaaaaaaaaaaaaaaaaaaaaaaa\\=;EncryptionMethod=aes-gcm;ProxyMethod=openvpn;UID=uuuuuuuuuuuuuuuuuu\\=\\=;CDNWsUrlPath=;AlternativeNames=;KeepAlive=0;ServerName=server.net;BrowserSig=chrome;Transport=direct;CDNOriginHost=;NumConn=4;RemoteHost=12.34.56.78;RemotePort=443;UDP=true;LocalPort=123456;LocalHost=127.0.0.1", "remarks": "Ck2Service", "route": "custom-rules", "remote_dns": "dns.google", "ipv6": false, "metered": false, "proxy_apps": { "enabled": false }, "udpdns": false } ]`
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
starred/Cloak-android#19
No description provided.