3.1 KiB
3.1 KiB
Auto Mirror Switcher
Browser extension for Chrome, Manifest V3. It switches failed mirror hosts to the next configured candidate while preserving the original page path, query parameters, and hash.
Version 1.4.3
- Hid the host RegExp field for fixed host-list rules.
- Fixed list-mode matching so
customHostsdefines the handled source hosts without requiring a RegExp.
Version 1.4.2
- Applied the false-positive guard to every built-in blocked-page marker, not only Cloudflare and
forbidden. - Added coverage that embeds each default marker inside a long normal page and verifies it does not stop browsing.
Version 1.4.1
- Reduced false blocked-page detections from generic
forbiddentext embedded in otherwise working pages. - Stopped pages now list hosts checked by
probemode, not only the source host.
Version 1.4.0
- Added automatic UI language detection: Russian is used for
ru*browser locales, English is used otherwise. - Added English localization for the options page, stopped page, runtime messages, validation errors, and extension manifest metadata.
Version 1.3.1
- Reduced false blocked-page detections when Cloudflare/522 text is embedded inside an otherwise working page.
- Ignored hidden/script/template HTML while probing candidate mirrors for blocked-page markers.
Version 1.3.0
- Expanded the in-page usage guide with behavior details from the redirect logic.
- Replaced concrete browser/domain examples in the guide and settings placeholders with Chrome and example.com examples.
Install In Chrome
- Open
chrome://extensions. - Enable Developer mode.
- Click
Load unpacked. - Select the unpacked extension folder.
- Click the extension icon to open settings.
Basic Setup
- Enable the extension with the top toggle.
- Select or create a rule.
- Set
hostRegex,strategy, and eithertemplateor a custom host list. - Click
Apply to rule, thenSave. - If autosave is enabled, changes are saved automatically and the manual save button is disabled.
Example Rule
Source page:
https://mirror1.example.com/path/page.html?view=full#top
Numeric mirror rule:
hostRegex: ^mirror\d+\.example\.com$
template: mirror{n}.example.com
strategy: number
numberStart: 1
numberEnd: 100
If the current host fails, the extension can try:
https://mirror2.example.com/path/page.html?view=full#top
https://mirror3.example.com/path/page.html?view=full#top
The host changes; path, query, and hash stay the same.
How Switching Works
stepmode immediately opens the next candidate when a navigation error, HTTP 5xx/403/451, or blocked-page marker is detected.probemode checks candidates in the background and opens the first host that responds with a 2xx/3xx status and no blocked-page markers.- A successfully loaded page stores its host as the last working host for that rule.
- If the cached host later fails, the cache is cleared and the search starts again.
Diagnostics
Use the diagnostics log in the options page when a rule does not switch as expected. You can also inspect the extension service worker from chrome://extensions and look for [Auto Mirror Switcher] logs.