Compare commits

..
22 Commits
Author SHA1 Message Date
junv 9e22d35376 Bump up to 0.4.0 2018-05-17 16:54:14 +10:00
junv 101b54dad2 Refine the Dockerfile 2018-05-17 16:50:14 +10:00
junvandGitHub f40da84029 Update README.md 2018-05-10 15:51:33 +10:00
junv 8c71545ef8 Add username and password 2018-01-26 22:52:07 +11:00
junv 8655369728 #2 Set aria2 default log level to error. 2018-01-21 23:10:48 +11:00
junv 6bcbf54eef Update readme about how to mount aria2 configuration file. 2017-12-24 16:22:21 +11:00
junv 61a0e8fd9a Update AriaNg to 0.3 release. 2017-12-16 15:38:13 +11:00
junv 380f71358c Add gnupg to verify package. 2017-12-16 15:12:33 +11:00
junv d120e4a4a0 Update docker image, the previous one is a wrong one for chinese document version. 2017-12-16 15:05:56 +11:00
junv 2d5e92e5f8 Update readme by adding some links. 2017-09-25 16:32:20 +08:00
junv 455f20e0dd Add badge. 2017-09-25 16:20:50 +08:00
junv 7cca87aef4 update readme. 2017-09-25 16:03:46 +08:00
junv 80508b5c83 Update readme. 2017-09-25 16:01:45 +08:00
junv 22a43434d0 Add chinese readme and set it by default. 2017-09-25 15:59:35 +08:00
junv 2f40100ed2 Update docker file by enable caddy filemanager plugin. 2017-09-25 13:07:53 +08:00
junv f467c2d03f Add bt-tracker servers. 2017-09-18 17:41:52 +08:00
junv 343770aa31 Add ability to store and retore unfinished tasks. 2017-09-17 11:03:37 +08:00
junv 6785b30a97 update docker file about binding IP. 2017-09-13 09:42:04 +08:00
junv 8ba0361cf4 Fix typo. 2017-09-07 10:16:28 +08:00
junv c43b5a23e5 remove some special signals. 2017-09-06 11:37:12 +08:00
junv f9fd76ae43 Update dockerfile and readme. 2017-09-06 11:32:52 +08:00
junv cc4a2bbd9c Update dockerfile for aria2-ariang/ 2017-09-06 11:09:17 +08:00
9 changed files with 208 additions and 68 deletions
+70
View File
@@ -0,0 +1,70 @@
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")
<!-- TOC -->
- [Features](#features)
- [How to run](#how-to-run)
- [Simple Usage](#simple-usage)
- [Full Usage](#full-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)
<!-- /TOC -->
Aria2
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.png)
File Manager
![Filemanager](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 Manager](https://henriquedias.com/filemanager/))
## How to run
### Simple Usage
```shell
docker run -d --name ariang -p 80:80 -p 6800:6800 wahyd4/aria2-ui
```
* Aria2: <http://yourip>
* FileManger: <http://yourip/files>
* Please use admin/admin as username and password to login
### Full Usage
```shell
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 /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.
## 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>
+71
View File
@@ -1 +1,72 @@
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/)
本镜像包含 Aria2、AriaNg 和File Manager,主要方便那些用户期望只运行一个镜像就能实现图形化下载文件和在线播放文件。(类似离线下载的功能),只使用一个 Docker 镜像也方便用户在群晖NAS 中运行本程序。
<!-- TOC -->
- [功能特性](#功能特性)
- [安装于运行](#安装于运行)
- [快速运行](#快速运行)
- [开启所有功能](#开启所有功能)
- [支持的 Docker 环境变量](#支持的-docker-环境变量)
- [支持的 Docker volume 属性](#支持的-docker-volume-属性)
- [Docker Hub](#docker-hub)
- [使用 Docker compose 来运行](#使用-docker-compose-来运行)
<!-- /TOC -->
Aria2
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.png)
File Manager
![Filemanager](https://github.com/wahyd4/aria2-ariang-docker/raw/master/filemanager.png)
## 功能特性
* Aria2 (SSL 支持)
* AriaNg 通过 UI 来操作,下载文件
* 自动 HTTPS Let's Encrypt
* Basic Auth 用户认证
* 文件管理和视频播放 ([File Manager](https://henriquedias.com/filemanager/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
## 安装于运行
### 快速运行
```shell
docker run -d --name ariang -p 80:80 -p 6800:6800 wahyd4/aria2-ui
```
* Aria2: <http://yourip>
* FileManger: <http://yourip/files>
* 请使用 admin/admin 进行登录
### 开启所有功能
```shell
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 /yoursslkeys/:/root/conf/key -v -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 绑定的域名
### 支持的 Docker volume 属性
* `/data` 用来放置所有下载的文件的目录
* `/root/conf/key` 用户来放置 Aria2 SSL `certificate`证书和 `key` 文件. `注意`: 证书的名字必须是 `aria2.crt` Key 文件的名字必须是 `aria2.key`
* `/root/conf/aria2.conf` 为 aria2 的配置文件,你可以映射自己的配置文件。
## Docker Hub
<https://hub.docker.com/r/wahyd4/aria2-ui/>
## 使用 Docker compose 来运行
请参考 <https://github.com/wahyd4/aria2-ariang-x-docker-compose>
+8 -13
View File
@@ -1,20 +1,15 @@
{$DOMAIN} {
proxy / file-manager:80 {
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
}
{$DOMAIN}/files {
filemanager / /data
}
+16 -14
View File
@@ -1,41 +1,43 @@
FROM abiosoft/caddy
MAINTAINER Junv<wahyd4@gmail.com>
FROM alpine:edge
LABEL AUTHOR=Junv<wahyd4@gmail.com>
WORKDIR /root
ENV RPC_SECRET=Hello
ENV ENABLE_AUTH=false
ENV DOMAIN=:80
ENV DOMAIN=0.0.0.0: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
RUN apk update && apk add wget bash curl openrc gnupg screen aria2 tar --no-cache
RUN curl https://getcaddy.com | bash -s personal http.filemanager
ADD conf /root/conf
COPY aria2c.sh /root
COPY Caddyfile /usr/local/caddy/Caddyfile
COPY SecureCaddyfile /usr/local/caddy/SecureCaddyfile
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/conf/aria2c.sh
&& chmod +rw /root/conf/aria2.session \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/0.4.0/aria-ng-0.4.0.zip && unzip aria-ng-0.4.0.zip && rm -rf aria-ng-0.4.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
ENTRYPOINT ["/bin/sh", "/root/conf/aria2c.sh"]
# CMD ["/bin/sh", "/root/aria2c.sh" ]
CMD ["/bin/sh", "/root/aria2c.sh" ]
+9 -14
View File
@@ -1,18 +1,4 @@
{$DOMAIN} {
proxy / file-manager:80 {
transparent
}
gzip
log stdout
errors stdout
}
{$DOMAIN}/aria2 {
redir / /aria2/ 301
}
{$DOMAIN}/aria2/ {
root /usr/local/www/aria2
timeouts none
gzip
@@ -22,3 +8,12 @@
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
}
{$DOMAIN}/files {
gzip
log stdout
errors stdout
filemanager / /data
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
}
+29
View File
@@ -0,0 +1,29 @@
#! /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 \
&& 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
+5 -3
View File
@@ -36,8 +36,8 @@ max-upload-limit=0
#验证用,需要1.16.1之后的release版本
#referer=*
#文件保存路径, 默认为当前启动位置
dir=/user-files/superuser/
# dir=/var/www
# dir=/user-files/superuser/
dir=/data
#文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用, 需要1.16及以上版本
#disk-cache=0
#另一种Linux文件缓存方式, 使用前确保您使用的内核支持此选项, 需要1.15及以上版本(?)
@@ -61,4 +61,6 @@ save-session=/root/conf/aria2.session
save-session-interval=10
# 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
bt-tracker=udp://tracker.skyts.net:6969/announce,udp://tracker.safe.moe:6969/announce,udp://tracker.piratepublic.com:1337/announce,udp://tracker.pirateparty.gr:6969/announce,udp://tracker.coppersurfer.tk:6969/announce,udp://tracker.leechers-paradise.org:6969/announce,udp://allesanddro.de:1337/announce,udp://9.rarbg.com:2710/announce,http://p4p.arenabg.com:1337/announce,udp://p4p.arenabg.com:1337/announce,udp://tracker.opentrackr.org:1337/announce,udp://tracker.internetwarriors.net:1337/announce,http://tracker.opentrackr.org:1337/announce,udp://public.popcorn-tracker.org:6969/announce,udp://tracker2.wasabii.com.tw:6969/announce,udp://tracker2.christianbro.pw:6969/announce,udp://tracker1.xku.tv:6969/announce,udp://tracker1.wasabii.com.tw:6969/announce,udp://tracker.zer0day.to:1337/announce,udp://peerfect.org:6969/announce
-24
View File
@@ -1,24 +0,0 @@
#!/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.

After

Width:  |  Height:  |  Size: 29 KiB