Compare commits

..
Author SHA1 Message Date
junv beb61ed92d Improvment URL path requires tailing splash thing https://github.com/wahyd4/aria2-ariang-x-docker-compose/issues/65 2019-05-22 16:48:50 +10:00
junvandGitHub 032ad5b590 Update trackers 2019-02-01 11:58:03 +11:00
junv 58c51f29e5 Fix url 2018-12-15 18:22:35 +11:00
junv 74d17bcf60 bump ariang to 1.0.0 2018-12-15 17:33:38 +11:00
junv f7b68935d7 Update ariang to 0.4.0 2018-07-11 22:55:31 +10:00
junv a6004c686e Conflicts:
caddy/Dockerfile
2018-01-21 23:14:55 +11:00
junv fb51d5fefe Update h5ai port mapping to 8080 instead of 80. 2017-12-16 16:37:29 +11:00
junv f9bfb3d3d1 Update AriaNg to 0.3 release. 2017-12-16 16:06:10 +11:00
junv 7dca0fb354 Add bt-tracker server. 2017-09-18 17:44:29 +08:00
junv 81b8e1f2be Add ability to store and retore unfinished tasks. 2017-09-17 10:47:18 +08:00
18 changed files with 114 additions and 443 deletions
-30
View File
@@ -1,30 +0,0 @@
services:
- docker
env:
global:
- NAME=aria2-ui
- CACHE_FOLDER=$HOME/docker-images
- CACHE_FILE=${CACHE_FOLDER}/${NAME}-${TRAVIS_COMMIT}.tgz
jobs:
include:
- stage: build docker image
script:
- docker build -t wahyd4/aria2-ui:1.0.${TRAVIS_BUILD_NUMBER} .
- mkdir -p ${CACHE_FOLDER}
- docker save wahyd4/aria2-ui:1.0.${TRAVIS_BUILD_NUMBER} | gzip -c > ${CACHE_FILE}
- stage: push docker image
if: branch = master
script: |
if [[ -f ${CACHE_FILE} ]]; then docker load -i ${CACHE_FILE}; fi
if [ "${TRAVIS_BRANCH}" == "master" ]; then
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker tag wahyd4/aria2-ui:1.0.$TRAVIS_BUILD_NUMBER wahyd4/aria2-ui:latest
docker push wahyd4/aria2-ui:1.0.$TRAVIS_BUILD_NUMBER
docker push wahyd4/aria2-ui:latest
fi
cache:
directories:
- ${CACHE_FOLDER}
-36
View File
@@ -1,36 +0,0 @@
{$DOMAIN} {
proxy / localhost:8080 {
transparent
}
log stdout
errors stdout
gzip
}
{$DOMAIN}/ui {
root /usr/local/www/aria2
timeouts none
gzip
log stdout
errors stdout
}
{$DOMAIN}/css {
root /usr/local/www/aria2/css
gzip
}
{$DOMAIN}/js {
root /usr/local/www/aria2/js
gzip
}
{$DOMAIN}/fonts {
root /usr/local/www/aria2/fonts
gzip
}
{$DOMAIN}/langs {
root /usr/local/www/aria2/langs
gzip
}
-38
View File
@@ -1,38 +0,0 @@
FROM alpine:edge
LABEL AUTHOR=Junv<wahyd4@gmail.com>
WORKDIR /root
ENV RPC_SECRET=Hello
ENV ENABLE_AUTH=false
ENV DOMAIN=0.0.0.0:80
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
RUN apk update \
&& apk add wget bash curl openrc gnupg screen aria2 tar --no-cache
RUN curl https://getcaddy.com | bash -s personal
RUN curl -fsSL https://filebrowser.xyz/get.sh | bash
RUN mkdir -p /usr/local/www && mkdir -p /usr/local/www/aria2
ADD conf /root/conf
COPY aria2c.sh /root
COPY Caddyfile SecureCaddyfile /usr/local/caddy/
# AriaNg
RUN mkdir /usr/local/www/aria2/Download && cd /usr/local/www/aria2 \
&& chmod +rw /root/conf/aria2.session \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/1.0.0/AriaNg-1.0.0.zip && unzip AriaNg-1.0.0.zip && rm -rf AriaNg-1.0.0.zip \
&& chmod -R 755 /usr/local/www/aria2 \
&& chmod +x /root/aria2c.sh
#The folder to store ssl keys
VOLUME /root/conf/key
# User downloaded files
VOLUME /data
EXPOSE 6800 80 443
CMD ["/bin/sh", "/root/aria2c.sh" ]
-88
View File
@@ -1,88 +0,0 @@
Aria2 + AriaNg
English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/master/README.md)
[![](https://images.microbadger.com/badges/image/wahyd4/aria2-ui.svg)](https://microbadger.com/images/wahyd4/aria2-ui "Get your own image badge on microbadger.com")
[![Docker Pulls](https://img.shields.io/docker/pulls/wahyd4/aria2-ui.svg)](https://hub.docker.com/r/wahyd4/aria2-ui/)
[![Build Status](https://travis-ci.org/wahyd4/aria2-ariang-docker.svg?branch=master)](https://travis-ci.org/wahyd4/aria2-ariang-docker)
- [Features](#features)
- [How to run](#how-to-run)
- [Simple Usage](#simple-usage)
- [Fully Usage](#fully-usage)
- [Supported Environment Variables](#supported-environment-variables)
- [Supported Volumes](#supported-volumes)
- [Docker Hub](#docker-hub)
- [Usage it in Docker compose](#usage-it-in-docker-compose)
- [FAQ](#faq)
Aria2
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.png)
File Browser
![File Browser](https://github.com/wahyd4/aria2-ariang-docker/raw/master/filemanager.png)
## Features
* Aria2 (SSL support)
* AriaNg
* Auto HTTPS Let's Encrypt
* Basic Auth
* File indexing and video playing ([File Browser](https://filebrowser.xyz/))
* Add support for ARM CPUs, please choose correct [docker image TAG](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags)
## How to run
### Simple Usage
```shell
docker run -d --name aria2-ui -p 80:80 -p 6800:6800 wahyd4/aria2-ui
```
* Aria2: <http://yourip/ui/> **The tailling `/` is necessary**
* FileManger: <http://yourip>
* Please use admin/admin as username and password to login
### Fully Usage
```bash
docker run -d --name ariang \
-p 80:80 -p 6800:6800 -p 443:443 \
-e ENABLE_AUTH=true \
-e RPC_SECRET=Hello \
-e DOMAIN=example.com \
-e ARIA2_USER=user \
-e ARIA2_PWD=pwd \
-v /yourdata:/data \
-v /root/a.db:/root/filebrowser.db \
-v /yoursslkeys/:/root/conf/key \
-v <to your aria2.conf>:/root/conf/aria2.conf \
wahyd4/aria2-ui
```
### Supported Environment Variables
* ENABLE_AUTH enable Basic auth
* ARIA2_USER Basic Auth username
* ARIA2_PWD Basic Auth
* RPC_SECRET The Aria2 RPC secret token
* DOMAIN The domain you'd like to bind
### Supported Volumes
* `/data` The folder of all Aria2 downloaded files.
* `/root/conf/key` The folder which stored Aria2 SSL `certificate` and `key` file. `Notice`: The certificate file should be named `aria2.crt` and the key file should be named `aria2.key`
* `/root/conf/aria2.conf` The Aria2 configuration file.
* `/root/filebrowser.db` File Browser settings db, make sure you make a empty file first on your host.
## Docker Hub
<https://hub.docker.com/r/wahyd4/aria2-ui/>
## Usage it in Docker compose
Please refer <https://github.com/wahyd4/aria2-ariang-x-docker-compose>
## FAQ
1. If there is no speed at all when you downloading a BitTorrent file, please try to use a popular torrent file first to help the application to cache `DHT` file. Then the speed should get fast and fast, as well as downloading other links.
-99
View File
@@ -1,100 +1 @@
Aria2 + AriaNg
[English](https://github.com/wahyd4/aria2-ariang-docker/blob/master/README.EN.md) | 简体中文
[![](https://images.microbadger.com/badges/image/wahyd4/aria2-ui.svg)](https://microbadger.com/images/wahyd4/aria2-ui "Get your own image badge on microbadger.com")
[![Docker Pulls](https://img.shields.io/docker/pulls/wahyd4/aria2-ui.svg)](https://hub.docker.com/r/wahyd4/aria2-ui/)
[![Build Status](https://travis-ci.org/wahyd4/aria2-ariang-docker.svg?branch=master)](https://travis-ci.org/wahyd4/aria2-ariang-docker)
本镜像包含 Aria2、AriaNg 和File Manager,主要方便那些用户期望只运行一个镜像就能实现图形化下载文件和在线播放文件。(类似离线下载的功能),只使用一个 Docker 镜像也方便用户在群晖NAS 中运行本程序。
- [功能特性](#功能特性)
- [推荐使用的docker image tag](#推荐使用的docker-image-tag)
- [安装于运行](#安装于运行)
- [快速运行](#快速运行)
- [开启所有功能](#开启所有功能)
- [支持的 Docker 环境变量](#支持的-docker-环境变量)
- [支持的 Docker volume 属性](#支持的-docker-volume-属性)
- [自行构建镜像](#自行构建镜像)
- [Docker Hub](#docker-hub)
- [使用 Docker compose 来运行](#使用-docker-compose-来运行)
- [常见问题](#常见问题)
Aria2
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.png)
File Browser
![File Browser](https://github.com/wahyd4/aria2-ariang-docker/raw/master/filemanager.png)
## 功能特性
* Aria2 (SSL 支持)
* AriaNg 通过 UI 来操作,下载文件
* 自动 HTTPS Let's Encrypt
* Basic Auth 用户认证
* 文件管理和视频播放 ([File Browser](https://filebrowser.xyz/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
* 支持ARM CPU 架构,因此可以在树莓派中运行,请下载对应的[ARM TAG](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags) 版本, `arm32``arm64`
## 推荐使用的docker image tag
* latest
* arm32
* arm64
## 安装于运行
### 快速运行
```shell
docker run -d --name aria2-ui -p 80:80 -p 6800:6800 wahyd4/aria2-ui
```
* Aria2: <http://yourip/ui/> **最后的斜线必须带上!**
* FileManger: <http://yourip>
* 请使用 admin/admin 进行登录
### 开启所有功能
```bash
docker run -d --name ariang \
-p 80:80 -p 6800:6800 -p 443:443 \
-e ENABLE_AUTH=true \
-e RPC_SECRET=Hello \
-e DOMAIN=example.com \
-e ARIA2_USER=user \
-e ARIA2_PWD=pwd \
-v /yourdata:/data \
-v /root/a.db:/root/filebrowser.db \
-v /yoursslkeys/:/root/conf/key \
-v <to your aria2.conf>:/root/conf/aria2.conf \
wahyd4/aria2-ui
```
### 支持的 Docker 环境变量
* ENABLE_AUTH 启用 Basic auth 用户认证
* ARIA2_USER Basic Auth 用户认证用户名
* ARIA2_PWD Basic Auth 密码
* RPC_SECRET Aria2 RPC 加密 token
* DOMAIN 绑定的域名, 当绑定的域名为`HTTPS`时,即为启用`HTTPS` 例: `DOMAIN=https://toozhao.com`
### 支持的 Docker volume 属性
* `/data` 用来放置所有下载的文件的目录
* `/root/conf/key` 用户来放置 Aria2 SSL `certificate`证书和 `key` 文件. `注意`: 证书的名字必须是 `aria2.crt` Key 文件的名字必须是 `aria2.key`
* `/root/conf/aria2.conf` 为 aria2 的配置文件,你可以映射自己的配置文件。
* `/root/filebrowser.db` File Browser 的内嵌数据库,升级Docker 镜像也不用担心之前的设置丢失。请确保在宿主机先创建一个空文件再使用。
## 自行构建镜像
```
docker build -t aria2-ui .
```
## Docker Hub
<https://hub.docker.com/r/wahyd4/aria2-ui/>
## 使用 Docker compose 来运行
请参考 <https://github.com/wahyd4/aria2-ariang-x-docker-compose>
## 常见问题
1. 下载的BT或者磁力完全没有速度怎么办? 建议先下载一个热门的BT种子文件,而不是磁力链接。这样可以帮助缓存DHT文件,渐渐地,速度就会起来了。比如试试下载树莓派操作系统的BT种子?[前往下载](https://www.raspberrypi.org/downloads/raspbian/)
-39
View File
@@ -1,39 +0,0 @@
{$DOMAIN} {
proxy / localhost:8080 {
transparent
}
gzip
log stdout
errors stdout
}
{$DOMAIN}/ui {
root /usr/local/www/aria2
timeouts none
gzip
log stdout
errors stdout
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
}
{$DOMAIN}/css {
root /usr/local/www/aria2/css
gzip
}
{$DOMAIN}/js {
root /usr/local/www/aria2/js
gzip
}
{$DOMAIN}/fonts {
root /usr/local/www/aria2/fonts
gzip
}
{$DOMAIN}/langs {
root /usr/local/www/aria2/langs
gzip
}
-30
View File
@@ -1,30 +0,0 @@
#! /bin/bash -eu
echo "Run aria2c and ariaNG"
if [ "$ENABLE_AUTH" = "true" ]; then
echo "Using Basic Auth config file "
CADDY_FILE=/usr/local/caddy/SecureCaddyfile
else
echo "Using caddy without Basic Auth"
CADDY_FILE=/usr/local/caddy/Caddyfile
fi
if [ "$SSL" = "true" ]; then
echo "Start aria2 with secure config"
/usr/bin/aria2c --conf-path="/root/conf/aria2.conf" -D \
--enable-rpc --rpc-listen-all \
--rpc-certificate=/root/conf/key/aria2.crt \
--rpc-private-key=/root/conf/key/aria2.key \
--rpc-secret="$RPC_SECRET" --rpc-secure \
&& (nohup sh -c "/usr/local/bin/filebrowser -d /root/filebrowser.db -l /var/log/file-browser/out.log -r /data" &)\
&& /usr/local/bin/caddy -quic --conf ${CADDY_FILE}
else
echo "Start aria2 with standard mode"
/usr/bin/aria2c --conf-path="/root/conf/aria2.conf" -D \
--enable-rpc --rpc-listen-all \
&& (nohup sh -c "/usr/local/bin/filebrowser -d /root/filebrowser.db -l /var/log/file-browser/out.log -r /data" &)\
&& /usr/local/bin/caddy -quic --conf ${CADDY_FILE}
fi
-38
View File
@@ -1,38 +0,0 @@
FROM arm32v6/alpine:edge
LABEL AUTHOR=Junv<wahyd4@gmail.com>
WORKDIR /root
ENV RPC_SECRET=Hello
ENV ENABLE_AUTH=false
ENV DOMAIN=0.0.0.0:80
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
RUN apk update && apk add wget bash curl openrc gnupg screen aria2 tar --no-cache
RUN curl https://getcaddy.com | bash -s personal http.filebrowser
ADD conf /root/conf
COPY aria2c.sh /root
COPY Caddyfile SecureCaddyfile /usr/local/caddy/
RUN mkdir -p /usr/local/www && mkdir -p /usr/local/www/aria2
#AriaNg
RUN mkdir /usr/local/www/aria2/Download && cd /usr/local/www/aria2 \
&& chmod +rw /root/conf/aria2.session \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/1.0.0/AriaNg-1.0.0.zip && unzip AriaNg-1.0.0.zip && rm -rf AriaNg-1.0.0.zip \
&& chmod -R 755 /usr/local/www/aria2 \
&& chmod +x /root/aria2c.sh
#The folder to store ssl keys
VOLUME /root/conf/key
# User downloaded files
VOLUME /data
EXPOSE 6800 80 443
CMD ["/bin/sh", "/root/aria2c.sh" ]
-38
View File
@@ -1,38 +0,0 @@
FROM arm64v8/alpine:edge
LABEL AUTHOR=Junv<wahyd4@gmail.com>
WORKDIR /root
ENV RPC_SECRET=Hello
ENV ENABLE_AUTH=false
ENV DOMAIN=0.0.0.0:80
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
RUN apk update && apk add wget bash curl openrc gnupg screen aria2 tar --no-cache
RUN curl https://getcaddy.com | bash -s personal http.filebrowser
ADD conf /root/conf
COPY aria2c.sh /root
COPY Caddyfile SecureCaddyfile /usr/local/caddy/
RUN mkdir -p /usr/local/www && mkdir -p /usr/local/www/aria2
#AriaNg
RUN mkdir /usr/local/www/aria2/Download && cd /usr/local/www/aria2 \
&& chmod +rw /root/conf/aria2.session \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/1.0.0/AriaNg-1.0.0.zip && unzip AriaNg-1.0.0.zip && rm -rf AriaNg-1.0.0.zip \
&& chmod -R 755 /usr/local/www/aria2 \
&& chmod +x /root/aria2c.sh
#The folder to store ssl keys
VOLUME /root/conf/key
# User downloaded files
VOLUME /data
EXPOSE 6800 80 443
CMD ["/bin/sh", "/root/aria2c.sh" ]
+20
View File
@@ -0,0 +1,20 @@
{$DOMAIN} {
proxy / file-manager:8080 {
transparent
}
gzip
log stdout
errors stdout
}
{$DOMAIN}/aria2 {
redir / /aria2/ 301
}
{$DOMAIN}/aria2/ {
root /usr/local/www/aria2
timeouts none
gzip
log stdout
errors stdout
}
+41
View File
@@ -0,0 +1,41 @@
FROM abiosoft/caddy
MAINTAINER Junv<wahyd4@gmail.com>
WORKDIR /root
ENV RPC_SECRET=Hello
ENV ENABLE_AUTH=false
ENV DOMAIN=:80
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
# For build image in local quickly in China
# RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
RUN apk update && apk add wget bash curl gnupg openrc screen aria2 tar --no-cache
ADD conf /root/conf
COPY Caddyfile /usr/local/caddy/Caddyfile
COPY SecureCaddyfile /usr/local/caddy/SecureCaddyfile
RUN mkdir -p /usr/local/www && mkdir -p /usr/local/www/aria2
#AriaNg
RUN mkdir /usr/local/www/aria2/Download && cd /usr/local/www/aria2 \
&& chmod +rw /root/conf/aria2.session \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/1.0.0/AriaNg-1.0.0.zip && unzip AriaNg-1.0.0.zip && rm -rf AriaNg-1.0.0.zip \
&& chmod -R 755 /usr/local/www/aria2 \
&& chmod +x /root/conf/aria2c.sh
#The folder to store ssl keys
VOLUME /root/conf/key
EXPOSE 6800 80 443
ENTRYPOINT ["/bin/sh", "/root/conf/aria2c.sh"]
# CMD ["/bin/sh", "/root/aria2c.sh" ]
+25
View File
@@ -0,0 +1,25 @@
{$DOMAIN} {
proxy / file-manager:8080 {
transparent
}
gzip
log stdout
errors stdout
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
}
{$DOMAIN}/aria2 {
redir / /aria2/ 301
}
{$DOMAIN}/aria2/ {
root /usr/local/www/aria2
timeouts none
gzip
log stdout
errors stdout
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
}
+4 -7
View File
@@ -37,7 +37,7 @@ max-upload-limit=0
#referer=*
#文件保存路径, 默认为当前启动位置
# dir=/user-files/superuser/
dir=/data
dir=/var/www
#文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用, 需要1.16及以上版本
#disk-cache=0
#另一种Linux文件缓存方式, 使用前确保您使用的内核支持此选项, 需要1.15及以上版本(?)
@@ -46,13 +46,10 @@ dir=/data
#所需时间 none < falloc ? trunc « prealloc, falloc和trunc需要文件系统和内核支持
file-allocation=prealloc
# disable IPV6 by default
disable-ipv6=true
# General Options
log=/var/log/aria2.log
#You can set either debug, info, notice, warn or error.
log-level=notice
log-level=error
## 进度保存相关 ##
@@ -63,5 +60,5 @@ save-session=/root/conf/aria2.session
# 定时保存会话, 0为退出时才保存, 需1.16.1以上版本, 默认:0
save-session-interval=10
# BT trackers from https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best_ip.txt
bt-tracker=udp://62.138.0.158:6969/announce,udp://188.241.58.209:6969/announce,udp://188.241.58.209:6969/announce,udp://185.225.17.100:1337/announce,udp://62.210.79.110:1337/announce,udp://151.80.120.114:2710/announce,udp://151.80.120.112:2710/announce,udp://208.83.20.20:6969/announce,udp://176.113.68.67:8080/announce,udp://184.105.151.164:6969/announce,udp://176.113.68.66:6961/announce,http://176.113.71.19:6961/announce,udp://51.15.40.114:80/announce,udp://89.234.156.205:451/announce,udp://5.206.58.23:6969/announce,udp://176.31.106.35:80/announce,udp://188.246.227.212:80/announce,udp://5.2.79.219:1337/announce,udp://5.2.79.22:6969/announce,http://95.107.48.115:80/announce
# BT trackers from https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_best.txt
bt-tracker=udp://tracker.coppersurfer.tk:6969/announce,udp://tracker.open-internet.nl:6969/announce,udp://tracker.leechers-paradise.org:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://tracker.internetwarriors.net:1337/announce,udp://9.rarbg.to:2710/announce,udp://exodus.desync.com:6969/announce,udp://tracker1.itzmx.com:8080/announce,http://tracker3.itzmx.com:6961/announce,udp://explodie.org:6969/announce,udp://tracker2.itzmx.com:6961/announce,udp://tracker.torrent.eu.org:451/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker.port443.xyz:6969/announce,udp://thetracker.org:80/announce,udp://open.demonii.si:1337/announce,udp://ipv4.tracker.harry.lu:80/announce,udp://denis.stalker.upeer.me:6969/announce,udp://bt.xxx-tracker.com:2710/announce,http://tracker4.itzmx.com:2710/announce
+24
View File
@@ -0,0 +1,24 @@
#!/bin/sh
echo "Run aria2c and ariaNG"
echo $ENABLE_AUTH
if [ "$ENABLE_AUTH" = "true" ]; then
echo "using basic auth config file "
CADDY_FILE=/usr/local/caddy/SecureCaddyfile
else
CADDY_FILE=/usr/local/caddy/Caddyfile
fi
if [ "$SSL" = "true" ]; then
echo "Start aria2 with secure config"
/usr/bin/aria2c --conf-path="/root/conf/aria2.conf" -D --enable-rpc --rpc-listen-all --rpc-certificate=/root/conf/key/aria2.crt --rpc-private-key=/root/conf/key/aria2.key --rpc-secret="$RPC_SECRET" --rpc-secure \
&& caddy -quic --conf ${CADDY_FILE}
else
echo "Start aria2 with standard mode"
/usr/bin/aria2c --conf-path="/root/conf/aria2.conf" -D --enable-rpc --rpc-listen-all \
&& caddy -quic --conf ${CADDY_FILE}
fi
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB