
You can set the proxy configuration from the command line : adb shell settings put global http_proxy localhost:3333 You must configure them each time you start them. It means they are deleted when you stop them and all their configuration and files are lost. Today, Genymotion Cloud virtual devices are disposable. Once this command is finished, connect to the device with adb : gmsaas instances adbconnect $uuid, you can interact with it using `adb` commands, through the ADB tunnel. This command starts a new Pie virtual device on Genymotion Cloud. volume /opt/squid/cache:/var/log/squid3 \īefore each test run, the CI server starts one or several cloud devices using gmsaas. volume /opt/squid/cache:/var/spool/squid3 \ Then run the following docker command: docker run -name squid \ # Allow local connections, including Docker’s hostĪcl localnet src 10.0.0.0/8 # RFC1918 possible internal networkĪcl localnet src 172.16.0.0/12 # RFC1918 possible internal networkĪcl localnet src 192.168.0.0/16 # RFC1918 possible internal networkĪcl localnet src fc00::/7 # RFC 4193 local private network rangeĪcl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines You can use this simple configuration: # Squid proxy port declaration
GENYMOTION PROXY HOW TO
Here is for example how to launch a Squid proxy using docker :įirst, make sure folder /opt/squid/cache is created.Īlso, you must set up a configuration file /opt/squid/nf. There are plenty of ways to start a proxy on your server. You must run a single proxy server for all the devices needing access to your internal web service. ADB is running on your CI server, and it is the only one that will connect to the proxy.
GENYMOTION PROXY SOFTWARE
This piece of software is aimed to expose your internal web service located in your infrastructure to a local network connection occurring on your CI server. How to overcome this, without exposing your internal web service to the Internet? ADB reverse to the rescue! ?Īccessing the infrastructure Run a local proxy on your CI server On the other hand, your internal web service is not exposed and therefore cannot be accessed from the virtual device. An ADB tunnel is created between the server and the virtual device, allowing to use `adb` on the device, as if it was running locally. This is done through gmsaas, the Genymotion command line tool. You can see a Genymotion Cloud device located on our datacenter launched by a continuous integration server running on your internal network. Let’s start with a diagram of the situation: You can also go further by using different URLs depending on the build type… Everything is explained below ? Make sure your app handles Proxy System Settings. Bind your local proxy to the device proxy configuration using command: adb reverse tcp:3333 tcp:3128ĥ. Configure the proxy settings in the device using ADB: adb shell settings put global http_proxy localhost:3333Ĥ. This gives you access to the device through ADB.ģ.

Start a Genymotion Cloud device using the gmsaas CLI: On your CI server, run a local proxy (such as Squid, running on port 3128).Ģ.

In this article, we study the case of an app running automated tests from Genymotion Cloud, but accessing web services running on a private network.ġ. Luckily for you, we managed to make it work with Genymotion Cloud ?. Adb reverse is another solution, easier to set up. You could do it with a VPN, but it can be cumbersome. It is an application accessing some web services currently under development and those services must remain private until finished.Īccessing those private backends while automating your tests in the cloud can be tricky.It is a private business application accessing confidential internal information.In some cases, your application may need to access an internal web service: It can be pretty common for your project to have some security and confidentiality problematics?.
