Compare commits

..
19 Commits
Author SHA1 Message Date
junv 6195370246 fix app.conf 2019-10-11 15:22:14 +11:00
junvandGitHub 8802857b70 Merge pull request #63 from wahyd4/junwei/new-nextcloud
Build aria2 ui docker image to integrate with nextcloud
2019-10-11 14:51:20 +11:00
junv e8e3ef9e1e Build aria2 ui docker image to integrate with nextcloud 2019-10-11 14:44:16 +11:00
junv 1ba4a05cd7 Merge branch 'master' into nextcloud 2019-10-11 14:22:08 +11:00
junv c405b58610 A URL path improvment to solve https://github.com/wahyd4/aria2-ariang-x-docker-compose/issues/65 2019-05-22 16:16:14 +10:00
junvandGitHub 13be30c82f Update aria2.conf 2019-02-01 11:58:19 +11:00
junv 0b82cbbbf5 Update config align with new official nextcloud docker image 2019-01-18 14:03:19 +11:00
junv f273910ac8 Correct file name 2018-12-15 18:24:22 +11:00
junv d7e435d784 bump ariang to 1.0.0 2018-12-15 17:33:06 +11:00
junv 2d04e95161 Back to use wonderfall/nextcloud , as the official one needs to downloads at starting phase which makes this Image is super slow in China. 2018-08-16 21:00:05 +10:00
junv 7b67d12646 Update ariaNg to 0.40 2018-07-11 22:24:47 +10:00
junv 84ba3370bc Update caddy file to match the default nextcloud docker image, also solve the older nextcloud docker image cannot delete external storage files 2018-07-11 22:23:59 +10:00
junv 4f5b6f2b53 Conflicts:
caddy/Dockerfile
2018-01-21 23:16:09 +11:00
junv e5a9bcf7a9 Update AriaNg to 0.3 release. 2017-12-16 16:10:51 +11:00
junv dcaeec3633 Add bt-tracker servers. 2017-09-18 17:59:38 +08:00
junv 01b446b5bb Add ability to store and retore unfinished tasks. 2017-09-17 10:57:40 +08:00
junv 9c9a36150e Update config for nextcloud 2017-09-06 11:01:38 +08:00
junv 3de5fe6746 Update config for nextcloud. 2017-09-04 11:36:48 +08:00
junv 2f6c18d1e6 update config for filerun. 2017-09-04 11:18:49 +08:00
14 changed files with 25 additions and 143 deletions
+3
View File
@@ -0,0 +1,3 @@
README*.md
LICENSE
.github
-17
View File
@@ -1,17 +0,0 @@
# 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
@@ -1,15 +0,0 @@
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
+2 -2
View File
@@ -1,9 +1,9 @@
{$DOMAIN} {
proxy / 127.0.0.1:8080 {
proxy / file-manager {
transparent
}
proxy /jsonrpc 127.0.0.1:6800 {
proxy /jsonrpc localhost:6800 {
transparent
websocket
}
+6 -17
View File
@@ -1,4 +1,4 @@
FROM alpine:latest
FROM alpine:edge
LABEL AUTHOR=Junv<wahyd4@gmail.com>
@@ -10,31 +10,19 @@ 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
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_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 \
&& curl https://getcaddy.com | bash -s personal \
&& 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 \
&& rm -rf init /app/*.txt
&& mkdir -p /usr/local/www/aria2
ADD aria2c.sh caddy.sh Procfile init.sh start.sh /app/
ADD conf /app/conf
@@ -44,11 +32,12 @@ 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.6 \
&& version=1.1.1 \
&& 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
&& chmod -R 755 /usr/local/www/aria2 \
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
# folder for storing ssl keys
VOLUME /app/conf/key
-1
View File
@@ -1,3 +1,2 @@
filebrowser: /app/filebrowser -p 8080 -d /app/filebrowser.db -r /data
caddy: /app/caddy.sh
aria2c: /app/aria2c.sh
+2 -6
View File
@@ -46,8 +46,6 @@ File Browser
* wahyd4/aria2-ui:arm32
* wahyd4/aria2-ui:arm64
> ‼️ 如果你在莓派上运行本程序,请使用 `arm32` 版本
## 安装于运行
### 快速运行
@@ -72,7 +70,6 @@ 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 \
@@ -92,7 +89,7 @@ services:
- ENABLE_AUTH=true
- ARIA2_USER=hello
- ARIA2_PWD=world
- DOMAIN=http://toozhao.com
- DOMAIN=toozhao.com
volumes:
- ./data:/data
```
@@ -103,7 +100,6 @@ services:
* ENABLE_AUTH 启用 Basic auth(网页简单认证) 用户认证
* ARIA2_USER Basic Auth 用户认证用户名
* ARIA2_PWD Basic Auth 密码
* ARIA2_EXTERNAL_PORT 从外部可以访问到的 Aria2 端口,默认为 HTTP 的`80`
* PUID 需要绑定主机的Linux用户ID,可以通过`cat /etc/passwd` 查看用户列表, 默认UID 是`1000`
* PGID 需要绑定的主机的Linux 用户组ID,默认GID 是`1000`
* RPC_SECRET Aria2 RPC 加密 token
@@ -139,6 +135,6 @@ docker build -t aria2-ui .
请参考 <https://github.com/wahyd4/aria2-ariang-x-docker-compose>
## 常见问题
1. 当你以非其他`80` 端口或以启用了HTTPS`443`端口运行程序时,会出现`Aria2 状态 未连接`的错误,这是因为在最新版本里面,我们去掉aria2的独立6800端口,转而使用和网站同一个端口。你可以设置`ARIA2_EXTERNAL_PORT`后重建你的容器
1. 当你以非其他`80` 端口或以启用了HTTPS`443`端口运行程序时,会出现`Aria2 状态 未连接`的错误,这是因为在最新版本里面,我们去掉aria2的独立6800端口,转而使用和网站同一个端口。因为你需要渠道 `AriaNg设置` -> 页面顶端的 `RPC`页面,将你的Aria2 RPC 地址中的端口从`80`改成你使用的正确端口。因为 AriaNg 仅仅将设置保存在浏览器中,因为当你使用不同的浏览器,或者将浏览器清除缓存后,你都需要重新设置一次
2. 下载的BT或者磁力完全没有速度怎么办? 建议先下载一个热门的BT种子文件,而不是磁力链接。这样可以帮助缓存DHT文件,渐渐地,速度就会起来了。比如试试下载树莓派操作系统的BT种子?[前往下载](https://www.raspberrypi.org/downloads/raspbian/)
3. 如果你遇到了和 `setcap` 相关的错误,很大程度说明你说运行的Linux不支持使用非`root`用户来运行本Docker 镜像,因此请显式地设置环境变量`PUID` `PGID``0` ,也就是使用`root` 来运行
+3 -9
View File
@@ -50,8 +50,6 @@ 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
@@ -78,7 +76,6 @@ 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 \
@@ -98,9 +95,7 @@ services:
- ENABLE_AUTH=true
- ARIA2_USER=hello
- ARIA2_PWD=world
- DOMAIN=http://toozhao.com
ports:
- "80:80"
- DOMAIN=toozhao.com
volumes:
- ./data:/data
```
@@ -111,7 +106,6 @@ Then just run `docker-compose up -d`, that's it!
* ENABLE_AUTH whether to enable Basic auth
* ARIA2_USER Basic Auth username
* ARIA2_PWD Basic Auth password
* 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
@@ -121,7 +115,7 @@ 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. **Warning: if you don't mount `/app/conf`, whenever the container restart, you'll lose your downloading progress.**
* `/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/filebrowser.db` File Browser settings database, make sure you make a empty file first on your host.
## Auto SSL enabling
@@ -146,6 +140,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 set `ARIA2_EXTERNAL_PORT` and recreate your container.
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.
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.
+2 -2
View File
@@ -1,9 +1,9 @@
{$DOMAIN} {
proxy / 127.0.0.1:8080 {
proxy / file-manager {
transparent
}
proxy /jsonrpc 127.0.0.1:6800 {
proxy /jsonrpc localhost:6800 {
transparent
websocket
}
-4
View File
@@ -1,9 +1,5 @@
#! /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"
+4 -10
View File
@@ -1,4 +1,4 @@
FROM arm32v6/alpine:latest
FROM arm32v6/alpine:edge
LABEL AUTHOR=Junv<wahyd4@gmail.com>
@@ -10,21 +10,14 @@ 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
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 \
&& 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 \
@@ -40,11 +33,12 @@ 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.6 \
&& version=1.1.1 \
&& 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
&& chmod -R 755 /usr/local/www/aria2 \
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
#The folder to store ssl keys
VOLUME /app/conf/key
-55
View File
@@ -1,55 +0,0 @@
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
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 \
&& 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
ADD aria2c.sh caddy.sh Procfile init.sh start.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"]
+3 -5
View File
@@ -15,8 +15,6 @@ rpc-listen-all=true
#rpc-listen-port=6800
#最大同时下载数(任务数), 路由建议值: 3
max-concurrent-downloads=5
#种子最小分享率
seed-ratio=100.0
#断点续传
continue=true
#同服务器连接数
@@ -37,8 +35,8 @@ max-upload-limit=0
#lowest-speed-limit=0
#验证用,需要1.16.1之后的release版本
#referer=*
#文件保存路径, 默认为当前启动位置
# dir=/user-files/superuser/
# File downloading folder
dir=/data
#文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用, 需要1.16及以上版本
#disk-cache=0
@@ -66,4 +64,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://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
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
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB