1

I have my machine SSH tunneled to a VPN and I am able to open the browser and access a webpage from that VPN. Now my question is: using the Android Emulator's browser how can I open the same page since it sharing the same properties as my PC ? I hope I made my self clear enough if you have any questions please let me know.

Cheers,

MR Mido
  • 1,618
  • 4
  • 25
  • 35

1 Answers1

0

There are some SSH VPNs with Android support like OpenVPN. But I think the easiest way to go is to connect your PC to that VPN. Then use the emulator as usual.

Mister Smith
  • 27,417
  • 21
  • 110
  • 193
  • Then should I directly hit from the emulator the VPN ? or Is there a way of hitting my PC then my PC hit that VPN ? Please advice, I would really appreciate it. Thanks in advance. – MR Mido Sep 05 '11 at 06:01
  • @MR Mido Just forget about the emulator at first and configure the VPN in your development machine as if you were going to browse from your PC. Once you are in the VPN, all the traffic should be now tunneled. Then open your Android emulator and use it as usual. – Mister Smith Sep 05 '11 at 07:37
  • @ Mister Smith: I do have a connection to the VPN and I can browse from my PC. However if I try to get to a URL (within that VPN) using the emulator the URL doesn't get resolved. That means that for some reason the traffic is not being tunneled to the emulator. – MR Mido Sep 06 '11 at 17:34
  • @MR Mido Browsing from your PC may not be possible due to VPN restrictions, but try pinging some URL inside the VPN from your PC. This way you can know where the problem is. – Mister Smith Sep 07 '11 at 07:12
  • Thank you for the help I was able to solve the issue using ur comments. So now it working perfectly on the emulator's browser however when I try coding it using HTTPS protocol. I get an error saying: Not Trusted Certificate. I used few examples from here and there but without success. So I was wondering if you happen to have encountered and solved a similar issue. Thanks for all the help. – MR Mido Sep 07 '11 at 18:21
  • @MR If it were a real device, I'd try to install the certificates via SDCard (it only accepts .crt certificates). There's an option in Settings -> Security. BUT for https from your app, it is a different thing. Try these two questions: http://stackoverflow.com/questions/2642777/trusting-all-certificates-using-httpclient-over-https and http://stackoverflow.com/questions/2012497/accepting-a-certificate-for-https-on-android – Mister Smith Sep 08 '11 at 08:28