The DLMan browser extension provides seamless integration between your web browser and the DLMan desktop application. It allows you to capture downloads from your browser and send them to DLMan for faster, more reliable downloading.
- Automatic Download Interception: Automatically intercepts browser downloads and sends them to DLMan
- Context Menu Integration: Right-click on any link to download it with DLMan
- Batch Downloads: Download all links on a page at once
- Per-Site Settings: Disable DLMan on specific websites
- Real-time Status: Shows connection status and active downloads in the popup
Browser Extension <--> Desktop App (Browser Server) <--> DLMan Core
| |
| HTTP/WebSocket |
| (localhost:7899) |
| |
v v
Content Script Window Manager
| |
v v
Background Script New Download Dialog
-
Background Script (
src/entrypoints/background.ts)- Manages extension lifecycle
- Handles download interception
- Communicates with the desktop app
- Sets up context menus
-
Content Script (
src/entrypoints/content.ts)- Runs on web pages
- Detects downloadable links
- Handles deep link opening for dialogs
- Collects page information
-
Popup (
src/entrypoints/popup/)- Shows extension status
- Displays active downloads
- Allows quick configuration
-
API Client (
src/lib/api-client.ts)- WebSocket and HTTP client for desktop app communication
- Handles request/response matching
- Manages connection lifecycle
The extension communicates with the desktop app through a local HTTP/WebSocket server running on localhost:7899 (configurable).
| Method | Path | Description |
|---|---|---|
| GET | /ping |
Health check |
| GET | /api/status |
Get app status |
| GET | /api/queues |
List download queues |
| GET | /api/downloads |
List all downloads |
| POST | /api/downloads |
Add a new download |
| POST | /api/show-dialog |
Request to show the new download dialog |
| POST | /api/downloads/:id/pause |
Pause a download |
| POST | /api/downloads/:id/resume |
Resume a download |
| POST | /api/downloads/:id/cancel |
Cancel a download |
| WS | /ws |
WebSocket for real-time updates |
When the extension intercepts a download, it:
- Sends a request to
/api/show-dialogwith the URL - Receives a deep link URL (
dlman://add-download?url=...) - Opens the deep link via the content script
- The desktop app receives the deep link and opens the New Download dialog
- User can configure the download (destination, queue, etc.)
- User clicks "Start Download" or "Download Later"
This flow ensures the user always has control over:
- Where to save the file
- Which queue to use
- Whether to start immediately or queue for later
DLMan supports deep links for integration:
dlman://add-download?url=<encoded-url>- Opens the new download dialog with the specified URL
- Build the extension:
pnpm ext:build - Open
chrome://extensions - Enable "Developer mode"
- Click "Load unpacked"
- Select the
apps/extension/.output/chrome-mv3directory
- Build the extension:
pnpm ext:build:firefox - Open
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Select any file in
apps/extension/.output/firefox-mv2
# Install dependencies
pnpm install
# Start development mode (Chrome)
pnpm ext:dev
# Start development mode (Firefox)
pnpm ext:dev:firefox# Build for Chrome
pnpm ext:build
# Build for Firefox
pnpm ext:build:firefoxapps/extension/
├── src/
│ ├── entrypoints/
│ │ ├── background.ts # Background service worker
│ │ ├── content.ts # Content script
│ │ ├── options/ # Options page
│ │ └── popup/ # Extension popup
│ ├── lib/
│ │ ├── api-client.ts # Desktop app communication
│ │ ├── storage.ts # Extension storage helpers
│ │ └── utils.ts # Utility functions
│ ├── styles/
│ │ └── globals.css # Global styles
│ └── types/
│ └── index.ts # TypeScript types
├── public/
│ └── icon/ # Extension icons
├── wxt.config.ts # WXT configuration
├── tailwind.config.js # Tailwind CSS configuration
└── package.json
Access extension settings through the popup or options page:
- Enable/Disable: Toggle download interception
- Port: Desktop app port (default: 7899)
- Auto-intercept: Automatically intercept browser downloads
- Fallback to browser: Use browser downloads when DLMan is not running
- Show notifications: Display notifications for download events
- Intercept patterns: File patterns to intercept (e.g.,
.zip,.exe)
Right-click on a page and select "Disable DLMan on this site" to prevent interception for specific websites.
- Ensure DLMan desktop app is running
- Check that the port matches (default: 7899)
- Look for error badge ("!") on the extension icon
- Check browser console for connection errors
- Verify "Auto-intercept" is enabled
- Check that the file type matches intercept patterns
- Ensure the site is not in the disabled list
- Verify the download URL is accessible
- Ensure the DLMan app is registered as protocol handler
- On macOS: Check System Settings > Default Apps
- On Windows: Check Default Apps in Settings
- Try restarting the desktop app
- The extension only communicates with
localhost - No data is sent to external servers
- All communication is local to your machine
- The browser server is bound to
127.0.0.1only