Skip to content

junlongzzz/file-download-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Download Agent

file download agent server written in golang.

Features

  • Download file from url
  • Download file from local file
  • Serve WebDAV server

Compile

go build -o fda .
chmod +x fda

Run

  • Show usage
./fda -h
  • Args
./fda --host=127.0.0.1 --port=18080 --sign-key=<your_sign_key> --dir=./files
  • Env
export FDA_HOST=127.0.0.1
export FDA_PORT=18080
export FDA_SIGN_KEY=<your_sign_key>
export FDA_DIR=./files
./fda
  • Proxy
export HTTP_PROXY=http://<your_proxy_host>:<your_proxy_port>
export HTTPS_PROXY=http://<your_proxy_host>:<your_proxy_port>
./fda
task run

Docker

docker run -d --name file-download-agent -p 18080:18080 -e FDA_PORT=18080 junlongzzz/file-download-agent

Docker Compose

services:
  file-download-agent:
    image: junlongzzz/file-download-agent
    container_name: file-download-agent
    restart: always
    ports:
      - 18080:18080
    volumes:
      - ./files:/app/files
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
    environment:
      - FDA_PORT=18080
      - FDA_SIGN_KEY=<your-sign-key>

Usage

http://localhost:18080
http://localhost:18080/download
http://localhost:18080/webdav

Releases

No releases published