HTTP Proxy can't work on the same device as the VPN client

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
basinilya
OpenVpn Newbie
Posts: 4
Joined: Tue Jan 03, 2023 10:22 am

HTTP Proxy can't work on the same device as the VPN client

Post by basinilya » Sun Sep 24, 2023 11:59 am

Hi.
I was trying to configure a pair of OpenVPN Connect and some proxy software on the same Android 12 device Pixel 3 XL.
The proxy process (Apache2, Stunnel, socat) was listening on 127.0.0.1 and either I was adding it as a regular proxy (Apache2) or was overriding the server name.
In all cases, as soon as OpenVPN completed the handshake and finished configuring the routes the proxy software prints the error like:
read() failed: software caused connection abort.

Apparently, all external TCP connections except the connection owned by OpenVPN are forcibly disconnected by the OS when VPN activates (even if the connection does not change the default gateway). It's fine when OpenVPN connects to an external server (direct VPN server or a proxy server), but if OpenVPN connects to 127.0.0.1, the external TCP connection breaks and it can't recover properly.

Please help me find a workaround.

One of the guides I was using:
https://airvpn.org/forums/topic/24349-h ... droid-678/

And here's the error very similar to mine
https://www.stunnel.org/pipermail/stunn ... 05845.html

Post Reply