Browser extension for Motrix Next — seamless download interception & delegation.
- Download interception — Automatically captures browser downloads and routes them through aria2 for multi-threaded acceleration
- Smart filtering — 6-stage pipeline: global toggle → self-trigger guard → URL scheme → per-site rules → minimum file size → final verdict
- Per-site rules — Glob-pattern rules (e.g.
*.github.com) to always intercept, always skip, or defer to global settings - Context menu — Right-click any link, image, audio, or video → "Download with Motrix Next"
- Magnet & torrent —
magnet:URIs and.torrentfiles are automatically captured and routed to aria2 - Cookie forwarding — Best-effort cookie forwarding via optional enhanced permissions for authenticated downloads
- Real-time dashboard — Popup shows live download/upload speeds, active/waiting/completed task counts
- Auto-launch — Launches Motrix Next via
motrixnext://protocol when not running, waits for RPC, then retries - Completion notifications — Desktop notifications when downloads are sent and when they finish
- Download bar control — Optionally hides Chrome's native download shelf (Chromium 115+, not available on Firefox)
- Dark mode — System / Light / Dark with 10 Material You color schemes
- i18n — Full English, Chinese (Simplified), and Japanese localization
- Diagnostics — Built-in event log with severity levels and one-click export
| Browser | Link |
|---|---|
| Chrome | Chrome Web Store |
| Edge | Edge Add-ons |
| Firefox | Firefox Add-ons |
git clone https://github.com/AnInsomniacy/motrix-next-extension.git
cd motrix-next-extension
pnpm install
# Chrome / Edge
pnpm build
# Firefox
pnpm build:firefoxThen load the unpacked extension:
Chrome / Edge:
- Navigate to
chrome://extensions(oredge://extensions) - Enable Developer mode
- Click Load unpacked
- Select the
.output/chrome-mv3directory
Firefox:
- Navigate to
about:debugging#/runtime/this-firefox - Click Load Temporary Add-on...
- Select
.output/firefox-mv3/manifest.json
What is Motrix Next?
Motrix Next is a full-featured download manager powered by aria2 — a ground-up rewrite of the original Motrix with Tauri 2, Vue 3, and Rust. This extension bridges your browser to the Motrix Next desktop app running on your local machine.
Do I need the desktop app?
Yes. This extension sends downloads to the Motrix Next desktop app via aria2 JSON-RPC on 127.0.0.1:16800. Without the desktop app running, the extension will show a "Disconnected" status and cannot process downloads.
Why does the extension request broad host permissions?
The broad host permissions (*://*/*) are optional — only requested when you explicitly enable "Cookie Forwarding" in Settings. The chrome.cookies.getAll() API requires matching host permissions for the target domain, and since downloads can come from any site, the extension needs wildcard access to read cookies. These permissions are never used for any other purpose, and all data is sent only to 127.0.0.1.
Does this extension collect any data?
No. This extension does not collect, store, or transmit any personal data. All communication occurs exclusively between your browser and the Motrix Next app on your local machine (127.0.0.1). No analytics, no telemetry, no external requests. See the full Privacy Policy.
- Node.js ≥ 18
- pnpm ≥ 9
- Motrix Next desktop app running with RPC enabled
# Install dependencies
pnpm install
# Start development server (launches WXT + Vite with hot reload)
pnpm dev
# Build for production
pnpm build
# Package as .zip for store submission
pnpm zipmotrix-next-extension/
├── entrypoints/ # Extension entry points
│ ├── background.ts # Service worker — orchestrator, listeners, polling
│ ├── popup/App.vue # Browser action popup — status, tasks, actions
│ └── options/App.vue # Full-page settings — connection, behavior, rules
├── lib/ # Core logic (dependency-injected, fully testable)
│ ├── download/ # Interception orchestrator, 6-stage filter, metadata collector
│ ├── rpc/ # aria2 JSON-RPC 2.0 client with retry and auth
│ ├── services/ # Completion tracker, notifications, permissions, theme
│ ├── protocol/ # motrixnext:// launcher and wake logic
│ └── storage/ # Zod-validated schemas, migration framework, diagnostic log
├── shared/ # Shared utilities
│ ├── i18n/ # Compile-time i18n engine with positional placeholders
│ ├── types.ts # TypeScript interfaces
│ └── constants.ts # Default configs, timing constants
├── __tests__/ # 330 tests across 28 files
│ ├── unit/ # 27 isolated service test files
│ └── integration/ # End-to-end interception flow
├── public/_locales/ # Chrome i18n message bundles (en, zh_CN, ja)
└── .github/workflows/ci.yml # CI: compile → test → lint → i18n → format → build
| Command | Description |
|---|---|
pnpm dev |
Start WXT dev server with hot reload (Chrome) |
pnpm dev:firefox |
Start WXT dev server with hot reload (Firefox) |
pnpm build |
Production build → .output/chrome-mv3/ |
pnpm build:firefox |
Production build → .output/firefox-mv3/ |
pnpm zip |
Package Chrome build as .zip for store submission |
pnpm zip:firefox |
Package Firefox build as .zip for AMO submission |
pnpm zip:all |
Package both Chrome and Firefox builds |
pnpm test |
Run all unit and integration tests |
pnpm test:watch |
Run tests in watch mode |
pnpm compile |
TypeScript type checking (vue-tsc --noEmit) |
pnpm lint |
ESLint (flat config, Vue 3 + TypeScript) |
pnpm lint:i18n |
Validate i18n key consistency across all locales |
pnpm format |
Auto-format all files with Prettier |
pnpm format:check |
Verify formatting without writing |
All services are tested through dependency injection interfaces — no browser API mocking required. Run the full suite before committing:
pnpm format:check && pnpm lint && pnpm compile && pnpm test && pnpm buildA self-contained static page for manually verifying download interception:
npx serve test-site -p 3001Covers: Apple IPSW direct links, .torrent files, magnet: URIs, Linux ISOs, speed test binaries, and edge cases (blob:, data:, small files).
PRs and issues are welcome! Before submitting:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Ensure all quality gates pass (
pnpm format:check && pnpm lint && pnpm compile && pnpm test) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Downloads go faster. Thesis progress does not. If you'd like to help with at least one of those —
Consider sponsoring the project ❤️ — your support keeps the code open, the releases shipping, and proof that a PhD can ship more than just papers.
MIT — Copyright (c) 2025-present AnInsomniacy



