cbeuw / Cloak-android

Android client of Cloak
Other
227 stars 32 forks source link

Is it possible to use this plugin with openvpn? #25

Open Alexey104 opened 2 years ago

Alexey104 commented 2 years ago

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?

valerius2k commented 2 years ago

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.

igor-bespalchuk-boden commented 11 months ago

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

vladislavzl commented 6 months ago

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.