Supported Proxies

Browseasy supports both SOCKS and HTTP proxies to connect while running your headless browsers. Please note that we do support SOCKS v4 and v5 without authentication. 

SOCKS Proxy

In general, HTTP Proxies intercept your outgoing traffic, hence the network overload is much higher. We strongly advice to use SOCKS proxies over HTTP proxies if possible. To connect your public SOCKS proxy update your Browseasy Connection String with a  proxy querystring param as follow.
// Your unique connection string.
const BROWSEASY_CONNECTION_STRING = `${BROWSEASY_ENDPOINT}?code=${BROWSEASY_API_KEY}`;

const YOUR_SOCKS_PROXY_ENDPOINT = `socks5://public.socks.server.com:1080`

// Your unique connection string with a socks proxy.
const BROWSEASY_PROXY_CONNECTION_STRING = `${BROWSEASY_CONNECTION_STRING}&proxy=${YOUR_SOCKS_PROXY_ENDPOINT}`;
...
// Run headless browser on the cloud.
    const browser = await puppeteer.connect({
        browserWSEndpoint: BROWSEASY_PROXY_CONNECTION_STRING,
        // Always reset default viewport.
        defaultViewport: null
    });
...

HTTP Proxy

HTTP Proxy integration is very similar to SOCKS proxy integration. However, in this particular case you might have authentication in place. Please use HTTP Proxies over TLS to connect, i.e. with https protocol.
// Your unique connection string.
const BROWSEASY_CONNECTION_STRING = `${BROWSEASY_ENDPOINT}?code=${BROWSEASY_API_KEY}`;

const YOUR_HTTP_PROXY_ENDPOINT = `https://public.http.server.com:3128`

// Your unique connection string with a socks proxy.
const BROWSEASY_PROXY_CONNECTION_STRING = `${BROWSEASY_CONNECTION_STRING}&proxy=${YOUR_HTTP_PROXY_ENDPOINT}`;
...
// Run headless browser on the cloud.
    const browser = await puppeteer.connect({
        browserWSEndpoint: BROWSEASY_PROXY_CONNECTION_STRING,
        // Always reset default viewport.
        defaultViewport: null
    });
...
In case you need basic authentication enabled for your HTTP proxy, you have 2 different options to authenticate.

page.authenticate

The example below given for Puppeteer Node.js API, please check if your toolchain has a similar API call.
...
await page.authenticate({
    username: 'john.doe',
    password: 'password',
});
...

page.setExtraHTTPHeaders

The example below given for Puppeteer Node.js API, please check if your toolchain has a similar API call. You need to check with your proxy provider, whether they support proxy authentication with common headers given below. Otherwise, you need to update the header name accordingly. The common practice is to use base64 encoded string in the header.
...
await page.setExtraHTTPHeaders({
    'Proxy-Authorization': 'Basic username:password',
});
...