在Miniflux 2的基础上添加了,图片,视频,音频缓存。 点击收藏时,自动下载到vps,取消后删除。缓存的内容不会被自动清除。 ai万岁 新加的
- MEDIA_CACHE_DIRECTORY=/app/mediacache
- MEDIA_CACHE_MAX_FILE_SIZE_MB=0
volumes:
- ./mediacache:/app/mediacache
When a user stars an entry, its images/video/audio are downloaded to the VPS disk in the background; when the star is removed, the cached media is deleted (with reference counting so files shared across starred entries survive). Two new config options:
MEDIA_CACHE_DIRECTORY — set to enable the feature (empty = disabled, a no-op). Files shard as
/<hash[:2]>/. MEDIA_CACHE_MAX_FILE_SIZE_MB — per-file cap; 0 = unlimited.Important operational note: cached media is served only through the existing /proxy/ endpoint. So the cache is useful only when the media proxy is enabled for the relevant types
MEDIA_PROXY_MODE must not be none (http-only or all), and MEDIA_PROXY_RESOURCE_TYPES must include the types you want served (default is image only — add video,audio to protect those).
ai的说明: ExtractMediaURLs gates on the exact same mediaproxy.ShouldProxifyURLWithMimeType decision the rewriter uses, so what gets cached and what gets served can never diverge. A DB migration runs on next startup, creating the entry_media_cache table (with a url_hash reference index and ON DELETE CASCADE on entries). Wired star paths: UI toggle, API toggle + batch + import, Fever saved/unsaved, Google Reader starred/unstarred — all fire go mediacache.SyncEntryStarredState(...). Safety: downloads go through the existing fetcher (SSRF-protected), cache paths are traversal-checked, the HMAC proxy signature is preserved, and http.ServeContent handles Range requests for video/audio seeking. The status check now accepts only 200 OK (never 206, since no Range header is sent). Verification: go build ./... exit 0, go vet clean on touched packages, mediacache tests pass, non-DB suites pass. (The one failing config test — TestParseAdminPasswordFileOptionWithEmptyFile — is a pre-existing environmental issue on Windows, confirmed identical on a clean tree.)
Miniflux is a minimalist and opinionated feed reader. It's simple, fast, lightweight and super easy to install.
Official website: https://miniflux.app
- Supported feed formats: Atom 0.3/1.0, RSS 1.0/2.0, and JSON Feed 1.0/1.1.
- OPML file import/export and URL import.
- Supports multiple attachments (podcasts, videos, music, and images enclosures).
- Plays videos from YouTube directly inside Miniflux.
- Organizes articles using categories and bookmarks.
- Share individual articles publicly.
- Fetches website icons (favicons).
- Saves articles to third-party services.
- Provides full-text search (powered by Postgres).
- Available in 20 languages: Portuguese (Brazilian), Chinese (Simplified and Traditional), Dutch, English (US), Finnish, French, German, Greek, Hindi, Indonesian, Italian, Japanese, Polish, Romanian, Russian, Taiwanese POJ, Ukrainian, Spanish, and Turkish.
- Removes pixel trackers.
- Strips tracking parameters from URLs (e.g.,
utm_source,utm_medium,utm_campaign,fbclid, etc.). - Retrieves original links when feeds are sourced from FeedBurner.
- Opens external links with attributes
rel="noopener noreferrer" referrerpolicy="no-referrer"for improved security. - Implements the HTTP header
Referrer-Policy: no-referrerto prevent referrer leakage. - Provides a media proxy to avoid tracking and resolve mixed content warnings when using HTTPS.
- Plays YouTube videos via the privacy-focused domain
youtube-nocookie.com. - Supports alternative YouTube video players such as Invidious.
- Blocks external JavaScript to prevent tracking and enhance security.
- Sanitizes external content before rendering it.
- Enforces a Content Security and a Trusted Types Policy to only application JavaScript and blocks inline scripts and styles.
- Optionally disable HTTP/2 to mitigate fingerprinting.
- Allows configuration of a custom user agent.
- Supports adding custom cookies for specific use cases.
- Enables the use of proxies for enhanced privacy or bypassing restrictions.
- Fetches the original article and extracts only the relevant content using a local Readability parser.
- Allows custom scraper rules based on CSS selectors.
- Supports custom rewriting rules for content manipulation.
- Provides a regex filter to include or exclude articles based on specific patterns.
- Optionally permits self-signed or invalid certificates (disabled by default).
- Scrapes YouTube's website to retrieve video duration as read time or uses the YouTube API (disabled by default).
- Optimized stylesheet for readability.
- Responsive design that adapts seamlessly to desktop, tablet, and mobile devices.
- Minimalistic and distraction-free user interface.
- No requirement to download an app from Apple App Store or Google Play Store.
- Can be added directly to the home screen for quick access.
- Supports a wide range of keyboard shortcuts for efficient navigation.
- Optional touch gesture support for navigation on mobile devices.
- Custom stylesheets and JavaScript to personalize the user interface to your preferences.
- Themes:
- Light (Sans-Serif)
- Light (Serif)
- Dark (Sans-Serif)
- Dark (Serif)
- System (Sans-Serif) – Automatically switches between Dark and Light themes based on system preferences.
- System (Serif)
- 25+ integrations with third-party services: Apprise, Betula, Cubox, Discord, Espial, Instapaper, LinkAce, Linkding, LinkTaco, LinkWarden, Matrix, Notion, Ntfy, Nunux Keeper, Pinboard, Pushover, RainDrop, Readeck, Readwise Reader, RssBridge, Shaarli, Shiori, Slack, Telegram, Wallabag, etc.
- Bookmarklet for subscribing to websites directly from any web browser.
- Webhooks for real-time notifications or custom integrations.
- Compatibility with existing mobile applications using the Fever or Google Reader API.
- REST API with client libraries available in Go and Python.
- Local username and password.
- Passkeys (WebAuthn).
- Google (OAuth2).
- Generic OpenID Connect.
- Reverse-Proxy authentication.
- Written in Go (Golang).
- Single binary compiled statically without dependency.
- Works only with PostgreSQL.
- Does not use any ORM or any complicated frameworks.
- Uses modern vanilla JavaScript only when necessary.
- All static files are bundled into the application binary using the Go
embedpackage. - Supports the Systemd
sd_notifyprotocol for process monitoring. - Configures HTTPS automatically with Let's Encrypt.
- Allows the use of custom SSL certificates.
- Supports HTTP/2 when TLS is enabled.
- Updates feeds in the background using an internal scheduler or a traditional cron job.
- Uses native lazy loading for images and iframes.
- Compatible only with modern browsers.
- Adheres to the Twelve-Factor App methodology.
- Provides official Debian/RPM packages and pre-built binaries.
- Publishes a Docker image to Docker Hub, GitHub Registry, and Quay.io Registry, with ARM and RISC-V architecture support.
- Uses a limited amount of third-party go dependencies
- Has a comprehensive testsuite, with both unit tests and integration tests.
- Only uses a couple of MB of memory and a negligible amount of CPU, even with several hundreds of feeds.
- Respects/sends Last-Modified, If-Modified-Since, If-None-Match, Cache-Control, Expires and ETags headers, and has a default polling interval of 1h.
The Miniflux documentation is available here: https://miniflux.app/docs/ (Man page)
- Opinionated?
- Features
- Requirements
- Installation Instructions
- Upgrading to a New Version
- Configuration
- Command Line Usage
- User Interface Usage
- Keyboard Shortcuts
- Integration with External Services
- Rewrite and Scraper Rules
- API Reference
- Development
- Internationalization
- Frequently Asked Questions
Default theme:
Dark theme when using keyboard navigation:
- Authors: Frédéric Guillot - List of contributors
- Distributed under Apache 2.0 License

