Compare commits

...
172 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 4b80de30f5 Start an experiment to see if anyone going to support this project. 2019-10-10 20:25:16 +11:00
junvandGitHub aae32e6edb Merge pull request #62 from wahyd4/junwei/optional-cap
Allow user to use root to run this application
2019-10-10 20:14:54 +11:00
junv 94b7e09cd1 Allow user to use root to run this application 2019-10-10 20:11:56 +11:00
junvandGitHub 38abdb636c Update issue templates 2019-09-03 13:22:45 +10:00
junv 8f3380f7e0 Update readme about how to mount aria2.conf and aria2.session 2019-09-02 08:24:41 +10:00
junv 9753284f11 Update workflow name 2019-09-01 19:15:42 +10:00
junv 990266f172 Use 3rd party to build and push docker image 2019-09-01 19:10:21 +10:00
junv 2df47bd0b9 github actions fixing.... 2019-09-01 17:57:39 +10:00
junv 48ef649edd trying 2019-09-01 17:54:36 +10:00
junv 08216e7998 github actions 2019-09-01 17:51:23 +10:00
junv 9be91ee609 github actions testing 2019-09-01 17:43:35 +10:00
junv 9ea8d8bf43 debug 2019-09-01 17:36:48 +10:00
junv 032be46fcf debug 2019-09-01 17:34:01 +10:00
junv f86ed0e78a Only run push on master 2019-09-01 17:31:23 +10:00
junv cd9c4b7dee Try to fix multiple line run commands 2019-09-01 17:21:28 +10:00
junv edea603ff1 Only using github actions and remove travis 2019-09-01 17:18:48 +10:00
junvandGitHub 594769e8ab Merge pull request #50 from wahyd4/junwei/no-chown-data-folder
Do not run chown to file downloading folder
2019-09-01 17:17:01 +10:00
junv fd33d75186 #48 Do not run chown to file doownloading folder 2019-09-01 17:05:02 +10:00
junvandGitHub 374df3a244 Update README.CN.md 2019-08-29 15:16:14 +10:00
junvandGitHub 588d294ea4 Update README.md 2019-08-29 15:15:56 +10:00
junvandGitHub 605211a1f2 Update README.CN.md 2019-08-29 15:03:08 +10:00
junvandGitHub c0b17f569a Update README.md 2019-08-29 15:02:54 +10:00
junvandGitHub 09272f54b5 Add github workflow 2019-08-28 09:20:34 +10:00
junvandGitHub b6b2349f8f Merge pull request #43 from wahyd4/junwei/custom-user-binding
Allow user use custom user and group by setting PUID and PGID
2019-07-18 23:32:22 +10:00
junv ba5ecb7e90 refine dockerfile 2019-07-18 23:30:34 +10:00
junv 400b063fcb due to filebrowser installation script issue so switch to use the github binary 2019-07-18 23:18:46 +10:00
junv c2bafc9d71 try to add bash option to see whether it works 2019-07-18 22:59:26 +10:00
junv 17a35679c6 wording refine 2019-07-18 22:40:54 +10:00
junv 67374de106 update readme to add docker-compose 2019-07-18 22:40:32 +10:00
junv c602376541 Update arm dockerfiles 2019-07-18 22:33:11 +10:00
junv 432a9efaa7 Merge branch 'master' into junwei/custom-user-binding 2019-07-18 22:19:26 +10:00
junv fe01505242 Update readme and refine some naming things 2019-07-18 22:18:35 +10:00
junv 810c4f81c9 Bump version to 3.0 due to we had removed 6800 port 2019-07-18 17:57:48 +10:00
junvandGitHub a259134ae3 Merge pull request #44 from gnehs/master
Add websocket support & update ariang to 1.1.1
2019-07-18 17:51:37 +10:00
gnehsandGitHub cd107a137e update ariang to 1.1.1 2019-07-18 14:43:09 +08:00
gnehsandGitHub bdcab8c28f websocket 2019-07-18 14:42:21 +08:00
junvandGitHub 0bf3c50b61 Merge branch 'master' into junwei/custom-user-binding 2019-07-16 23:57:44 +10:00
junvandGitHub ab9c4b5f14 Update .travis.yml 2019-07-16 23:55:02 +10:00
junv 1b130c27a3 Allow user to override default uid and gid. Default ones are 1000:1000 2019-07-16 23:34:29 +10:00
junv 6b434869c3 add non root user make everything related to the application belongs to that user. Huge thanks to @whlsxl as I learned a lot from his code changes but I didn't use custom docker image 2019-07-16 23:17:43 +10:00
junv d83b9d5084 simply dockerfile again 2019-07-16 22:32:51 +10:00
junvandGitHub c105c39ee8 Update README.CN.md 2019-07-15 09:38:36 +10:00
junvandGitHub 7807825e08 Update README.md 2019-07-15 09:37:52 +10:00
junv 3100858c42 update readme 2019-07-13 14:58:21 +10:00
junvandGitHub e81b6ef71b Update README.md 2019-07-13 14:06:48 +10:00
junvandGitHub 3d7d585c25 Update README.md 2019-07-13 13:48:59 +10:00
junvandGitHub 1485c0682f Merge pull request #40 from wahyd4/simplify-and-stablization
Simplify and stablization
2019-07-13 13:46:56 +10:00
junv 13b5e7557b Put english readme first 2019-07-13 13:42:09 +10:00
junv 5f3d232f3a Using forogo to manage mutliple processes 2019-07-13 13:16:16 +10:00
junv 54faacb741 use port 80 to serve 6800 jsonrpc request 2019-07-13 11:33:41 +10:00
junv c8e4704aa7 Speicfy port when boot file browser instead of caddy 2019-06-15 16:52:02 +10:00
junv 4332e37d40 Merge branch 'master' of github.com:wahyd4/aria2-ariang-docker 2019-06-15 16:41:16 +10:00
junv 58d3edf61a Update caddy startup command to specify port 2019-06-15 16:41:11 +10:00
junvandGitHub e2b7a41040 Update README.md 2019-05-22 16:57:40 +10: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 bb8a60ddbf Update README.md 2019-05-22 16:00:26 +10:00
junvandGitHub 1e8a02ebe3 Update README.md 2019-05-22 13:03:04 +10:00
junvandGitHub f6634fea89 Merge pull request #37 from AtrisMio/patch-redir
Patch redir
2019-05-19 12:03:16 +10:00
AtarisandGitHub cee7668e8c Update SecureCaddyfile 2019-05-19 00:26:55 +08:00
AtarisandGitHub 7175940215 patch redir 2019-05-19 00:24:51 +08:00
junv 93aec37485 update readme 2019-05-18 09:10:06 +10:00
junv a04e6a9b06 speed up building 2019-05-18 09:00:35 +10:00
junvandGitHub 3f115132d0 Merge pull request #36 from wahyd4/add-license-1
Create LICENSE
2019-05-18 08:59:32 +10:00
junvandGitHub 098ffb3c07 Merge branch 'master' into add-license-1 2019-05-18 08:53:35 +10:00
junvandGitHub b5e55f33a5 Merge pull request #35 from wahyd4/junwei/ad-ci-to-build-arms
Use osx to build image for different CPU platforms
2019-05-18 08:52:07 +10:00
junvandGitHub 6c0d9a7987 Create LICENSE 2019-05-18 08:51:50 +10:00
junv 288e429d47 Fix build 2019-05-18 08:41:19 +10:00
junv 89a9a34727 Unfortunately travis ci doesnn't support mac 2019-05-18 08:37:24 +10:00
junv b9026d8ca3 Try to use osx to build image 2019-05-18 08:32:14 +10:00
junv 6fe9c65cfb Try to fix the build condition 2019-05-18 00:44:27 +10:00
junv 0a4eff4988 Update 2019-05-18 00:39:57 +10:00
junv 230a21fa4f Update readme 2019-05-18 00:39:09 +10:00
junvandGitHub cc9cddc232 Merge pull request #34 from wahyd4/junwei/update-ariang-arms
Update AriaNg version to 1.1.0 and upgrade the arm dockerfiles to date.
2019-05-18 00:36:59 +10:00
junv a311641b41 Simply build script 2019-05-18 00:35:29 +10:00
junv 310116c3d0 skip push command 2019-05-18 00:30:22 +10:00
junv fbf75ca833 Merge branch 'master' into junwei/update-ariang-arms 2019-05-18 00:21:14 +10:00
junv a4d0f6ac08 Try to update docker version 2019-05-18 00:18:34 +10:00
junv 25d1446c72 update version 2019-05-18 00:12:08 +10:00
junv bc00550785 update ariang 2019-05-18 00:07: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 13be30c82f Update aria2.conf 2019-02-01 11:58:19 +11:00
junvandGitHub c4e530e8f6 Update trackers 2019-02-01 11:56:48 +11:00
junv 0b82cbbbf5 Update config align with new official nextcloud docker image 2019-01-18 14:03:19 +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 f273910ac8 Correct file name 2018-12-15 18:24:22 +11:00
junv d7553a9c2f Correct url 2018-12-15 17:51:43 +11:00
junv d7e435d784 bump ariang to 1.0.0 2018-12-15 17:33:06 +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 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 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 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 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 4f5b6f2b53 Conflicts:
caddy/Dockerfile
2018-01-21 23:16:09 +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 e5a9bcf7a9 Update AriaNg to 0.3 release. 2017-12-16 16:10:51 +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 dcaeec3633 Add bt-tracker servers. 2017-09-18 17:59:38 +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 01b446b5bb Add ability to store and retore unfinished tasks. 2017-09-17 10:57:40 +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
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
28 changed files with 760 additions and 252 deletions
+3
View File
@@ -0,0 +1,3 @@
README*.md
LICENSE
.github
+26
View File
@@ -0,0 +1,26 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
## Please try to use English to describe your question or issue.
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
+14
View File
@@ -0,0 +1,14 @@
name: Docker Image CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build and Publish main docker image to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: wahyd4/aria2-ui
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PASS }}
snapshot: true
+26
View File
@@ -0,0 +1,26 @@
{$DOMAIN} {
proxy / file-manager {
transparent
}
proxy /jsonrpc localhost:6800 {
transparent
websocket
}
log stdout
errors stdout
gzip
}
{$DOMAIN}/ui {
redir / /ui/ 301
}
{$DOMAIN}/ui/ {
root /usr/local/www/aria2
timeouts none
gzip
log stdout
errors stdout
}
+50
View File
@@ -0,0 +1,50 @@
FROM alpine:edge
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 PUID=1000
ENV PGID=1000
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 \
&& platform=linux-amd64 \
&& 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
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.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 \
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
# folder for storing ssl keys
VOLUME /app/conf/key
# file downloading folder
VOLUME /data
EXPOSE 80 443
CMD ["./start.sh"]
+201
View File
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [2019] [Junwei Zhao]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+2
View File
@@ -0,0 +1,2 @@
caddy: /app/caddy.sh
aria2c: /app/aria2c.sh
+140
View File
@@ -0,0 +1,140 @@
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/)
[![Github Build](https://github.com/wahyd4/aria2-ariang-docker/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/wahyd4/aria2-ariang-docker/actions)
<img src="https://raw.githubusercontent.com/wahyd4/work-in-australia/766592ac6318027d7b3c334d8c50ca80818eeff8/wepay.jpg" alt="buy me a drink" width="120"/>
本镜像包含 Aria2、AriaNg 和File Manager,主要方便那些用户期望只运行一个镜像就能实现图形化下载文件和在线播放文件。(类似离线下载的功能),只使用一个 Docker 镜像也方便用户在群晖NAS 中运行本程序。
- [功能特性](#功能特性)
- [推荐使用的docker image tag](#推荐使用的docker-image-tag)
- [安装于运行](#安装于运行)
- [快速运行](#快速运行)
- [开启所有功能](#开启所有功能)
- [使用docker-compose 运行](#使用docker-compose-运行)
- [支持的 Docker 环境变量](#支持的-docker-环境变量)
- [支持的 Docker volume 属性](#支持的-docker-volume-属性)
- [自动 SSL](#自动-ssl)
- [自行构建镜像](#自行构建镜像)
- [Docker Hub](#docker-hub)
- [使用 Docker compose 来运行](#使用-docker-compose-来运行)
- [常见问题](#常见问题)
AriaNG
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.jpg)
File Browser
![File Browser](https://github.com/wahyd4/aria2-ariang-docker/raw/master/filemanager.png)
## 功能特性
* Aria2 (SSL 支持)
* AriaNg 通过 UI 来操作,下载文件
* 自动 HTTPS Let's Encrypt
* 支持绑定自定义用户ID,可以主机上的非`root`用户,也可以管理下载的文件
* 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
* wahyd4/aria2-ui:latest
* wahyd4/aria2-ui:arm32
* wahyd4/aria2-ui:arm64
## 安装于运行
### 快速运行
```shell
docker run -d --name aria2-ui -p 80:80 wahyd4/aria2-ui
```
* Aria2: <http://yourip/ui/>
* FileManger: <http://yourip>
* 请使用 admin/admin 进行登录
### 开启所有功能
```bash
docker run -d --name ariang \
-p 80:80 \
-p 443:443 \
-e PUID=1000 \
-e PGID=1000 \
-e ENABLE_AUTH=true \
-e RPC_SECRET=Hello \
-e DOMAIN=https://example.com \
-e ARIA2_SSL=false \
-e ARIA2_USER=user \
-e ARIA2_PWD=pwd \
-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 \
wahyd4/aria2-ui
```
### 使用docker-compose 运行
如果你不想记住那些命令行,你也可以使用docker-compose来将配置放在`docker-compose.yaml`文件中
```yaml
version: "3.5"
services:
aria2-ui:
restart: unless-stopped
image: wahyd4/aria2-ui:latest
environment:
- ENABLE_AUTH=true
- ARIA2_USER=hello
- ARIA2_PWD=world
- DOMAIN=toozhao.com
volumes:
- ./data:/data
```
然后使用 `docker-compose up -d` 运行即可
### 支持的 Docker 环境变量
* ENABLE_AUTH 启用 Basic auth(网页简单认证) 用户认证
* ARIA2_USER Basic Auth 用户认证用户名
* ARIA2_PWD Basic Auth 密码
* PUID 需要绑定主机的Linux用户ID,可以通过`cat /etc/passwd` 查看用户列表, 默认UID 是`1000`
* PGID 需要绑定的主机的Linux 用户组ID,默认GID 是`1000`
* RPC_SECRET Aria2 RPC 加密 token
* DOMAIN 绑定的域名, 当绑定的域名为`HTTPS`时,即为启用`HTTPS` 例: `DOMAIN=https://toozhao.com`
### 支持的 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/filebrowser.db` File Browser 的内嵌数据库,升级Docker 镜像也不用担心之前的设置丢失。请确保在宿主机先创建一个空文件再使用。
## 自动 SSL
请在绑定域名前,设置`DNS`的一条`A`记录,将运行docker的主机IP绑定到该域名。然后你仅仅需要在运行时添加`e`设置即可。
```bash
docker run -d --name aria2-ui -p 80:80 -p 443:443 -e DOMAIN=https://toozhao.com wahyd4/aria2-ui
```
## 自行构建镜像
```
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. 当你以非其他`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` 来运行
+145 -1
View File
@@ -1 +1,145 @@
Aria2 + AriaNg
Aria2 + AriaNg + Filebrowser
English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/master/README.CN.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/)
[![Github Build](https://github.com/wahyd4/aria2-ariang-docker/workflows/Docker%20Image%20CI/badge.svg)](https://github.com/wahyd4/aria2-ariang-docker/actions)
<img src="https://raw.githubusercontent.com/wahyd4/work-in-australia/766592ac6318027d7b3c334d8c50ca80818eeff8/wepay.jpg" alt="buy me a drink" width="120"/>
- [Features](#features)
- [Recommended versions](#recommended-versions)
- [How to run](#how-to-run)
- [Quick run](#quick-run)
- [Full features run](#full-features-run)
- [Run with docker-compose](#run-with-docker-compose)
- [Supported Environment Variables](#supported-environment-variables)
- [Supported Volumes](#supported-volumes)
- [Auto SSL enabling](#auto-ssl-enabling)
- [Build the image by yourself](#build-the-image-by-yourself)
- [Docker Hub](#docker-hub)
- [Usage it in Docker compose](#usage-it-in-docker-compose)
- [FAQ](#faq)
One Docker image for all file downloading, managing, playing and evening sharing platforms!
Besides, it's pretty small and ARM CPU supported which means you can run it on Raspberry Pi🍓.
Last but not least, SSL enabling so easy!
AriaNG
![Screenshot](https://github.com/wahyd4/aria2-ariang-x-docker-compose/raw/master/images/ariang.jpg)
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
* Bind non root user into container, so non root user can also manage downloaded files.
* 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)
## Recommended versions
* wahyd4/aria2-ui:latest
* wahyd4/aria2-ui:arm32
* wahyd4/aria2-ui:arm64
## How to run
### Quick run
```shell
docker run -d --name aria2-ui -p 80:80 wahyd4/aria2-ui
```
* Aria2: <http://yourip/ui/>
* FileManger: <http://yourip>
* Please use `admin`/`admin` as username and password to login for the first time.
### Full features run
```bash
docker run -d --name ariang \
-p 80:80 \
-p 443:443 \
-e PUID=1000 \
-e PGID=1000 \
-e ENABLE_AUTH=true \
-e RPC_SECRET=Hello \
-e DOMAIN=https://example.com \
-e ARIA2_SSL=false \
-e ARIA2_USER=user \
-e ARIA2_PWD=pwd \
-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 \
wahyd4/aria2-ui
```
### Run with docker-compose
If you wanna get rid of those annoying command line things, just put the following sample content into `docker-compose.yaml`
```yaml
version: "3.5"
services:
aria2-ui:
restart: unless-stopped
image: wahyd4/aria2-ui:latest
environment:
- ENABLE_AUTH=true
- ARIA2_USER=hello
- ARIA2_PWD=world
- DOMAIN=toozhao.com
volumes:
- ./data:/data
```
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
* 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
* DOMAIN The domain you'd like to bind, when domain is a `https://` thing, then auto SSL feature will be enabled
### 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/filebrowser.db` File Browser settings database, make sure you make a empty file first on your host.
## Auto SSL enabling
Make sure you have add proper `A` record point to the host you running to your domain `DNS` record list, then just add `e` option to bind the `https` domain when you run the image
```bash
docker run -d --name aria2-ui -p 80:80 -p 443:443 -e DOMAIN=https://toozhao.com wahyd4/aria2-ui
```
## Build the image by yourself
```
docker build -t aria2-ui .
```
## 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. 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.
+28
View File
@@ -0,0 +1,28 @@
{$DOMAIN} {
proxy / file-manager {
transparent
}
proxy /jsonrpc localhost:6800 {
transparent
websocket
}
gzip
log stdout
errors stdout
}
{$DOMAIN}/ui {
redir / /ui/ 301
}
{$DOMAIN}/ui/ {
root /usr/local/www/aria2
timeouts none
gzip
log stdout
errors stdout
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
}
Executable
+17
View File
@@ -0,0 +1,17 @@
#! /bin/bash -eu
if [ "$ARIA2_SSL" = "true" ]; then
echo "Start aria2 with secure config"
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" \
--enable-rpc --rpc-listen-all \
--rpc-certificate=/app/conf/key/aria2.crt \
--rpc-private-key=/app/conf/key/aria2.key \
--rpc-secret="$RPC_SECRET" --rpc-secure \
else
echo "Start aria2 with standard mode"
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" --enable-rpc --rpc-listen-all
fi
+50
View File
@@ -0,0 +1,50 @@
FROM arm32v6/alpine:edge
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 PUID=1000
ENV PGID=1000
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 \
&& platform=linux-armv6 \
&& 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
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.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 \
&& sed -i 's/6800/80/g' /usr/local/www/aria2/js/aria-ng*.js
#The folder to store ssl keys
VOLUME /app/conf/key
# User downloaded files
VOLUME /data
EXPOSE 80 443
CMD ["./start.sh"]
Executable
+12
View File
@@ -0,0 +1,12 @@
#! /bin/bash -eu
echo "Run aria2c and ariaNG"
if [ "$ENABLE_AUTH" = "true" ]; then
echo "Using Basic Auth config file "
export CADDY_FILE=/usr/local/caddy/SecureCaddyfile
else
echo "Using caddy without Basic Auth"
export CADDY_FILE=/usr/local/caddy/Caddyfile
fi
/usr/local/bin/caddy -quic --conf ${CADDY_FILE}
-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}
}
-51
View File
@@ -1,51 +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/
dir=/var/www
#文件缓存, 使用内置的文件缓存, 如果你不相信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
-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
+21 -4
View File
@@ -35,8 +35,9 @@ 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
#另一种Linux文件缓存方式, 使用前确保您使用的内核支持此选项, 需要1.15及以上版本(?)
@@ -45,6 +46,22 @@ dir=/user-files/superuser/
#所需时间 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=/app/conf/aria2.session
# 在Aria2退出时保存`错误/未完成`的下载任务到会话文件
save-session=/app/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
Executable
+19
View File
@@ -0,0 +1,19 @@
#! /bin/bash -eu
echo "**** update uid and gid to ${PUID}:${PGID} ****"
groupmod -o -g "$PGID" junv
usermod -o -u "$PUID" junv
chown -R junv:junv \
/app \
/usr/local \
/var/log \
/data
chmod +x /app/caddy.sh \
/app/aria2c.sh
echo "**** give caddy permissions to use low ports ****"
setcap cap_net_bind_service=+ep /usr/local/bin/caddy
"${@-sh}"
-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" ]
-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;
}
Executable
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash -eu
if [ "$PGID" != "0" ]; then
$(dirname $0)/init.sh chpst -u junv ./forego start
else
./forego start
fi