Table of Contents

Route BAS-internal traffic through your own proxy

Feature introduced in BrowserAutomationStudio 28.9.2

BAS scripts occasionally need to contact Bablosoft infrastructure for things such as script updates, fingerprint obtaining, or downloading extra runtimes (Chromium, Node JS, etc.). Starting in v28.9.2 you can tell a compiled script to send all of this service traffic through a proxy that you control.


Where to enter the proxy settings

When you compile a script, BAS shows the Compile Script dialog. At the bottom-right, under Additional settings, you’ll now see Connection config – highlighted in yellow in the screenshot. Paste either a JSON *or* a URL there. After compiling, redistribute updated script your users.

Only after script will be updated on user side, new proxy settings will take effect.

Redistributing your applications each time the proxy changes may be not convenient, but check “Remote configuration URL” section.


JSON format (embedded or served remotely)

Following JSON string can be pasted directly into “Connection config” field:

{
  "main.server.proxy":         "socks5://login:pass@proxy.example:1080",
  "fingerprints.server.proxy": "socks5://login:pass@proxy.example:1080",
  "downloads.server.proxy":    "socks5://login:pass@proxy.example:1080"
}

Here is explanation for key parameters:

main.server.proxy All API calls to *bablosoft.com* and Node JS downloads.
fingerprints.server.proxy Calls to *fingerprints.bablosoft.com*.
downloads.server.proxy Heavy assets such as the Chromium engine from *downloads.bablosoft.com*.

Note: Any proxies you explicitly set in your script (the Proxy browser action) remain untouched and keep working exactly as before.


Remote configuration URL

Instead of baking JSON into every build, you input URL into Connection config parameter.

This URL must return the JSON with the same format as described before.

Every time the compiled script starts, it fetches that JSON from specified URL and applies the proxies on-the-fly, allowing you to swap or rotate proxy settings without re-compiling.


Start a SOCKS5 proxy (Danted)

Use following instructions to set up proxy server https://github.com/Lozy/danted

Auto-starting nginx that serves config JSON file

echo '{
  "main.server.proxy":         "socks5://YOUR_LOGIN:YOUR_PASS@YOUR_VPS_IP:1080",
  "fingerprints.server.proxy": "socks5://YOUR_LOGIN:YOUR_PASS@YOUR_VPS_IP:1080",
  "downloads.server.proxy":    "socks5://YOUR_LOGIN:YOUR_PASS@YOUR_VPS_IP:1080"
}' > bas-proxy.json

docker run -d --name bas-config \
  --restart unless-stopped \
  -p 80:80 \
  -v "$PWD/bas-proxy.json":/usr/share/nginx/html/bas-proxy.json:ro \
  nginx:alpine
  

Putting it all together

  1. Provision a VPS that your users can reach and that itself can reach all *.bablosoft.com hosts.
  2. Create credentials for the proxy: choose YOUR_LOGIN and YOUR_PASS.
  3. Install proxy server with command specified above.
  4. Install config server with command specified above.
  5. Re-compile your BAS script, setting “Connection config” to http://YOUR_VPS_IP/bas-proxy.json.
  6. Distribute the new build, send it to your users.