1 Star 6 Fork 1

staugur / down2local

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

down2local

Download transit program to help you download remote resources through an intermediate service.

(CN:下载中转程序,帮助你通过一个中间服务下载远程资源!)

down2local.png

Deploy (Production)

1. download

git clone https://github.com/staugur/down2local.git
cd down2local

2. install

  • 2.1 dependencies

    yarn --prod
  • 2.2 pm2/forever(Choose one)

    • 2.2.1 pm2

      sudo yarn global add pm2 # or local install with `yarn add pm2`
    • 2.2.2 forever

      sudo yarn global add forever # or local install with `yarn add forever`

3. process manager

App default listen on 127.0.0.1:5201, you can set it on config.json

  • 3.1 pm2

    yarn pm2:[start/stop/restart/reload]
  • 3.2 forever

    yarn fe:[start/stop/restart]
  • 3.3 docker

    • Build Docker Image:

      docker build -t down2local .
      //or
      docker pull staugur/down2local
    • Run Container

      docker run -d --name down2local --restart=always --net=host staugur/down2local

4. Nginx (optional)

server {
    listen 80;
    server_name YOUR-DOMAIN-NAME;
    charset utf-8;
    location / {
       proxy_pass http://127.0.0.1:5201;
       proxy_set_header Host $host;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-Proto $scheme;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

Usage

  1. download with query

    wget --content-disposition YOUR-DOMAIN-NAME/get?url=YOUR-DOWNLOAD-URL
    curl -O YOUR-DOMAIN-NAME/get?url=YOUR-DOWNLOAD-URL
  2. download with pathname(recommend)

    wget YOUR-DOMAIN-NAME/get/YOUR-DOWNLOAD-URL
    curl -O YOUR-DOMAIN-NAME/get/YOUR-DOWNLOAD-URL

Development

yarn      # install all dependencies
yarn dev  # start app with auto reload
BSD 3-Clause License Copyright (c) 2020, Hiroshi.tao All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

Download transit program(下载中转) 展开 收起
JavaScript 等 2 种语言
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/staugur/down2local.git
git@gitee.com:staugur/down2local.git
staugur
down2local
down2local
master

搜索帮助