download icon indicating copy to clipboard operation
download copied to clipboard

feat: support URL rewriting

Open gera2ld opened this issue 5 years ago • 0 comments

Allow rewriting URLs before download starts. This is useful for cases with network problems. We can easily change the prefixes of the URLs to our mirrors by creating a ~/.downloadrc like this:

{
  "rewrite": {
    "https://raw.githubusercontent.com/imagemin/cwebp-bin/": "https://npm.taobao.org/mirrors/cwebp-bin/",
    "https://raw.githubusercontent.com/imagemin/mozjpeg-bin/": "https://npm.taobao.org/mirrors/mozjpeg-bin/",
    "https://raw.githubusercontent.com/imagemin/pngquant-bin/": "https://npm.taobao.org/mirrors/pngquant-bin/"
  }
}

gera2ld avatar Jun 13 '20 02:06 gera2ld