Capture download links and send them to GDownload - a powerful multi-protocol download manager
English | 简体中文
- 🔗 One-Click Capture - Quickly capture download links from web pages
- ⚡ Batch Download - Select multiple links and send them all at once
- 🎨 Unified UI - Perfectly matches GDownload's Element Plus design system
- 🔒 Secure Communication - Direct WebSocket connection to aria2c via JSON-RPC
- 🌐 Cross-Browser - Compatible with Chrome, Firefox, and Edge
- 🎯 Smart Filtering - Filter links by file size, type, and custom rules
- 🌙 Dark Mode - Support for light/dark theme switching
- Browser: Chrome 110+, Firefox 115+, or Edge 110+
- GDownload: Version 1.0.0+ with aria2c running
- aria2c: Version 1.36.0+ (bundled with GDownload)
- Visit the Chrome Web Store page
- Click "Add to Chrome"
- Follow the installation prompts
-
Clone the repository:
git clone https://github.com/cool2528/gd-browser-extension.git cd gd-browser-extension -
Install dependencies:
npm install
-
Build the extension:
# For Chrome/Edge npm run build:chrome # For Firefox npm run build:firefox
-
Load in browser:
Chrome/Edge:
- Open
chrome://extensions/(oredge://extensions/) - Enable "Developer mode"
- Click "Load unpacked"
- Select the
distfolder
Firefox:
- Open
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Select any file in the
distfolder
- Open
- Ensure GDownload is running with aria2c enabled
- Open Extension Options (right-click extension icon → Options)
- Configure Connection:
- WebSocket URL:
ws://127.0.0.1:16888/jsonrpc(default) - RPC Secret: copy the generated secret from GDownload settings
- Click "Test Connection" to verify
- WebSocket URL:
The extension connects directly to aria2c via WebSocket:
- Default URL:
ws://127.0.0.1:16888/jsonrpc - RPC Secret: generated by GDownload on first launch
- Auto Reconnect: Enabled by default
⚠️ Note: These settings must match your GDownload aria2c configuration.
In the "Link Capture" settings page, you can customize filtering rules:
File Size Filter:
- Minimum File Size: Set minimum file size in MB (0 = no limit)
File Type Filter:
- Select preset categories (Video, Audio, Archive, Document, Image, Executable)
- Or add custom file extensions (e.g.,
.iso,.dmg) - Leave empty to capture all types
URL Blacklist:
- Supports regular expressions
- Example:
^https?://ads\.example\.com/(exclude ad domains)
Domain Whitelist:
- Only capture links from specified domains
- Example:
github.com,sourceforge.net - Leave empty to capture from all domains
In the "Privacy & Security" settings page, control which HTTP headers are sent with downloads:
Basic Headers (Generally Safe):
- ✅ Send User-Agent: Browser identifier, enabled by default
- ✅ Send Referer: Referring page, enabled by default (required for some downloads)
Sensitive Headers (Enable with Caution):
⚠️ Send Cookie: Login credentials, disabled by default (may be needed for cloud storage)⚠️ Send Authorization: Auth tokens, disabled by default (may be needed for private APIs)
Security Tip: Only enable sensitive headers for trusted websites, and use URL blacklist to prevent leaking credentials.
Method 1: Right-Click Menu
- Right-click on any download link
- Select "Download with GDownload"
- The file will be added to GDownload automatically
Method 2: Popup Interface
- Click the extension icon in the toolbar
- All downloadable links on the current page will be captured
- Select the files you want to download
- Click "Send to GDownload"
Method 3: Batch Capture
- Right-click anywhere on the page
- Select "Download All Links on Page"
- All captured links will appear in the popup
In the Popup:
- Use the search box to filter links by name
- Toggle file selection with checkboxes
- Click the "X" button to remove unwanted links
- Click "Clear" to remove all links
In Options → Link Capture:
- Set minimum file size filter
- Choose file type filters (Video, Archive, Document, etc.)
- Add URL blacklist patterns
- Configure domain whitelist
browser-extension/
├── src/
│ ├── background/ # Service Worker (aria2 RPC client, message handling)
│ ├── content/ # Content Script (link capture, page interaction)
│ ├── popup/ # Popup UI (link list, batch operations)
│ ├── options/ # Options UI (settings pages)
│ └── shared/ # Shared utilities and types
├── public/
│ └── icons/ # Extension icons
├── manifest.json # Extension manifest (Manifest V3)
├── package.json
├── tsconfig.json
└── vite.config.ts
# Install dependencies
npm install
# Start development server (with hot reload)
npm run dev
# Build for production
npm run build
# Build for specific browser
npm run build:chrome
npm run build:firefox
npm run build:edge
# Run linting
npm run lint
# Format code
npm run format
# Run tests
npm run test
# Package for distribution
npm run package:chrome
npm run package:firefox
npm run package:edge- Framework: React 18 + TypeScript
- Build Tool: Vite 5 + CRXJS
- State Management: Zustand
- Icons: Lucide React
- WebSocket: Native WebSocket API
- Manifest: V3 (Chrome/Firefox/Edge compatible)
┌─────────────────┐
│ Browser Tab │
│ (Web Page) │
└────────┬────────┘
│
│ Content Script captures links
│
▼
┌─────────────────┐
│ Background SW │
│ (Service Worker)│
└────────┬────────┘
│
│ WebSocket (JSON-RPC)
│ ws://127.0.0.1:16888/jsonrpc
│
▼
┌─────────────────┐
│ aria2c │
│ (JSON-RPC) │
└────────┬────────┘
│
│ Shared instance
│
▼
┌─────────────────┐
│ GDownload │
│ Main App │
└─────────────────┘
- Direct aria2c Connection: No need to modify GDownload main app
- Standard Protocol: Uses aria2's official JSON-RPC 2.0 protocol
- Real-time Communication: WebSocket for bidirectional messaging
- Auto Reconnection: Exponential backoff strategy
- Cross-browser Compatible: Abstraction layer for browser APIs
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style (ESLint + Prettier)
- Add tests for new features
- Update documentation as needed
- Ensure cross-browser compatibility
This project is licensed under the MIT License - see the LICENSE file for details.
- Bug Reports: GitHub Issues
- Feature Requests: GitHub Discussions
- Documentation: User Guide
- FAQ: Frequently Asked Questions
- Troubleshooting: Common Issues
- GDownload - The main download manager application
- aria2 - The download engine
- Element Plus - Design system inspiration
- CRXJS - Vite plugin for browser extensions
© 2025 GDownload Team. All rights reserved.