schwabe / ics-openvpn

OpenVPN for Android
3.29k stars 1.19k forks source link

DNS issue resolving .onion over socks connection #1628

Closed manuelschneider closed 1 year ago

manuelschneider commented 1 year ago

General information

  1. Android Version 13
  2. Android Vendor/Custom ROM: lineage 20-20230724
  3. Version of the app (version number/play store version/self-built): F-Droid / 0.7.46

Description of the issue

When I configure a SOCKS Proxy 127.0.0.1:9050 (Orbot Tor SOCKS), I can't resolve .onion addresses. Thus I'm unable to connect to an OpenVPN server running as TOR hidden service.

Also, I noted the socks config does not show up in the generated config, unless I'm mentioning it in the extra manual config. However, also in this case the DNS resolving still fails, indicating it's not happening over the socks.

With OpenVPN in a normal linux (pinephone) this setup works.

schwabe commented 1 year ago

I am closing the issue because this is probably almost impossible to resolve with massive refactoring of OpenVPN. OpenVPN for Android relies on the system for DNS resolution and to have DNS resolution to resolve .onion addresses you need to have something use the VPN API to set the DNS server which would break OpenVPN for Android ability to open a VPN itself.

And yes that the config does not show up in the generated config is normal as a proxy is set using the management interface and is not preset.

manuelschneider commented 1 year ago

Thanks for the explanation.