mirror of
https://github.com/wahyd4/aria2-ariang-docker.git
synced 2026-08-09 13:26:07 +10:00
Compare commits
76
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2761bce49a | ||
|
|
a323036beb | ||
|
|
a5a0437b2d | ||
|
|
bf5d416c32 | ||
|
|
53b72f121a | ||
|
|
56ca73734f | ||
|
|
32d7ad7dbe | ||
|
|
83cd4cd048 | ||
|
|
025ab4d568 | ||
|
|
bf54cf929b | ||
|
|
478b4a0bd8 | ||
|
|
baeae63b49 | ||
|
|
85cd7bb39b | ||
|
|
2e15256f68 | ||
|
|
44b80d8d4a | ||
|
|
68980742f2 | ||
|
|
7327766b25 | ||
|
|
f0f51a6d3d | ||
|
|
feaee60510 | ||
|
|
7ac1a17a35 | ||
|
|
18afebb3d0 | ||
|
|
74f9facb1f | ||
|
|
46ac16cd44 | ||
|
|
a8dc6c2dd7 | ||
|
|
187d6d0e93 | ||
|
|
7f54b16b33 | ||
|
|
631690a78a | ||
|
|
f73acf5bc5 | ||
|
|
cc09684c70 | ||
|
|
2a2b520a6f | ||
|
|
b199a28365 | ||
|
|
0a8f98eef5 | ||
|
|
6c8318d9c1 | ||
|
|
5fd5f4ce17 | ||
|
|
50688a3f36 | ||
|
|
f211c6d1db | ||
|
|
ff481ea1bc | ||
|
|
01fd23d42f | ||
|
|
3551ae0cc1 | ||
|
|
03943996dc | ||
|
|
a9236ef0a9 | ||
|
|
6fa402a13c | ||
|
|
c4e530e8f6 | ||
|
|
adfe41d96f | ||
|
|
7a214e1251 | ||
|
|
ba2978d70a | ||
|
|
fedbae4c87 | ||
|
|
d7553a9c2f | ||
|
|
2a6760adfb | ||
|
|
df32852e79 | ||
|
|
696c0c2058 | ||
|
|
1c08fa7404 | ||
|
|
7fa8628072 | ||
|
|
62138a0c2d | ||
|
|
9e22d35376 | ||
|
|
101b54dad2 | ||
|
|
f40da84029 | ||
|
|
8c71545ef8 | ||
|
|
8655369728 | ||
|
|
6bcbf54eef | ||
|
|
61a0e8fd9a | ||
|
|
380f71358c | ||
|
|
d120e4a4a0 | ||
|
|
2d5e92e5f8 | ||
|
|
455f20e0dd | ||
|
|
7cca87aef4 | ||
|
|
80508b5c83 | ||
|
|
22a43434d0 | ||
|
|
2f40100ed2 | ||
|
|
f467c2d03f | ||
|
|
343770aa31 | ||
|
|
6785b30a97 | ||
|
|
8ba0361cf4 | ||
|
|
c43b5a23e5 | ||
|
|
f9fd76ae43 | ||
|
|
cc4a2bbd9c |
+30
@@ -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}
|
||||
@@ -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
@@ -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" ]
|
||||
@@ -0,0 +1,88 @@
|
||||
Aria2 + AriaNg
|
||||
|
||||
English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/master/README.md)
|
||||
|
||||
[](https://microbadger.com/images/wahyd4/aria2-ui "Get your own image badge on microbadger.com")
|
||||
[](https://hub.docker.com/r/wahyd4/aria2-ui/)
|
||||
[](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
|
||||

|
||||
|
||||
File Browser
|
||||

|
||||
## 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.
|
||||
@@ -1 +1,100 @@
|
||||
Aria2 + AriaNg
|
||||
|
||||
[English](https://github.com/wahyd4/aria2-ariang-docker/blob/master/README.EN.md) | 简体中文
|
||||
|
||||
[](https://microbadger.com/images/wahyd4/aria2-ui "Get your own image badge on microbadger.com")
|
||||
[](https://hub.docker.com/r/wahyd4/aria2-ui/)
|
||||
[](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
|
||||

|
||||
|
||||
File Browser
|
||||

|
||||
## 功能特性
|
||||
|
||||
* 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/)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
@@ -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" ]
|
||||
@@ -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" ]
|
||||
@@ -1,20 +0,0 @@
|
||||
{$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
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
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" ]
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
{$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}
|
||||
|
||||
}
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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,10 +46,13 @@ 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
|
||||
#You can set either debug, info, notice, warn or error.
|
||||
log-level=error
|
||||
log-level=notice
|
||||
|
||||
|
||||
## 进度保存相关 ##
|
||||
@@ -60,5 +63,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.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 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
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Reference in New Issue
Block a user