Compare commits

...
Author SHA1 Message Date
junv 2761bce49a Close #27, Somehow a hack way to allow user use /ui access /ui/ 2019-05-17 23:33:17 +10:00
junv a323036beb Correct badges 2019-05-17 23:22:12 +10:00
junv a5a0437b2d fix the build 2019-05-17 23:16:12 +10:00
junv bf5d416c32 Try to tricky way to sharing docker image between stages 2019-05-17 23:10:52 +10:00
junv 53b72f121a Replace circle ci with travis ci 2019-05-17 22:54:31 +10:00
junv 56ca73734f Fix the pipeline... 2019-05-17 22:29:50 +10:00
junv 32d7ad7dbe Try to export tag 2019-05-17 22:27:05 +10:00
junv 83cd4cd048 Passing image tag id by using environment variables 2019-05-17 22:22:13 +10:00
junv 025ab4d568 Merge branch 'master' of github.com:wahyd4/aria2-ariang-docker 2019-05-17 22:14:34 +10:00
junv bf54cf929b enable docker layers caching, so the image can be pass on 2019-05-17 22:13:46 +10:00
junv 478b4a0bd8 enable docker layers caching, so the image can be pass on 2019-05-17 22:11:14 +10:00
junvandGitHub baeae63b49 Merge pull request #33 from wahyd4/junwei/remove-file-browser-from-caddy
Junwei/remove file browser from caddy
2019-05-17 22:02:11 +10:00
junv 85cd7bb39b update caddy config and fix shell command issue 2019-05-17 22:00:02 +10:00
junv 2e15256f68 get rid of file browser plugin mode 2019-05-17 16:39:04 +10:00
junv 44b80d8d4a Remove duplicated vesion key 2019-05-05 19:29:56 +10:00
junv 68980742f2 Pipeline configuration fix 2019-05-05 19:28:32 +10:00
junv 7327766b25 fix format issue 2019-05-05 19:22:21 +10:00
junv f0f51a6d3d Update pipeline script, and skip push docker image on non master branches 2019-05-05 19:16:12 +10:00
junv feaee60510 update readme 2019-04-09 11:15:57 +10:00
junv 7ac1a17a35 Update docs for solving no speed issue. 2019-03-16 11:02:43 +08:00
junv 18afebb3d0 fix build script 2019-03-16 10:32:53 +08:00
junvandGitHub 74f9facb1f Merge pull request #25 from wahyd4/file-browser-db
File browser db
2019-03-16 10:27:00 +08:00
junv 46ac16cd44 only push docker image on master branch 2019-03-16 10:22:11 +08:00
junv a8dc6c2dd7 Add ability to volume file browser settings db 2019-03-16 10:16:13 +08:00
junv 187d6d0e93 Update naming to file browser 2019-03-16 09:44:43 +08:00
junvandGitHub 7f54b16b33 Merge pull request #24 from wahyd4/restructure
Restructure docker image
2019-03-15 11:21:38 +08:00
junv 631690a78a Restructure docker image 2019-03-15 11:20:26 +08:00
junvandGitHub f73acf5bc5 Merge pull request #23 from wahyd4/changing-urls
Changing urls
2019-03-15 11:12:00 +08:00
junv cc09684c70 Update the ariang url to /ui/ 2019-03-15 11:10:51 +08:00
junv 2a2b520a6f Change the file manager url path to root and ariang to /aria/ 2019-03-15 11:09:32 +08:00
junv b199a28365 Change the log level back to default to show more information 2019-03-15 10:52:29 +08:00
junvandGitHub 0a8f98eef5 Merge pull request #22 from wahyd4/ipv6
#21 Disable ipv6 by default to solve the dns issue
2019-03-15 10:50:22 +08:00
junv 6c8318d9c1 #21 Disable ipv6 by default to solve the dns issue 2019-03-15 10:48:42 +08:00
junv 5fd5f4ce17 Update best trackers 2019-03-03 08:27:38 +11:00
junvandGitHub 50688a3f36 Update README.md 2019-02-21 07:46:45 +11:00
junvandGitHub f211c6d1db Update README.md 2019-02-19 17:39:37 +11:00
junv ff481ea1bc Update naming of image tag 2019-02-19 17:17:09 +11:00
junv 01fd23d42f try 2019-02-19 17:13:48 +11:00
junv 3551ae0cc1 update setting 2019-02-19 17:12:28 +11:00
junv 03943996dc update config 2019-02-19 17:08:53 +11:00
junv a9236ef0a9 Update the name of file manager to file browser 2019-02-19 10:57:51 +11:00
junv 6fa402a13c Update caddy script to fix the build 2019-02-19 10:26:20 +11:00
junvandGitHub c4e530e8f6 Update trackers 2019-02-01 11:56:48 +11:00
junv adfe41d96f Update readme 2019-01-03 17:15:44 +11:00
junvandGitHub 7a214e1251 Merge pull request #14 from wahyd4/arm
Add arm32/64 support
2019-01-03 16:57:20 +11:00
junv ba2978d70a #13 Add arm32 cpu support 2019-01-03 16:54:31 +11:00
junv fedbae4c87 #13 Add arm64 cpu support 2019-01-03 16:51:04 +11:00
junv d7553a9c2f Correct url 2018-12-15 17:51:43 +11:00
junv 2a6760adfb Merge branch 'master' of github.com:wahyd4/aria2-ariang-docker 2018-12-15 17:31:19 +11:00
junv df32852e79 bump ariang to 1.0.0 2018-12-15 17:31:02 +11:00
junvandGitHub 696c0c2058 #11 Update document about how to enable HTTPS 2018-12-10 09:35:35 +11:00
junv 1c08fa7404 Fix the file manager authentication issue 2018-08-03 18:57:42 +10:00
junv 7fa8628072 Wording change 2018-07-11 23:01:35 +10:00
junv 62138a0c2d Add instruction to allow user to build their own docker image 2018-07-11 22:54:33 +10:00
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
23 changed files with 455 additions and 249 deletions
+30
View File
@@ -0,0 +1,30 @@
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
@@ -0,0 +1,36 @@
{$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
@@ -0,0 +1,38 @@
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
@@ -0,0 +1,88 @@
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 +1,100 @@
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
@@ -0,0 +1,39 @@
{$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
@@ -0,0 +1,30 @@
#! /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
@@ -0,0 +1,38 @@
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
@@ -0,0 +1,38 @@
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" ]
-16
View File
@@ -1,16 +0,0 @@
{$DOMAIN} {
proxy / file-manager:80 {
transparent
}
gzip
log stdout
errors stdout
}
{$DOMAIN}/aria2 {
root /usr/local/www/aria2
timeouts none
gzip
log stdout
errors stdout
}
-40
View File
@@ -1,40 +0,0 @@
FROM abiosoft/caddy
MAINTAINER Junv<wahyd4@gmail.com>
WORKDIR /root
ENV RPC_SECRET=Hello
ENV ENABLE_AUTH=false
ENV DOMAIN=localhost:80
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
# For build image in local quickly
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
RUN apk update && apk add wget bash curl 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 \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/0.2.0/aria-ng-0.2.0.zip && unzip aria-ng-0.2.0.zip && rm -rf aria-ng-0.2.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" ]
-21
View File
@@ -1,21 +0,0 @@
{$DOMAIN} {
proxy / file-manager:80 {
transparent
}
gzip
log stdout
errors stdout
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
}
{$DOMAIN}/aria2 {
root /usr/local/www/aria2
timeouts none
gzip
log stdout
errors stdout
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
}
-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
+19 -3
View File
@@ -37,7 +37,7 @@ max-upload-limit=0
#referer=*
#文件保存路径, 默认为当前启动位置
# dir=/user-files/superuser/
dir=/var/www
dir=/data
#文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用, 需要1.16及以上版本
#disk-cache=0
#另一种Linux文件缓存方式, 使用前确保您使用的内核支持此选项, 需要1.15及以上版本(?)
@@ -46,6 +46,22 @@ dir=/var/www
#所需时间 none < falloc ? trunc « prealloc, falloc和trunc需要文件系统和内核支持
file-allocation=prealloc
# disable IPV6 by default
disable-ipv6=true
# General Options
log=var/log/aria2.log
log-level=info
log=/var/log/aria2.log
#You can set either debug, info, notice, warn or error.
log-level=notice
## 进度保存相关 ##
# 从会话文件中读取下载任务
input-file=/root/conf/aria2.session
# 在Aria2退出时保存`错误/未完成`的下载任务到会话文件
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
View File
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

-29
View File
@@ -1,29 +0,0 @@
FROM nginx:alpine
MAINTAINER junv<wahyd4@gmail.com>
# For build image in local quickly
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
RUN apk update && apk add wget bash curl openrc screen aria2 tar --no-cache
COPY aria2.conf /root
COPY aria2c.sh /root
COPY nginx.conf /etc/nginx/nginx.conf
COPY conf.d/ /etc/nginx/conf.d/
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 \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/0.2.0/aria-ng-0.2.0.zip && unzip aria-ng-0.2.0.zip && rm -rf aria-ng-0.2.0.zip \
&& chmod -R 755 /usr/local/www/aria2 \
&& chmod +x /root/aria2c.sh
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log
EXPOSE 6800 80
CMD ["sh", "/root/aria2c.sh" ]
-50
View File
@@ -1,50 +0,0 @@
#用户名
#rpc-user=user
#密码
#rpc-passwd=passwd
#上面的认证方式不建议使用,建议使用下面的token方式
#设置加密的密钥
#rpc-secret=token
#允许rpc
enable-rpc=true
#允许所有来源, web界面跨域权限需要
rpc-allow-origin-all=true
#允许外部访问,false的话只监听本地端口
rpc-listen-all=true
#RPC端口, 仅当默认端口被占用时修改
#rpc-listen-port=6800
#最大同时下载数(任务数), 路由建议值: 3
max-concurrent-downloads=5
#断点续传
continue=true
#同服务器连接数
max-connection-per-server=5
#最小文件分片大小, 下载线程数上限取决于能分出多少片, 对于小文件重要
min-split-size=10M
#单文件最大线程数, 路由建议值: 5
split=10
#下载速度限制
max-overall-download-limit=0
#单文件速度限制
max-download-limit=0
#上传速度限制
max-overall-upload-limit=0
#单文件速度限制
max-upload-limit=0
#断开速度过慢的连接
#lowest-speed-limit=0
#验证用,需要1.16.1之后的release版本
#referer=*
#文件保存路径, 默认为当前启动位置
dir=/user-files/superuser/
#文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用, 需要1.16及以上版本
#disk-cache=0
#另一种Linux文件缓存方式, 使用前确保您使用的内核支持此选项, 需要1.15及以上版本(?)
#enable-mmap=true
#文件预分配, 能有效降低文件碎片, 提高磁盘性能. 缺点是预分配时间较长
#所需时间 none < falloc ? trunc « prealloc, falloc和trunc需要文件系统和内核支持
file-allocation=prealloc
# General Options
# log=var/log/aria2.log
# log-level=info
-4
View File
@@ -1,4 +0,0 @@
#!/bin/sh
echo "Run aria2c and ariaNG"
/usr/bin/aria2c --conf-path="/root/aria2.conf" -D --enable-rpc --rpc-listen-all \
&& nginx -g 'daemon off;'
-32
View File
@@ -1,32 +0,0 @@
server{
# server_name localhost;
listen 80;
client_max_body_size 10240M;
location / {
proxy_pass http://file-manager-server;
proxy_set_header Host $http_host;
client_max_body_size 10240M;
}
location /aria2 {
# try_files $uri $uri/ /index.html;
root /usr/local/www/;
index index.html index.htm;
proxy_set_header Host $http_host;
}
# location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|css|js|woff2)$ {
# expires 24h;
# access_log off;
# add_header Cache-Control "public";
# }
}
upstream file-manager-server {
server file-manager;
}
-30
View File
@@ -1,30 +0,0 @@
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
server_names_hash_bucket_size 128;
include /etc/nginx/conf.d/*.conf;
}