Skip to content

Proxy configuration

pschoenmakers edited this page Apr 10, 2023 · 21 revisions

A proxy for ChangeDetection.io can be configured by setting environment the HTTP_PROXY, HTTPS_PROXY variables, examples are also in the docker-compose.yml

NO_PROXY exclude list can be specified by following "localhost,192.168.0.0/24"

as docker run with -e

docker run -d --restart always -e HTTPS_PROXY="socks5h:https://10.10.1.10:1080" -p "127.0.0.1:5000:5000" -v datastore-volume:/datastore --name changedetection.io dgtlmoon/changedetection.io

With docker-compose, see the Proxy support example in docker-compose.yml.

Proxy List support

From v0.39.20 onwards, (previous versions was just a text file list proxies.txt of endpoints.) you should use a JSON file to describe the proxies - proxies.json in your datastore directory.

This overrides the system proxy, allowing you to choose between different proxies for the requests

add a file called proxies.json to your data-directory that looks like

{
  "none": {
    "label": "No proxy - Direct"
  },
  "usa-1": {
    "label": "BrightData USA",
    "url": "https://lum-customer-uuuuuuuu-zone-data_center-country-us:[email protected]:22225/"
  },
  "usa-2": {
    "label": "BrightData USA (5 minute recheck limit)",
    "url": "https://lum-customer-uuuuuuuu-zone-data_center-country-us:[email protected]:22225/",
    "reuse_time_minimum": 300
  }
}

Default/no-proxy support - Not including url means that you can choose this config to skip using a proxy

reuse_time_minimum can be used to control seconds between calls to that proxy, in the case of using a paid proxy, it can help to control costs.

BrightData Proxy support

BrightData integrates very well with ChangeDetection.io for proxy support, use it to fetch from different locations and servers instead of your own IP address.

You can configure ChangeDetection.io to use a single global proxy (via HTTPS_PROXY and HTTP_PROXY environmental variables)

Or you can use proxies.json proxy list support so you can choose different locations for each watch.

Once registered you can simply copy past the access URL's from the API integrations page https://brightdata.com/cp/api_example?example=python into the proxies.json

Please support us by using this link https://brightdata.grsm.io/n0r16zf7eivq when signing up with BrightData,.

BrightData offer many possibilities, from affordable Data-Centre zones to more reliable "Residential" IPs that aren't detected as robots so easily.

Example proxies.json from BrightData's "Data-Centre" zone, this file should live in your data directory (via the -d option), these will be used for both HTTP and HTTPS traffic.

{
  "europe-germany": {
    "label": "Europe / Germany",
    "url": "https://lum-customer-XXXXXXX-zone-data_center-country-de:[email protected]:22225"
  },
  "usa-2": {
    "label": "USA",
    "url": "https://lum-customer-XXXXXXX-zone-data_center-country-us:[email protected]:22225"
  },
  "australia": {
    "label": "Australia",
    "url": "https://lum-customer-XXXXXXX-zone-data_center-country-au:[email protected]:22225"
  }
}

Proxy Example

Available System Proxy Configurations

Set your system environment variables according to what is supported, if there is no supported type for that requester/fetcher then unfortunately it will not support it (for example, Playwright does not have a FTP proxy setting)

HTTP_PROXY and HTTPS_PROXY also applies to the notifications https://github.com/caronc/apprise/issues/387#issuecomment-841718867, Windows uses lower-case http_proxy/https_proxy

Table of available env var

WebDriver Playwright Requests/Plain
HTTPS_PROXY / webdriver_sslProxy playwright_proxy_server HTTPS_PROXY
HTTP_PROXY / webdriver_httpProxy playwright_proxy_server HTTP_PROXY
webdriver_proxyType
webdriver_noProxy
webdriver_proxyAutoconfigUrl
webdriver_autodetect
webdriver_ftpsProxy
webdriver_socksProxy
webdriver_socksUsername
webdriver_socksPassword
webdriver_socksVersion

playwright_proxy_server is in the format https://... https://playwright.dev/docs/network#http-proxy