AWS Marketplace - Selenium Grid Docker Squid Proxy Linux Instructions

1. After launching, login using the following username:
OS Ubuntu: ubuntu
OS Debian: admin
OS Amazon Linux: ec2-user

2. Start the selenium grid squid proxy endpoint using environment variables like:

export GRIDC_ENDPOINT_SUBDOMAIN={REPLACE WITH YOUR YOUR_GRIDLASTIC_CONNECT_SUBDOMAIN}
export GRIDC_USERNAME={REPLACE WITH YOUR GRIDLASTIC GRID USERNAME}
export GRIDC_ACCESS_KEY={REPLACE WITH YOUR GRIDLASTIC GRID ACCESS KEY}
export GRIDC_REMOTE_PORT=9999
cd /opt
docker-compose up
Proxy requests displayed on screen. Press "Ctrl+C" to quit. Use "docker-compose up --detach" to run in background.

3. The endpoint "your_gridlastic_connect_subdomain.gridlastic.com:9999" is accessible only by your Gridlastic selenium grid nodes. Note: port 9999 is just an example, select any not in use by another tunnel in the interval 9000-9999. If the tunnel does not start, try another port.

To tunnel your tests through to your Squid proxy, create a selenium proxy using this endpoint and pass into the webdriver as a capability like in the java example below:
String proxy_server = "your_gridlastic_connect_subdomain.gridlastic.com:9999";
org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
proxy.setHttpProxy(proxy_server).setFtpProxy(proxy_server).setSslProxy(proxy_server);
capabilities.setCapability(CapabilityType.PROXY, proxy)
You can now use your internal AWS ip/dns server names (private or public) in your selenium test scripts like:
driver().get("http://ip-10-0-0-154.ec2.internal");
or reach any web site that the instance VM have access to like:
driver().get("https://google.com");
Read more about using a Squid proxy with your selenium grid.