1

I've a android emulator, that is running on a computer that is behind a proxy.

From computer perspective, http and https internet access works fine, but on Android Emulator, nothing.

So I tried with "Use Android Studio HTTP proxy settings" and nothing, so I setup a "Manual proxy configuration", and it was accepted:

enter image description here

Doing this, I turned this virtual machine, off, and on, but still there is no internet:

enter image description here

Anyone here knows what is missing, and what do I need to do more?

Thanks in advance!

UPDATE1:

I've setup also on WIFI settings, and seems to be setup, but still there is no internet:

enter image description here

marafado88
  • 143
  • 1
  • 2
  • 7
  • Are you sure HTTP and HTTPS don't work in the emulator? If the proxy is an intercepting proxy with HTTPS decryption and the certificate is added as trusted on your Windows system HTTPS will fail as Android doesn't trust the certificate but HTTP may work (test with http://neverssl.com). – Robert Jan 31 '22 at 10:49
  • With http://neverssl.com, or any http or https url, the result is always the same after doing that UPDATE 1: Contacting the system admin (Who is me) ERR_PROXY_CONNECTION_FAILED – marafado88 Jan 31 '22 at 12:43
  • Is the proxy an HTTPS url? If yes make install the used rot CA certificate is also installed in the emulator (not sure if this is sufficient). If not you need a rooted emulator and install the CA certificate as system root CA. See second half of this answer on an example how to install a system root CA certificate. – Robert Jan 31 '22 at 12:52
  • The DHCP is setup on WIFI, and its getting a range of IPs, that are not the same of this machine, so I think that is being given by android studio emulator NAT, is that it? (cannot find any config related to this VM network, outside of the VM it self) – marafado88 Jan 31 '22 at 12:55
  • the proxy url is a http url – marafado88 Jan 31 '22 at 14:05
  • Then I don't know. Use Wireshark to capture the traffic from emulator to your proxy to see what is going wrong. – Robert Jan 31 '22 at 14:06

1 Answers1

1

The host is placed in a network that has a proxy auto config.

For this case the recepie that worked for me was leaving "Use Android Studio HTTP proxy settings" check, and only config WIFI to use to use auto Proxty config with full path for the pac file like this (in my case was a http with an https it could be needed a certificate):

http://proxyautoconfig.domain.com/proxy.pac

End Anti-Semitic Hate
  • 4,400
  • 23
  • 61
  • 100
marafado88
  • 143
  • 1
  • 2
  • 7