An enhancement overlay for RSSHub
- Load Balance
- Machine Translate
- Image Proxy
- Request RSSHub endpoint (through JSON format) till one success, or 503
- (Optional) Send to machine translate and cache results
- (Optional) Apply image proxy rules
- Re-construct feed to target format
Configuration is combined of 4 parts: system, rsshub, translate and image_proxy. An example can be referred from config.yml.example.
systempart defines the basic info of this application, every field is required.rsshubpart defines all RSSHub instance and their corresponding preferences (preferred platforms and whether it can work as a fallback instance). Different RSSHub has different configuration options, so offload different requests to different instances effectively should be helpful. Or if just one single RSSHub instance is provided, skipplatformsfield and setfallbacktotrueto handle all incoming requests.translatedefines the service provider and other request details. We are using subdomain to identify target language to provide a smooth experience for end users, which is configured byhost_base: in example configuration, our translate-enabled domain is*.rsl.localhost. For example, if we requestzh.rsl.locahost, thenzhwill be select as target language. Different translate provider has different settings, forlibretranslatewe are using YAML format. Please refer to different provider settings.image_proxyprovides a simple image proxy service to bypass image protect mechanisms. To provide more flexibility, we don't pre-define any built-in rules here, please add your own rules for different platforms.
Only system and rsshub parts are required, if you don't want translate or image_proxy function, simply delete them.
Based on random numbers.
Maybe add redis based load-balance in the future.
- LibreTranslate
- Copy
modules/translate/providers/libretranslatedirectory and rename to your target provider - Update relative codes (settings, initializer, translate func)
- Update
modules/translate/providers/new.gofunc, add your provider
Currently only Origin and Referer can be specified.
Maybe add more options in the future.
Follows RSSHub format query, currently 3 formats:
rss: RSS 2.0 (default / fallback)atom: Atomjson: JSON Feed