Compare commits

..
50 Commits
Author SHA1 Message Date
junvandGitHub 6c04b6ac25 Merge pull request #112 from wahyd4/rclone
Rclone
2020-09-13 00:57:23 +10:00
junv c36e68fb82 Update readme 2020-09-13 00:54:15 +10:00
junv 44bd3f7183 Update readme 2020-09-13 00:50:29 +10:00
junv 6dac58c8a8 Fix docker build 2020-09-13 00:24:30 +10:00
junv 79c6dd7874 Apply rclone feature to arm images 2020-09-13 00:19:01 +10:00
junv c0e66890ad Update webgui cache folder to solve the permission issue for non root user 2020-09-13 00:06:01 +10:00
junv e9e3e4083c Start integrating rclone, had rclone running but missing default configuration file 2020-09-12 17:07:12 +10:00
junvandGitHub d64c15de5e Update README.md 2020-09-12 07:57:16 +10:00
junvandGitHub ff51d1ae77 Update README.md 2020-08-30 19:57:12 +10:00
junvandGitHub c7ade53ded Update README.md 2020-08-30 19:53:21 +10:00
junvandGitHub a143c3ba81 Update README.md 2020-08-09 15:50:56 +10:00
junvandGitHub 91320c0b5e Update README.md 2020-08-08 00:08:23 +10:00
junvandGitHub 36add55978 Update README.md 2020-08-06 09:19:33 +10:00
junv 8c6e3d14cf wording change 2020-07-25 17:19:05 +10:00
junvandGitHub 39ef5ae91e Merge pull request #108 from wahyd4/filebrowser-2.5.0
bump filebrowser to 2.5.0
2020-07-25 17:06:39 +10:00
junv 671be70304 bump filebrowser to 2.5.0 2020-07-25 17:03:14 +10:00
junvandGitHub 123d88a269 Merge pull request #107 from wahyd4/no-auto-caddy-installation-script
Update caddy installation script due to the old one has been deleted
2020-07-25 16:48:50 +10:00
junv 3278cb4cfe Update caddy installation script due to the old one has been deleted 2020-07-25 16:45:41 +10:00
junvandGitHub bfe24f109f Create stale.yaml 2020-07-24 11:16:50 +10:00
junvandGitHub 1f2e432d32 Merge pull request #104 from wahyd4/fix-auto-https
Try to fix the issue of auto ssl
2020-06-25 00:13:03 +10:00
junv 15279ef33a Update dockerfile for arm CPUs accordingly 2020-06-25 00:10:00 +10:00
junv 68f75b3b3b Try to fix the issue of auto ssl 2020-06-25 00:03:17 +10:00
junvandGitHub a2a19dcf79 Merge pull request #103 from wahyd4/update-filebrowser-and-ariang
Update Filebrowser and Ariang
2020-06-24 23:44:38 +10:00
junv 73bba0edc1 Update Filebrowser and Ariang 2020-06-24 23:41:42 +10:00
junv d7599bda00 add suggestion about running this docker image on raspberry pi 2020-04-08 08:02:21 +10:00
junvandGitHub 9a86dad52c Merge pull request #93 from wahyd4/rollback-filebrowser
Rollback to file browser 2.0.16 to solve the share links problem
2020-04-02 14:48:04 +11:00
junv 4a76af2ea6 Rollback to file browser 2.0.16 to solve the share links problem 2020-04-02 14:42:57 +11:00
junvandGitHub ea6398227d Merge pull request #88 from wahyd4/update-filebrowser
Update file browser to the latest release version
2020-04-01 07:51:11 +11:00
junv 532ec227bf Update file browser to the latest release version 2020-04-01 07:48:11 +11:00
junvandGitHub 9230a74017 Merge pull request #85 from comicchang/master
write RPC_SECRET to AriaNG config
2020-04-01 07:33:00 +11:00
junvandGitHub b8bbebdcb3 Merge pull request #86 from yingshaoxo/master
set bittorrent seed-ratio to 100 by default; warning user to mount /app/conf
2020-03-31 17:22:56 +11:00
yingshaoxo 5782a27a72 change provide 2020-03-31 14:11:19 +08:00
yingshaoxo 2a4159b004 set bittorrent seed-ratio to 100 by default; warning user to mount /app/conf 2020-03-31 12:11:37 +08:00
Comic Chang 4128723308 write RPC_SECRET to AriaNG config 2020-03-18 12:25:01 +08:00
junv 4c16558d9a Update filebrower version to v2.0.16 2019-12-24 11:26:35 +11:00
junvandGitHub efb06e6c4d Merge pull request #79 from wahyd4/new-trackers
Update trackers
2019-12-24 11:25:03 +11:00
junv 6fdd4e91e1 Update trackers 2019-12-24 11:23:05 +11:00
junvandGitHub 19b76d87a8 Merge pull request #78 from wahyd4/some-wording-change
Some wording change based on the change from @sanjusss
2019-12-24 11:14:05 +11:00
junv 39ee538b56 Some wording change based on the change from @sanjusss 2019-12-24 11:03:32 +11:00
junvandGitHub 384b3d88c5 Merge pull request #77 from sanjusss/fix-76
fix #76
2019-12-24 10:59:31 +11:00
sanjusss 00527d3f19 fix #76 2019-12-23 21:54:12 +08:00
junvandGitHub 74061ac37d Merge pull request #72 from wahyd4/add-docker-scan
Add docker image scan
2019-11-14 09:14:13 +11:00
junv 332cbd4921 Add docker image scan 2019-11-14 09:08:13 +11:00
junvandGitHub 3ba668552a Merge pull request #70 from wahyd4/junwei/no-localhost
Don't use localhost to avoid some weird dns issue in some cases
2019-10-28 09:30:40 +11:00
junv 477ce7d086 Don't use localhost to avoid some weired dns issue in some cases 2019-10-28 09:28:36 +11:00
junvandGitHub 995eefa545 Merge pull request #68 from wahyd4/junwei/minor-md-update
Update readme to specify protocol when binding domain
2019-10-26 21:40:01 +11:00
junvandGitHub 9dbaa62d38 Merge branch 'master' into junwei/minor-md-update 2019-10-26 21:39:42 +11:00
junv 7b53a0a3ea Update readme to specify protocol when binding domain 2019-10-26 21:39:07 +11:00
junvandGitHub 9a1d31e937 Merge pull request #65 from wahyd4/junwei/ariang-1.1.4
Bump Ariang to 1.1.4
2019-10-22 15:12:21 +11:00
junv b6b6ed6f57 bump ariang to 1.1.4 2019-10-22 15:09:53 +11:00
16 changed files with 255 additions and 49 deletions
-3
View File
@@ -1,3 +0,0 @@
README*.md
LICENSE
.github
+17
View File
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: "Closed due to no further updates have been provided."
+15
View File
@@ -0,0 +1,15 @@
name: Docker Image Vulnability Check
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build the Docker image
run: docker build . --file Dockerfile --tag local/aria-ui:latest
- name: Scan image
uses: anchore/scan-action@master
with:
image-reference: "local/aria-ui:latest"
dockerfile-path: "./Dockerfile"
fail-build: true
+15 -4
View File
@@ -1,9 +1,9 @@
{$DOMAIN} {
proxy / file-manager {
proxy / 127.0.0.1:8080 {
transparent
}
proxy /jsonrpc localhost:6800 {
proxy /jsonrpc 127.0.0.1:6800 {
transparent
websocket
}
@@ -21,6 +21,17 @@
root /usr/local/www/aria2
timeouts none
gzip
log stdout
errors stdout
errors stderr
}
{$DOMAIN}/rclone {
redir / /rclone/ 301
}
{$DOMAIN}/rclone/ {
proxy / 127.0.0.1:5572/ {
transparent
}
gzip
errors stderr
}
+27 -7
View File
@@ -1,4 +1,4 @@
FROM alpine:edge
FROM alpine:latest
LABEL AUTHOR=Junv<wahyd4@gmail.com>
@@ -10,21 +10,42 @@ ENV DOMAIN=0.0.0.0:80
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
ENV ARIA2_SSL=false
ENV ARIA2_EXTERNAL_PORT=80
ENV PUID=1000
ENV PGID=1000
ENV CADDYPATH=/app
ENV RCLONE_CONFIG=/app/conf/rclone.conf
RUN adduser -D -u 1000 junv \
&& apk update \
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar --no-cache \
&& curl https://getcaddy.com | bash -s personal \
&& caddy_tag=v1.0.4 \
&& wget -N https://github.com/caddyserver/caddy/releases/download/${caddy_tag}/caddy_${caddy_tag}_linux_amd64.tar.gz \
&& tar -zxvf caddy_${caddy_tag}_linux_amd64.tar.gz \
&& mv caddy /usr/local/bin/ \
&& rm -rf caddy_${caddy_tag}_linux_amd64.tar.gz \
&& filebrowser_version=v2.5.0 \
&& platform=linux-amd64 \
&& wget -N https://github.com/filebrowser/filebrowser/releases/download/${filebrowser_version}/${platform}-filebrowser.tar.gz \
&& tar -zxvf ${platform}-filebrowser.tar.gz \
&& rm -rf ${platform}-filebrowser.tar.gz \
&& rm LICENSE README.md CHANGELOG.md \
&& wget -N https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-${platform}.tgz \
&& tar -zxvf forego-stable-${platform}.tgz \
&& rm -rf forego-stable-${platform}.tgz \
&& mkdir -p /usr/local/www \
&& mkdir -p /usr/local/www/aria2
&& mkdir -p /usr/local/www/aria2 \
&& rm -rf init /app/*.txt \
&& curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip \
&& unzip rclone-*.zip \
&& cd rclone-*-linux-amd64 \
&& cp rclone /usr/local/bin/ \
&& chown junv:junv /usr/local/bin/rclone \
&& chmod 755 /usr/local/bin/rclone \
&& rm /app/rclone-*.zip \
&& rm -rf /app/rclone-*
ADD aria2c.sh caddy.sh Procfile init.sh start.sh /app/
ADD aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh /app/
ADD conf /app/conf
ADD Caddyfile SecureCaddyfile /usr/local/caddy/
@@ -32,12 +53,11 @@ ADD Caddyfile SecureCaddyfile /usr/local/caddy/
RUN mkdir /usr/local/www/aria2/Download \
&& cd /usr/local/www/aria2 \
&& chmod +rw /app/conf/aria2.session \
&& version=1.1.1 \
&& version=1.1.6 \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip \
&& unzip AriaNg-${version}.zip \
&& rm -rf AriaNg-${version}.zip \
&& chmod -R 755 /usr/local/www/aria2 \
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
&& chmod -R 755 /usr/local/www/aria2
# folder for storing ssl keys
VOLUME /app/conf/key
+2
View File
@@ -1,2 +1,4 @@
filebrowser: /app/filebrowser -p 8080 -d /app/filebrowser.db -r /data
caddy: /app/caddy.sh
aria2c: /app/aria2c.sh
rclone: /app/rclone.sh
+18 -9
View File
@@ -32,8 +32,9 @@ File Browser
## 功能特性
* Aria2 (SSL 支持)
* AriaNg 通过 UI 来操作,下载文件
* [Aria2](https://aria2.github.io) 文件下载工具(支持SSL )
* [AriaNg](https://github.com/mayswind/AriaNg) 通过 UI 来操作,下载文件
* [Rclone](https://rclone.org) 同步文件到云盘
* 自动 HTTPS Let's Encrypt
* 支持绑定自定义用户ID,可以主机上的非`root`用户,也可以管理下载的文件
* Basic Auth 用户认证
@@ -46,6 +47,8 @@ File Browser
* wahyd4/aria2-ui:arm32
* wahyd4/aria2-ui:arm64
> ‼️ 如果你在莓派上运行本程序,请使用 `arm32` 版本
## 安装于运行
### 快速运行
@@ -56,7 +59,8 @@ File Browser
* Aria2: <http://yourip/ui/>
* FileManger: <http://yourip>
* 请使用 admin/admin 进行登录
* Rclone: <http://yourip/rclone>
* 请使用 admin/admin 进行登录, 在如果没有修改`ARIA2_USER`,`ARIA2_PWD`的情况下,请使用`user`/`password`登录`Rclone`
### 开启所有功能
```bash
docker run -d --name ariang \
@@ -70,10 +74,11 @@ File Browser
-e ARIA2_SSL=false \
-e ARIA2_USER=user \
-e ARIA2_PWD=pwd \
-e ARIA2_EXTERNAL_PORT=443 \
-v /yourdata:/data \
-v /app/a.db:/app/filebrowser.db \
-v /yoursslkeys/:/app/conf/key \
-v <the folder of aria2.conf and aria2.session>:/app/conf \
-v <conf files folder>:/app/conf \
wahyd4/aria2-ui
```
### 使用docker-compose 运行
@@ -89,7 +94,7 @@ services:
- ENABLE_AUTH=true
- ARIA2_USER=hello
- ARIA2_PWD=world
- DOMAIN=toozhao.com
- DOMAIN=http://toozhao.com
volumes:
- ./data:/data
```
@@ -98,8 +103,9 @@ services:
### 支持的 Docker 环境变量
* ENABLE_AUTH 启用 Basic auth(网页简单认证) 用户认证
* ARIA2_USER Basic Auth 用户认证用户名
* ARIA2_PWD Basic Auth 密码
* ARIA2_USER Basic Auth 用户认证用户名Rclone也使用该参数
* ARIA2_PWD Basic Auth 密码Rclone也使用该参数
* ARIA2_EXTERNAL_PORT 从外部可以访问到的 Aria2 端口,默认为 HTTP 的`80`
* PUID 需要绑定主机的Linux用户ID,可以通过`cat /etc/passwd` 查看用户列表, 默认UID 是`1000`
* PGID 需要绑定的主机的Linux 用户组ID,默认GID 是`1000`
* RPC_SECRET Aria2 RPC 加密 token
@@ -109,7 +115,10 @@ services:
### 支持的 Docker volume 属性
* `/data` 用来放置所有下载的文件的目录
* `/app/conf/key` 用户来放置 Aria2 SSL `certificate`证书和 `key` 文件. `注意`: 证书的名字必须是 `aria2.crt` Key 文件的名字必须是 `aria2.key`
* `/app/conf` 该目录下可以放置你的自定义`aria2.conf`配置文件,`aria2.session`,且必须包含这两个文件。第一次使用`aria2.session`时,创建一个空文件即可,该文件会包含aria2当前的下载列表,这样即使容器被销毁也不用担心文件列表丢失了。你也可以直接拷贝当前项目下`conf`目录中的两个文件并使用。
* `/app/conf` 该目录下可以放置你的自定义`aria2.conf`配置文件,`aria2.session`,且必须包含这两个文件。第一次使用`aria2.session`时,创建一个空文件即可,该文件会包含aria2当前的下载列表,这样即使容器被销毁也不用担心文件列表丢失了。你也可以直接拷贝当前项目下`conf`目录中的两个文件并使用。如需映射rclone.conf到容器内,请将其就放置于该目录下。因此配置文件目录支持的所有配置文件为:
* aria2.conf
* aria2.session
* rclone.conf
* `/app/filebrowser.db` File Browser 的内嵌数据库,升级Docker 镜像也不用担心之前的设置丢失。请确保在宿主机先创建一个空文件再使用。
## 自动 SSL
@@ -135,6 +144,6 @@ docker build -t aria2-ui .
请参考 <https://github.com/wahyd4/aria2-ariang-x-docker-compose>
## 常见问题
1. 当你以非其他`80` 端口或以启用了HTTPS`443`端口运行程序时,会出现`Aria2 状态 未连接`的错误,这是因为在最新版本里面,我们去掉aria2的独立6800端口,转而使用和网站同一个端口。因为你需要渠道 `AriaNg设置` -> 页面顶端的 `RPC`页面,将你的Aria2 RPC 地址中的端口从`80`改成你使用的正确端口。因为 AriaNg 仅仅将设置保存在浏览器中,因为当你使用不同的浏览器,或者将浏览器清除缓存后,你都需要重新设置一次
1. 当你以非其他`80` 端口或以启用了HTTPS`443`端口运行程序时,会出现`Aria2 状态 未连接`的错误,这是因为在最新版本里面,我们去掉aria2的独立6800端口,转而使用和网站同一个端口。你可以设置`ARIA2_EXTERNAL_PORT`后重建你的容器
2. 下载的BT或者磁力完全没有速度怎么办? 建议先下载一个热门的BT种子文件,而不是磁力链接。这样可以帮助缓存DHT文件,渐渐地,速度就会起来了。比如试试下载树莓派操作系统的BT种子?[前往下载](https://www.raspberrypi.org/downloads/raspbian/)
3. 如果你遇到了和 `setcap` 相关的错误,很大程度说明你说运行的Linux不支持使用非`root`用户来运行本Docker 镜像,因此请显式地设置环境变量`PUID` `PGID``0` ,也就是使用`root` 来运行
+26 -10
View File
@@ -5,6 +5,9 @@ English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/mast
[![](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/)
[![Github Build](https://github.com/wahyd4/aria2-ariang-docker/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/wahyd4/aria2-ariang-docker/actions)
[![Page Views Count](https://badge.home.toozhao.com/svg/aria2-ariang-docker)](https://badge.home.toozhao.com/svg/aria2-ariang-docker "Page Views Count")
**If you like this, please consider support me / 如果喜欢,请考虑打赏,谢谢!**
<img src="https://raw.githubusercontent.com/wahyd4/work-in-australia/766592ac6318027d7b3c334d8c50ca80818eeff8/wepay.jpg" alt="buy me a drink" width="120"/>
@@ -36,8 +39,9 @@ File Browser
## Features
* Aria2 (SSL support)
* AriaNg
* [Aria2 (SSL support)](https://aria2.github.io)
* [AriaNg](https://github.com/mayswind/AriaNg)
* [Rclone](https://rclone.org/)
* Auto HTTPS Let's Encrypt
* Bind non root user into container, so non root user can also manage downloaded files.
* Basic Auth
@@ -50,6 +54,8 @@ File Browser
* wahyd4/aria2-ui:arm32
* wahyd4/aria2-ui:arm64
> ‼️ If you plan to run this docker image on Raspberry Piplease use tag `arm32`
## How to run
### Quick run
@@ -60,7 +66,8 @@ File Browser
* Aria2: <http://yourip/ui/>
* FileManger: <http://yourip>
* Please use `admin`/`admin` as username and password to login for the first time.
* Rclone: <http://yourip/rclone>
* Please use `admin`/`admin` as username and password to login for the first time, and `user`/`password` to login `Rclone` if you don't update `ARIA2_USER` and `ARIA2_PWD`
### Full features run
@@ -76,10 +83,11 @@ File Browser
-e ARIA2_SSL=false \
-e ARIA2_USER=user \
-e ARIA2_PWD=pwd \
-e ARIA2_EXTERNAL_PORT=443 \
-v /yourdata:/data \
-v /app/a.db:/app/filebrowser.db \
-v /yoursslkeys/:/app/conf/key \
-v <the folder of aria2.conf and aria2.session>:/app/conf \
-v /to_yoursslkeys/:/app/conf/key \
-v <conf files folder>:/app/conf \
wahyd4/aria2-ui
```
### Run with docker-compose
@@ -95,7 +103,9 @@ services:
- ENABLE_AUTH=true
- ARIA2_USER=hello
- ARIA2_PWD=world
- DOMAIN=toozhao.com
- DOMAIN=http://toozhao.com
ports:
- "80:80"
volumes:
- ./data:/data
```
@@ -104,8 +114,9 @@ Then just run `docker-compose up -d`, that's it!
### Supported Environment Variables
* ENABLE_AUTH whether to enable Basic auth
* ARIA2_USER Basic Auth username
* ARIA2_PWD Basic Auth password
* ARIA2_USER Basic Auth username, Rclone GUI uses it as well.
* ARIA2_PWD Basic Auth password, Rclone GUI uses it as well.
* ARIA2_EXTERNAL_PORT The Aria2 port which exposed to public to access to
* PUID Bind Linux UID into container which means you can use non `root` user to manage downloaded files, default UID is `1000`
* PGID Bind Linux GID into container, default GID is 1000
* RPC_SECRET The Aria2 RPC secret token
@@ -115,7 +126,12 @@ Then just run `docker-compose up -d`, that's it!
### Supported Volumes
* `/data` The folder which contains all the files you download.
* `/app/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`
* `/app/conf` The Aria2 configuration and file session folder. Make sure you have `aria2.conf` and `aria2.session` file. For the first time `aria2.session` just need to be a empty file can be appended. You can also user the templates for these two file in the `conf` folder of this project.
* `/app/conf` The Aria2 configuration and file session folder. Make sure you have `aria2.conf` and `aria2.session` file. For the first time `aria2.session` just need to be a empty file can be appended. You can also user the templates for these two file in the `conf` folder of this project. Please put your `rclone.conf` in this folder as well if you'd mount it to Rclone. So all the config files supported in this folder are:
* aria2.conf
* aria2.session
* rclone.conf
**Warning: if you don't mount `/app/conf`, whenever the container restarts, you'll lose your downloading progress.**
* `/app/filebrowser.db` File Browser settings database, make sure you make a empty file first on your host.
## Auto SSL enabling
@@ -140,6 +156,6 @@ docker build -t aria2-ui .
Please refer <https://github.com/wahyd4/aria2-ariang-x-docker-compose>
## FAQ
1. When you running the docker image with non `80` port or you have HTTPS enabled, you will meet the error says `Aria2 Status Disconnected`, then you will need to go to `AriaNg Settings` -> RPC (at the top of the page) to modify the port value in `Aria2 RPC Address` field. Due to AriaNg store all configurations in local browser, so you need to do this per browser.
1. When you running the docker image with non `80` port or you have HTTPS enabled, you will meet the error says `Aria2 Status Disconnected`, then you will need to set `ARIA2_EXTERNAL_PORT` and recreate your container.
2. 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.
3. If you see any errors related to `setcap` which probably means the Linux you are running doesn't support running this application with `non-root` user. So please specify the `PUID` and `PGID` to `0` explicitly to use `root` user to run it.
+20 -6
View File
@@ -1,16 +1,19 @@
{$DOMAIN} {
proxy / file-manager {
proxy / 127.0.0.1:8080 {
transparent
}
proxy /jsonrpc localhost:6800 {
proxy /jsonrpc 127.0.0.1:6800 {
transparent
websocket
}
proxy /rclone 127.0.0.1:5572 {
transparent
}
gzip
log stdout
errors stdout
errors stderr
}
{$DOMAIN}/ui {
@@ -21,8 +24,19 @@
root /usr/local/www/aria2
timeouts none
gzip
log stdout
errors stdout
errors stderr
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
}
{$DOMAIN}/rclone {
redir / /rclone/ 301
}
{$DOMAIN}/rclone/ {
proxy / 127.0.0.1:5572/ {
transparent
}
gzip
errors stderr
}
+4
View File
@@ -1,5 +1,9 @@
#! /bin/bash -eu
sed -i 's/6800/'"${ARIA2_EXTERNAL_PORT}"'/g' /usr/local/www/aria2/js/aria-ng*.js
RPC_SECRET_BASE64=$(echo -n ${RPC_SECRET}|base64)
sed -i 's/secret:\"\"/secret:\"'"${RPC_SECRET_BASE64}"'\"/g' /usr/local/www/aria2/js/aria-ng*.js
if [ "$ARIA2_SSL" = "true" ]; then
echo "Start aria2 with secure config"
+27 -7
View File
@@ -1,4 +1,4 @@
FROM arm32v6/alpine:edge
FROM arm32v6/alpine:latest
LABEL AUTHOR=Junv<wahyd4@gmail.com>
@@ -10,21 +10,42 @@ ENV DOMAIN=0.0.0.0:80
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
ENV ARIA2_SSL=false
ENV ARIA2_EXTERNAL_PORT=80
ENV PUID=1000
ENV PGID=1000
ENV CADDYPATH=/app
ENV RCLONE_CONFIG=/app/conf/rclone.conf
RUN adduser -D -u 1000 junv \
&& apk update \
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar --no-cache \
&& curl https://getcaddy.com | bash -s personal \
&& caddy_tag=v1.0.4 \
&& wget -N https://github.com/caddyserver/caddy/releases/download/${caddy_tag}/caddy_${caddy_tag}_linux_arm7.tar.gz \
&& tar -zxvf caddy_*.tar.gz \
&& mv caddy /usr/local/bin/ \
&& rm -rf caddy_*.tar.gz \
&& filebrowser_version=v2.2.0 \
&& platform=linux-armv6 \
&& wget -N https://github.com/filebrowser/filebrowser/releases/download/${filebrowser_version}/${platform}-filebrowser.tar.gz \
&& tar -zxvf ${platform}-filebrowser.tar.gz \
&& rm -rf ${platform}-filebrowser.tar.gz \
&& rm LICENSE README.md \
&& wget -N https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-linux-arm.tgz \
&& tar -zxvf forego-stable-linux-arm.tgz \
&& rm -rf forego-stable-linux-arm.tgz \
&& mkdir -p /usr/local/www \
&& mkdir -p /usr/local/www/aria2
&& mkdir -p /usr/local/www/aria2 \
&& rm -rf init /app/*.txt \
&& curl -O https://downloads.rclone.org/v1.53.0/rclone-v1.53.0-linux-arm.zip \
&& unzip rclone-*.zip \
&& cd rclone-* \
&& cp rclone /usr/local/bin/ \
&& chown junv:junv /usr/local/bin/rclone \
&& chmod 755 /usr/local/bin/rclone \
&& rm /app/rclone-*.zip \
&& rm -rf /app/rclone-*
ADD aria2c.sh caddy.sh Procfile init.sh start.sh /app/
ADD aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh /app/
ADD conf /app/conf
ADD Caddyfile SecureCaddyfile /usr/local/caddy/
@@ -33,12 +54,11 @@ ADD Caddyfile SecureCaddyfile /usr/local/caddy/
RUN mkdir /usr/local/www/aria2/Download \
&& cd /usr/local/www/aria2 \
&& chmod +rw /app/conf/aria2.session \
&& version=1.1.1 \
&& version=1.1.6 \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip \
&& unzip AriaNg-${version}.zip \
&& rm -rf AriaNg-${version}.zip \
&& chmod -R 755 /usr/local/www/aria2 \
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
&& chmod -R 755 /usr/local/www/aria2
#The folder to store ssl keys
VOLUME /app/conf/key
+69
View File
@@ -0,0 +1,69 @@
FROM arm64v8/alpine:latest
LABEL AUTHOR=Junv<wahyd4@gmail.com>
WORKDIR /app
ENV RPC_SECRET=""
ENV ENABLE_AUTH=false
ENV DOMAIN=0.0.0.0:80
ENV ARIA2_USER=user
ENV ARIA2_PWD=password
ENV ARIA2_SSL=false
ENV ARIA2_EXTERNAL_PORT=80
ENV PUID=1000
ENV PGID=1000
ENV CADDYPATH=/app
ENV RCLONE_CONFIG=/app/conf/rclone.conf
RUN adduser -D -u 1000 junv \
&& apk update \
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar --no-cache \
&& caddy_tag=v1.0.4 \
&& wget -N https://github.com/caddyserver/caddy/releases/download/${caddy_tag}/caddy_${caddy_tag}_linux_arm64.tar.gz \
&& tar -zxvf caddy_*.tar.gz \
&& mv caddy /usr/local/bin/ \
&& rm -rf caddy_*.tar.gz \
&& filebrowser_version=v2.2.0 \
&& platform=linux-arm64 \
&& wget -N https://github.com/filebrowser/filebrowser/releases/download/${filebrowser_version}/${platform}-filebrowser.tar.gz \
&& tar -zxvf ${platform}-filebrowser.tar.gz \
&& rm -rf ${platform}-filebrowser.tar.gz \
&& rm LICENSE README.md \
&& wget -N https://bin.equinox.io/c/ekMN3bCZFUn/forego-stable-linux-arm64.tgz \
&& tar -zxvf forego-stable-linux-arm64.tgz \
&& rm -rf forego-stable-linux-arm64.tgz \
&& mkdir -p /usr/local/www \
&& mkdir -p /usr/local/www/aria2 \
&& rm -rf init /app/*.txt \
&& curl -O https://downloads.rclone.org/v1.53.0/rclone-v1.53.0-linux-arm.zip \
&& unzip rclone-*.zip \
&& cd rclone-* \
&& cp rclone /usr/local/bin/ \
&& chown junv:junv /usr/local/bin/rclone \
&& chmod 755 /usr/local/bin/rclone \
&& rm /app/rclone-*.zip \
&& rm -rf /app/rclone-*
ADD aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh /app/
ADD conf /app/conf
ADD Caddyfile SecureCaddyfile /usr/local/caddy/
# AriaNg
RUN mkdir /usr/local/www/aria2/Download \
&& cd /usr/local/www/aria2 \
&& chmod +rw /app/conf/aria2.session \
&& version=1.1.6 \
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${version}/AriaNg-${version}.zip \
&& unzip AriaNg-${version}.zip \
&& rm -rf AriaNg-${version}.zip \
&& chmod -R 755 /usr/local/www/aria2
#The folder to store ssl keys
VOLUME /app/conf/key
# User downloaded files
VOLUME /data
EXPOSE 80 443
CMD ["./start.sh"]
+5 -3
View File
@@ -15,6 +15,8 @@ rpc-listen-all=true
#rpc-listen-port=6800
#最大同时下载数(任务数), 路由建议值: 3
max-concurrent-downloads=5
#种子最小分享率
seed-ratio=100.0
#断点续传
continue=true
#同服务器连接数
@@ -35,8 +37,8 @@ max-upload-limit=0
#lowest-speed-limit=0
#验证用,需要1.16.1之后的release版本
#referer=*
# File downloading folder
#文件保存路径, 默认为当前启动位置
# dir=/user-files/superuser/
dir=/data
#文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用, 需要1.16及以上版本
#disk-cache=0
@@ -64,4 +66,4 @@ save-session=/app/conf/aria2.session
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-tracker=udp://62.138.0.158:6969/announce,udp://188.241.58.209:6969/announce,udp://93.158.213.92:1337/announce,udp://62.210.97.59:1337/announce,udp://151.80.120.113:2710/announce,udp://151.80.120.113:2710/announce,udp://165.231.0.116:80/announce,udp://208.83.20.20:6969/announce,udp://37.235.174.46:2710/announce,udp://185.181.60.67:80/announce,udp://54.37.235.149:6969/announce,udp://89.234.156.205:451/announce,udp://35.156.19.129:6969/announce,udp://159.100.245.181:6969/announce,udp://51.15.40.114:80/announce,udp://142.44.243.4:1337/announce,udp://176.113.71.19:6961/announce,udp://5.206.54.49:6969/announce,udp://184.105.151.164:6969/announce,udp://51.254.249.186:6969/announce
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

+1
View File
@@ -11,6 +11,7 @@ chown -R junv:junv \
/data
chmod +x /app/caddy.sh \
/app/rclone.sh \
/app/aria2c.sh
echo "**** give caddy permissions to use low ports ****"
Executable
+9
View File
@@ -0,0 +1,9 @@
#! /bin/bash -eu
echo "Start Rclone"
rclone rcd --rc-web-gui \
--rc-web-gui-no-open-browser \
--rc-addr :5572 \
--rc-user $ARIA2_USER \
--rc-pass $ARIA2_PWD \
--cache-dir /app/.cache