1

I can tether my Android phone's VPN to my Windows 10 computer and make my computer's internet connection go through the phone's VPN. Tools like PDAnet+ are helpful. But how to do this with an Android emulator?

Instead of a real Android phone, this time I want to do the above using a guest Android emulator (eg, BlueStacks, LDPlayer, Nox Player, etc.) running inside my Windows 10 computer. Like tethering, but using Android emulators. In other words:

  1. I have a Windows 10 withOut any VPN, which acts as the host.
  2. I install an Android emulator (eg, BlueStacks) as a guest within the said Windows 10.
  3. I install and run a working VPN within the Android emulator (BlueStacks).
  4. I want to share BlueStacks's active VPN connection with Windows so that Windows's internet goes through BlueStacks's VPN.

(Replace BlueStacks with any other Android emulators like LDPlayer, NoxPlayer, Android Studio, Bliss OS, GameLoop, MeMU Play, MuMu Player, PrimeOS, etc.)

I have seen SuperUser answers about "guest VPN being shared with the host" for different guest and host operating systems, but in none of them, the guest was an Android emulator.

  • A VPN connection usually redirects all network traffic through the VPN tunnel. So sharing is not possible, unless the VPN client allows to do so. The only way I see is through the virtual USB connection to the emulator (thus via `adb`). Via adb you can establish TCP port forwarding from the host PC into the Android VM. So you would need to run a [socks] proxy on Android, forward the proxy port via adb to the host and then configure the host application(s) to use this proxy port. – Robert Aug 10 '23 at 10:25
  • Thanks @Robert . Care to elaborate as a new and more complete post? That would help a lot. Besides, I see VPN sharing from guest to host is already possible in many operating systems. For example, https://stackoverflow.com/questions/53573337/how-to-share-guest-vms-vpn-connection-with-host or https://superuser.com/questions/328592/how-to-share-a-vpn-connection-in-a-vmware-guest-vm-with-the-host or https://superuser.com/questions/985785/share-a-vpn-connection-from-a-virtual-machine-with-windows-7-to-the-host and many others. – Rosemary Blanchard Aug 10 '23 at 15:04
  • Sorry, what I describe is totally theoretic, I handle have this basic concept in mind, there is nothing more I can share. If a VPN can be shared or not depends on the used VPN. VPN systems especially in corporate environment does not allow traffic to break out of the VPN, so sharing would not be possible in such a case. – Robert Aug 10 '23 at 15:32
  • @Robert, no it isn't true. If it were true, tethering wouldn't work; PDAnet+ wouldn't work. No, in theory, Any VPN connection *CAN* be shared regardless of the used VPN. It needs proper bridging between the two machines, which is what I am seeking. But thanks anyway. – Rosemary Blanchard Aug 11 '23 at 07:18

0 Answers0