# Chrome for Testing mirror (pkg.shecan.ir)

> Mirror of Chrome for Testing: Chrome, chrome-headless-shell and chromedriver builds (storage.googleapis.com/chrome-for-testing-public) and the JSON version endpoints (googlechromelabs.github.io/chrome-for-testing, download URLs rewritten to the mirror) for Puppeteer, @puppeteer/browsers, Selenium Manager and direct downloads.

- Upstream: storage.googleapis.com/chrome-for-testing-public, googlechromelabs.github.io
- Mirror URLs: <https://mirror-chrome.pkg.shecan.ir/chrome-for-testing-public/>, <https://mirror-chrome.pkg.shecan.ir/chrome-for-testing/last-known-good-versions-with-downloads.json>, <https://mirror-chrome.pkg.shecan.ir/chromium-browser-snapshots/>, <https://mirror-chrome.pkg.shecan.ir/chromedriver/>
- Clients: curl, puppeteer, puppeteer-browsers, selenium
- Service status: <https://pkg.shecan.ir/status.json> (key `chrome`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/chrome/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/chrome.json>
- Integrity comparison with the official source (audit.shecan.ir, also run by Shecan, open source; group `chrome`, mirror `shecan`): <https://audit.shecan.ir/#chrome>
- Integrity comparison with the official source (audit.shecan.ir, also run by Shecan, open source; group `chromedriver`, mirror `shecan`): <https://audit.shecan.ir/#chromedriver>

## Limitations

- @puppeteer/browsers resolves channel and milestone names (chrome@stable, chrome@131) at googlechromelabs.github.io directly; give an exact version, or install the version pinned by Puppeteer (npx puppeteer browsers install chrome).
- npx puppeteer browsers install ignores PUPPETEER_*_DOWNLOAD_BASE_URL; pass --base-url.
- Firefox for Puppeteer is not mirrored.
- Chromium snapshots (/chromium-browser-snapshots/<platform>/<revision>/) and chromedriver before 115 (/chromedriver/<version>/) are mirrored as plain downloads; list pages and chromedriver release notes are not.

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### curl: temporary (one command or the current shell; nothing saved)

Run

```sh
curl -fsS https://mirror-chrome.pkg.shecan.ir/chromium-browser-snapshots/Linux_x64/LAST_CHANGE
```

Run (linux)

```sh
curl -fLO https://mirror-chrome.pkg.shecan.ir/chromedriver/114.0.5735.90/chromedriver_linux64.zip
```

Run

```sh
curl -fLO https://mirror-chrome.pkg.shecan.ir/chrome-for-testing-public/156.0.8078.47/linux64/chromedriver-linux64.zip
```

### puppeteer: persistent (user- or system-wide configuration)

Run (linux, macos)

```sh
export PUPPETEER_CHROME_DOWNLOAD_BASE_URL=https://mirror-chrome.pkg.shecan.ir/chrome-for-testing-public
export PUPPETEER_CHROME_HEADLESS_SHELL_DOWNLOAD_BASE_URL=https://mirror-chrome.pkg.shecan.ir/chrome-for-testing-public
npm install puppeteer
```

Undo / restore the default (linux, macos)

```sh
unset PUPPETEER_CHROME_DOWNLOAD_BASE_URL PUPPETEER_CHROME_HEADLESS_SHELL_DOWNLOAD_BASE_URL
sed -i.bak -E '/^export (PUPPETEER_CHROME_DOWNLOAD_BASE_URL|PUPPETEER_CHROME_HEADLESS_SHELL_DOWNLOAD_BASE_URL)=/d' ~/.bashrc ~/.zshrc ~/.profile 2>/dev/null || true
```

### puppeteer: project (files inside the project)

Configuration file: `.puppeteerrc.json`

```json
{
  "chrome": { "downloadBaseUrl": "https://mirror-chrome.pkg.shecan.ir/chrome-for-testing-public" },
  "chrome-headless-shell": { "downloadBaseUrl": "https://mirror-chrome.pkg.shecan.ir/chrome-for-testing-public" }
}
```

### puppeteer: temporary (one command or the current shell; nothing saved)

Run

```sh
npx puppeteer browsers install chrome --base-url https://mirror-chrome.pkg.shecan.ir/chrome-for-testing-public
```

### puppeteer-browsers: temporary (one command or the current shell; nothing saved)

Run

```sh
npx @puppeteer/browsers install chrome@156.0.8078.47 --base-url https://mirror-chrome.pkg.shecan.ir/chrome-for-testing-public
npx @puppeteer/browsers install chromedriver@156.0.8078.47 --base-url https://mirror-chrome.pkg.shecan.ir/chrome-for-testing-public
```

### selenium: persistent (user- or system-wide configuration)

Configuration file (linux, macos)

```sh
export SE_BROWSER_MIRROR_URL=https://mirror-chrome.pkg.shecan.ir/chrome-for-testing/
export SE_DRIVER_MIRROR_URL=https://mirror-chrome.pkg.shecan.ir/chrome-for-testing/
```

Undo / restore the default (linux, macos)

```sh
unset SE_BROWSER_MIRROR_URL SE_DRIVER_MIRROR_URL
sed -i.bak -E '/^export (SE_BROWSER_MIRROR_URL|SE_DRIVER_MIRROR_URL)=/d' ~/.bashrc ~/.zshrc ~/.profile 2>/dev/null || true
```
