11

I'm running Android through Genymotion using the following configuration:

  • For the Host-Only I used 192.168.1.213 and DHCP allocates addresses starting with 192.168.1.214
  • My computer is behind a Squid proxy that has user and password, and address 192.168.1.2 with port 4444

I start the Android VM and in Genymotion Configuration I can see IP Management to be IP 192.168.1.214. I can also ping this address from my computer with success, so all good until here.

If I go to Menu -> Settings -> Wireless & Networks -> Wi-Fi -> WiredSSID -> Modify Network, I see IP address 10.0.3.15 - why is that?

Also, if I try to configure proxy, all I get is host and port, but no options for user/pass, so when I try to access a page in the browser, it says that proxy authentication doesn't work.

Is there a way to configure Android to work through my proxy? If so, what should I configure?

Thank you

Sucata Mihnea
  • 349
  • 1
  • 5
  • 15

2 Answers2

25

Your IP configuration looks correct. There is two connection between genymotion and your host.

  • The first one is only technical, to allow Genymotion to run (host only).
  • The other one is the one that will be used when trying to get internet from Genymotion. (NAT)

In Genymotion Settings, under proxy settings, you will be able to set your username & password for your proxy.

Genymotion network settings

If you want to do more complex authentication schemes, like NTLM or Kerberos, Genymotion won't work. But as a workaround, you could use tools like Cntlm, or NtlmAps, that will provide a local, non authenticated, proxy and take care of upstream proxy authentication for Genymotion.

This settings will only work for the sofware Genymotion. Inside Android, you will also need to set a proxy in the settings. Go to: Settings -> Wi-Fi -> Long Click on "WiredSSID" -> Modify network -> Check "show advanced settings".

wi-fi network settings of Android

As mentionned there, the proxy will only works for the Browser, and maybe Gmail also. You will need to set it also on the settings of each app you trying to use. Not all of your apps will provide a proxy setting. I think Twitter does, but if your app doesn't provide one, you're screwed!

pcans
  • 7,611
  • 3
  • 32
  • 27
  • Thanks pcans, I've set the 2 proxies that you've mentioned, Genymotion works ok through the proxy as I was able to download the VM, but inside Android the Advanced settings don't allow user / pass, so the authentication fails. Anyway, you are right, my app does not provide proxy means, however, using a local proxy might do the trick... So something like intercepting Android's outside connections to the internet and rerouting them through the proxy... not sure if anyone has managed to do that somehow (for example using Proxifier?) – Sucata Mihnea Jan 09 '14 at 11:46
  • @pccans Nice answer! I was already using the Cntlm but I miss the last step...how to get the host IP on the NAT network? I suppose that the host IP should be something like 10.0.3.1 but I don't know how to get it. On the netowrk interfaces of my (windows-)host I cannot see that network interface, thus I cannot see its IP... I also tried to use Net swiss tool on the android emulated device to get the visible IPs in the 10.0.3.x subnet but without success. – Andre Feb 07 '14 at 14:14
  • 1
    after more than one hour lost looking for a solution on the internet, I found it just after posting the comment... For anyone else having the same issue, the right IP for the proxy/host on the NAT interface is 10.0.3.2. This also suggests to me that the Net swiss tool is not correctly working on the emulator (but I haven't spent so much time on this to be 100% sure). Hope it helps! – Andre Feb 07 '14 at 14:51
3

I found a much simpler solution. All you have to do is to create a rule in proxifier which will let genymotion to use the host default ip. In this way it will manage to connect to the oracle virtual machine ( which has no problem with working with proxifier; obviously, in proxifier you will setup your proxy with its authentication credentials).

Dan B
  • 31
  • 1