mirror of
https://github.com/wahyd4/aria2-ariang-docker.git
synced 2026-08-09 05:15:55 +10:00
Compare commits
224
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b667a5f3c | ||
|
|
cd4bba07a5 | ||
|
|
ee1c069aec | ||
|
|
9c43cd515d | ||
|
|
728f30eda2 | ||
|
|
fc3f3035ac | ||
|
|
7cb68b4746 | ||
|
|
b8c7667523 | ||
|
|
3097a69b72 | ||
|
|
8de7bcead4 | ||
|
|
8c303a67e5 | ||
|
|
36d602b6fa | ||
|
|
aa8fa89a56 | ||
|
|
bdd122231c | ||
|
|
5670d183fe | ||
|
|
4d26b3527e | ||
|
|
9aec111d0f | ||
|
|
d70d81ea73 | ||
|
|
8bab5e7280 | ||
|
|
f12066c0fa | ||
|
|
6bca5ee492 | ||
|
|
438542ea38 | ||
|
|
d7e26e6e0e | ||
|
|
cbddc46cb6 | ||
|
|
4e72368e72 | ||
|
|
0c9ac2e563 | ||
|
|
838c645834 | ||
|
|
0b763b18f8 | ||
|
|
22dc0fd7c3 | ||
|
|
f45d151f48 | ||
|
|
0079401849 | ||
|
|
41aa56229b | ||
|
|
0952d90995 | ||
|
|
c4e37d37d3 | ||
|
|
2e621e8121 | ||
|
|
151d20b3ad | ||
|
|
c4afc92c90 | ||
|
|
ef1419fddb | ||
|
|
13e472922a | ||
|
|
4eae54e323 | ||
|
|
14f21d5a24 | ||
|
|
1024aa2a31 | ||
|
|
d77816ef81 | ||
|
|
6c04b6ac25 | ||
|
|
c36e68fb82 | ||
|
|
44bd3f7183 | ||
|
|
6dac58c8a8 | ||
|
|
79c6dd7874 | ||
|
|
c0e66890ad | ||
|
|
e9e3e4083c | ||
|
|
d64c15de5e | ||
|
|
ff51d1ae77 | ||
|
|
c7ade53ded | ||
|
|
a143c3ba81 | ||
|
|
91320c0b5e | ||
|
|
36add55978 | ||
|
|
8c6e3d14cf | ||
|
|
39ef5ae91e | ||
|
|
671be70304 | ||
|
|
123d88a269 | ||
|
|
3278cb4cfe | ||
|
|
bfe24f109f | ||
|
|
1f2e432d32 | ||
|
|
15279ef33a | ||
|
|
68f75b3b3b | ||
|
|
a2a19dcf79 | ||
|
|
73bba0edc1 | ||
|
|
d7599bda00 | ||
|
|
9a86dad52c | ||
|
|
4a76af2ea6 | ||
|
|
ea6398227d | ||
|
|
532ec227bf | ||
|
|
9230a74017 | ||
|
|
b8bbebdcb3 | ||
|
|
5782a27a72 | ||
|
|
2a4159b004 | ||
|
|
4128723308 | ||
|
|
4c16558d9a | ||
|
|
efb06e6c4d | ||
|
|
6fdd4e91e1 | ||
|
|
19b76d87a8 | ||
|
|
39ee538b56 | ||
|
|
384b3d88c5 | ||
|
|
00527d3f19 | ||
|
|
74061ac37d | ||
|
|
332cbd4921 | ||
|
|
3ba668552a | ||
|
|
477ce7d086 | ||
|
|
995eefa545 | ||
|
|
9dbaa62d38 | ||
|
|
7b53a0a3ea | ||
|
|
9a1d31e937 | ||
|
|
b6b6ed6f57 | ||
|
|
4b80de30f5 | ||
|
|
aae32e6edb | ||
|
|
94b7e09cd1 | ||
|
|
38abdb636c | ||
|
|
8f3380f7e0 | ||
|
|
9753284f11 | ||
|
|
990266f172 | ||
|
|
2df47bd0b9 | ||
|
|
48ef649edd | ||
|
|
08216e7998 | ||
|
|
9be91ee609 | ||
|
|
9ea8d8bf43 | ||
|
|
032be46fcf | ||
|
|
f86ed0e78a | ||
|
|
cd9c4b7dee | ||
|
|
edea603ff1 | ||
|
|
594769e8ab | ||
|
|
fd33d75186 | ||
|
|
374df3a244 | ||
|
|
588d294ea4 | ||
|
|
605211a1f2 | ||
|
|
c0b17f569a | ||
|
|
09272f54b5 | ||
|
|
b6b2349f8f | ||
|
|
ba5ecb7e90 | ||
|
|
400b063fcb | ||
|
|
c2bafc9d71 | ||
|
|
17a35679c6 | ||
|
|
67374de106 | ||
|
|
c602376541 | ||
|
|
432a9efaa7 | ||
|
|
fe01505242 | ||
|
|
810c4f81c9 | ||
|
|
a259134ae3 | ||
|
|
cd107a137e | ||
|
|
bdcab8c28f | ||
|
|
0bf3c50b61 | ||
|
|
ab9c4b5f14 | ||
|
|
1b130c27a3 | ||
|
|
6b434869c3 | ||
|
|
d83b9d5084 | ||
|
|
c105c39ee8 | ||
|
|
7807825e08 | ||
|
|
3100858c42 | ||
|
|
e81b6ef71b | ||
|
|
3d7d585c25 | ||
|
|
1485c0682f | ||
|
|
13b5e7557b | ||
|
|
5f3d232f3a | ||
|
|
54faacb741 | ||
|
|
c8e4704aa7 | ||
|
|
4332e37d40 | ||
|
|
58d3edf61a | ||
|
|
e2b7a41040 | ||
|
|
bb8a60ddbf | ||
|
|
1e8a02ebe3 | ||
|
|
f6634fea89 | ||
|
|
cee7668e8c | ||
|
|
7175940215 | ||
|
|
93aec37485 | ||
|
|
a04e6a9b06 | ||
|
|
3f115132d0 | ||
|
|
098ffb3c07 | ||
|
|
b5e55f33a5 | ||
|
|
6c0d9a7987 | ||
|
|
288e429d47 | ||
|
|
89a9a34727 | ||
|
|
b9026d8ca3 | ||
|
|
6fe9c65cfb | ||
|
|
0a4eff4988 | ||
|
|
230a21fa4f | ||
|
|
cc9cddc232 | ||
|
|
a311641b41 | ||
|
|
310116c3d0 | ||
|
|
fbf75ca833 | ||
|
|
a4d0f6ac08 | ||
|
|
25d1446c72 | ||
|
|
bc00550785 | ||
|
|
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 |
@@ -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.
|
||||
@@ -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."
|
||||
@@ -0,0 +1,67 @@
|
||||
name: Build and Push docker image
|
||||
on:
|
||||
pull_request:
|
||||
branches: master
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
tags:
|
||||
- v*
|
||||
jobs:
|
||||
build:
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'wahyd4/aria2-ariang-docker'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
-
|
||||
name: Prepare
|
||||
id: prepare
|
||||
run: |
|
||||
DOCKER_IMAGE=wahyd4/aria2-ui
|
||||
DOCKER_PLATFORMS=linux/amd64,linux/arm/v7,linux/arm64
|
||||
VERSION=edge
|
||||
|
||||
if [[ $GITHUB_REF == refs/tags/* ]]; then
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
fi
|
||||
TAGS="--tag ${DOCKER_IMAGE}:${VERSION}"
|
||||
if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
|
||||
TAGS="$TAGS --tag ${DOCKER_IMAGE}:latest"
|
||||
fi
|
||||
|
||||
echo ::set-output name=docker_image::${DOCKER_IMAGE}
|
||||
echo ::set-output name=version::${VERSION}
|
||||
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \
|
||||
--build-arg VERSION=${VERSION} \
|
||||
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
|
||||
--build-arg VCS_REF=${GITHUB_SHA::8} \
|
||||
${TAGS} --file Dockerfile .
|
||||
- name: Set up Docker Buildx
|
||||
uses: crazy-max/ghaction-docker-buildx@v3
|
||||
-
|
||||
name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
id: cache
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
-
|
||||
name: Docker Buildx (build)
|
||||
run: |
|
||||
docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }}
|
||||
-
|
||||
name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||
password: ${{ secrets.DOCKER_HUB_PASS }}
|
||||
-
|
||||
name: Push docker images to Dockerhub
|
||||
run: |
|
||||
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }}
|
||||
-
|
||||
name: Inspect image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}
|
||||
@@ -0,0 +1,23 @@
|
||||
name: Docker Image Vulnability Check
|
||||
on:
|
||||
pull_request:
|
||||
branches: master
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
jobs:
|
||||
build:
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'wahyd4/aria2-ariang-docker'
|
||||
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@v2
|
||||
with:
|
||||
image: "local/aria-ui:latest"
|
||||
fail-build: true
|
||||
severity-cutoff: high
|
||||
- name: grype scan JSON results
|
||||
run: for j in `ls ./anchore-reports/*.json`; do echo "---- ${j} ----"; cat ${j}; echo; done
|
||||
@@ -0,0 +1,2 @@
|
||||
conf/rclone.conf
|
||||
.devcontainer
|
||||
@@ -0,0 +1,27 @@
|
||||
#{
|
||||
# auto_https off
|
||||
#}
|
||||
|
||||
{$DOMAIN}
|
||||
|
||||
redir /ui /ui/ 301
|
||||
redir /rclone /rclone/ 301
|
||||
|
||||
route /rclone/* {
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy http://localhost:5572
|
||||
}
|
||||
|
||||
route /ui/* {
|
||||
uri strip_prefix /ui
|
||||
root * /usr/local/www/aria2
|
||||
file_server
|
||||
}
|
||||
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
|
||||
encode gzip
|
||||
log {
|
||||
output stderr
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
FROM alpine:latest
|
||||
|
||||
LABEL AUTHOR=Junv<wahyd4@gmail.com>
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV RPC_SECRET=""
|
||||
ENV ENABLE_AUTH=false
|
||||
ENV DOMAIN=http://localhost
|
||||
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
|
||||
ENV XDG_DATA_HOME=/app/.caddy/data
|
||||
ENV XDG_CONFIG_HOME=/app/.caddy/config
|
||||
|
||||
ADD install.sh aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh /app/
|
||||
ADD conf /app/conf
|
||||
ADD Caddyfile SecureCaddyfile /usr/local/caddy/
|
||||
|
||||
RUN ./install.sh
|
||||
|
||||
RUN rm ./install.sh
|
||||
|
||||
# folder for storing ssl keys
|
||||
VOLUME /app/conf/key
|
||||
|
||||
# file downloading folder
|
||||
VOLUME /data
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
HEALTHCHECK --interval=1m --timeout=3s \
|
||||
CMD curl -f http://localhost || exit 1
|
||||
|
||||
CMD ["./start.sh"]
|
||||
@@ -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.
|
||||
@@ -0,0 +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
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
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://github.com/wahyd4/aria2-ariang-docker/actions)
|
||||
[](https://badges.toozhao.com/badges/01EJ791D8BB43PDS8D7PP7H0YE/green.svg "Get your own page views count badge on badges.toozhao.com")
|
||||
|
||||
<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
|
||||

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

|
||||
|
||||
## 功能特性
|
||||
|
||||
* [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 用户认证
|
||||
* 文件管理和视频播放 ([File Browser](https://filebrowser.xyz/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
|
||||
* 支持ARM CPU 架构,因此可以在树莓派等设备上运行,
|
||||
|
||||
## 推荐使用的docker image tag
|
||||
|
||||
* wahyd4/aria2-ui:latest
|
||||
|
||||
> Docker会为你自动选择对应CPU平台的image. e.g. arm64v8 或者 x86_64 平台
|
||||
|
||||
## 安装与运行
|
||||
|
||||
### 快速运行
|
||||
|
||||
```bash
|
||||
docker buildx build --platform linux/arm/v7,linux/arm64,linux/amd64 -t aria2-ui .
|
||||
```
|
||||
|
||||
* Aria2: <http://yourip/ui/>
|
||||
* FileManger: <http://yourip>
|
||||
* Rclone: <http://yourip/rclone>
|
||||
* 请使用 admin/admin 进行登录, 在如果没有修改`ARIA2_USER`,`ARIA2_PWD`的情况下,请使用`user`/`password`登录`Rclone`
|
||||
### 开启所有功能
|
||||
```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 \
|
||||
-e ARIA2_EXTERNAL_PORT=443 \
|
||||
-v /yourdata:/data \
|
||||
-v /app/a.db:/app/filebrowser.db \
|
||||
-v /yoursslkeys/:/app/conf/key \
|
||||
-v <conf files folder>:/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=http://toozhao.com
|
||||
volumes:
|
||||
- ./data:/data
|
||||
```
|
||||
然后使用 `docker-compose up -d` 运行即可
|
||||
|
||||
### 支持的 Docker 环境变量
|
||||
|
||||
* ENABLE_AUTH 启用 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
|
||||
* 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`目录中的两个文件并使用。如需映射rclone.conf到容器内,请将其就放置于该目录下。因此配置文件目录支持的所有配置文件为:
|
||||
* aria2.conf
|
||||
* aria2.session
|
||||
* rclone.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端口,转而使用和网站同一个端口。你可以设置`ARIA2_EXTERNAL_PORT`后重建你的容器。
|
||||
2. 下载的BT或者磁力完全没有速度怎么办? 建议先下载一个热门的BT种子文件,而不是磁力链接。这样可以帮助缓存DHT文件,渐渐地,速度就会起来了。比如试试下载树莓派操作系统的BT种子?[前往下载](https://www.raspberrypi.org/downloads/raspbian/)
|
||||
3. 如果你遇到了和 `setcap` 相关的错误,很大程度说明你说运行的Linux不支持使用非`root`用户来运行本Docker 镜像,因此请显式地设置环境变量`PUID` `PGID` 为 `0` ,也就是使用`root` 来运行
|
||||
4. 如何配置`Rclone`? 如果你想连接`Google Drive` 类似的云存储平台,很遗憾你不能通过浏览器配置,因为网页版本`Oauth` 方式在这里是用不了的,你只能通过命令行的形式来配置,即`rclone config`. 详请请参考官网 [Configuring rclone on a remote / headless machine](https://rclone.org/remote_setup) 以及详细步骤请参考 [issue](https://github.com/wahyd4/aria2-ariang-docker/issues/118)
|
||||
@@ -1,70 +0,0 @@
|
||||
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")
|
||||
|
||||
<!-- TOC -->
|
||||
|
||||
- [Features](#features)
|
||||
- [How to run](#how-to-run)
|
||||
- [Simple Usage](#simple-usage)
|
||||
- [Full Usage](#full-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)
|
||||
|
||||
<!-- /TOC -->
|
||||
Aria2
|
||||

|
||||
|
||||
File Manager
|
||||

|
||||
## Features
|
||||
|
||||
* Aria2 (SSL support)
|
||||
* AriaNg
|
||||
* Auto HTTPS (Let's Encrypt)
|
||||
* Basic Auth
|
||||
* File indexing and video playing ([File Manager](https://henriquedias.com/filemanager/))
|
||||
|
||||
## How to run
|
||||
|
||||
### Simple Usage
|
||||
|
||||
```shell
|
||||
docker run -d --name ariang -p 80:80 -p 6800:6800 wahyd4/aria2-ui
|
||||
```
|
||||
|
||||
* Aria2: <http://yourip>
|
||||
* FileManger: <http://yourip/files>
|
||||
* Please use admin/admin as username and password to login
|
||||
|
||||
### Full Usage
|
||||
```shell
|
||||
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 /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.
|
||||
|
||||
|
||||
## 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>
|
||||
@@ -1,72 +1,161 @@
|
||||
Aria2 + AriaNg
|
||||
Aria2 + AriaNg + Filebrowser
|
||||
|
||||
[English](https://github.com/wahyd4/aria2-ariang-docker/blob/master/README.EN.md) | 简体中文
|
||||
English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/master/README.CN.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://github.com/wahyd4/aria2-ariang-docker/actions)
|
||||
[](https://badge.home.toozhao.com/svg/aria2-ariang-docker "Page Views Count")
|
||||
|
||||
本镜像包含 Aria2、AriaNg 和File Manager,主要方便那些用户期望只运行一个镜像就能实现图形化下载文件和在线播放文件。(类似离线下载的功能),只使用一个 Docker 镜像也方便用户在群晖NAS 中运行本程序。
|
||||
**If you like this project, please consider support me / 如果喜欢本项目,请考虑打赏,谢谢!**
|
||||
|
||||
<!-- TOC -->
|
||||
<img src="https://raw.githubusercontent.com/wahyd4/work-in-australia/766592ac6318027d7b3c334d8c50ca80818eeff8/wepay.jpg" alt="buy me a drink" width="120"/>
|
||||
|
||||
- [功能特性](#功能特性)
|
||||
- [安装于运行](#安装于运行)
|
||||
- [快速运行](#快速运行)
|
||||
- [开启所有功能](#开启所有功能)
|
||||
- [支持的 Docker 环境变量](#支持的-docker-环境变量)
|
||||
- [支持的 Docker volume 属性](#支持的-docker-volume-属性)
|
||||
- [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 HTTPS enabling](#auto-https-enabling)
|
||||
- [Build the image by yourself](#build-the-image-by-yourself)
|
||||
- [Docker Hub](#docker-hub)
|
||||
- [使用 Docker compose 来运行](#使用-docker-compose-来运行)
|
||||
- [Usage it in Docker compose](#usage-it-in-docker-compose)
|
||||
- [FAQ](#faq)
|
||||
|
||||
<!-- /TOC -->
|
||||
Aria2
|
||||

|
||||
One Docker image for file downloading, managing, sharing, as well as video playing and evening cloud storage synchronization.
|
||||
|
||||
File Manager
|
||||

|
||||
## 功能特性
|
||||
Furthermore, it's pretty small and ARM CPU compatible which means you can also run it on Raspberry Pi🍓.
|
||||
|
||||
* Aria2 (SSL 支持)
|
||||
* AriaNg 通过 UI 来操作,下载文件
|
||||
* 自动 HTTPS (Let's Encrypt)
|
||||
* Basic Auth 用户认证
|
||||
* 文件管理和视频播放 ([File Manager](https://henriquedias.com/filemanager/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
|
||||
Last but not least, Auto HTTPS can't be more easy!
|
||||
|
||||
## 安装于运行
|
||||
AriaNG
|
||||

|
||||
|
||||
### 快速运行
|
||||
File Browser
|
||||

|
||||
|
||||
## Features
|
||||
|
||||
* [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
|
||||
* File indexing and video playing ([File Browser](https://filebrowser.xyz/))
|
||||
* Support ARM CPUs, but please choose a proper [docker image TAG](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags)
|
||||
* Cloud Storage platforms synchronization
|
||||
|
||||
## Recommended versions
|
||||
|
||||
* wahyd4/aria2-ui:latest
|
||||
|
||||
> Docker will pick the the proper ARCH for you. e.g. arm64v8 or x86_64
|
||||
|
||||
## How to run
|
||||
|
||||
### Quick run
|
||||
|
||||
```shell
|
||||
docker run -d --name ariang -p 80:80 -p 6800:6800 wahyd4/aria2-ui
|
||||
docker run -d --name aria2-ui -p 80:80 wahyd4/aria2-ui
|
||||
```
|
||||
|
||||
* Aria2: <http://yourip>
|
||||
* FileManger: <http://yourip/files>
|
||||
* 请使用 admin/admin 进行登录
|
||||
### 开启所有功能
|
||||
```shell
|
||||
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 /yoursslkeys/:/root/conf/key -v -v <to your aria2.conf>:/root/conf/aria2.conf wahyd4/aria2-ui
|
||||
* Aria2: <http://yourip/ui/>
|
||||
* FileManger: <http://yourip>
|
||||
* 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
|
||||
|
||||
```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 \
|
||||
-e ARIA2_EXTERNAL_PORT=443 \
|
||||
-v /yourdata:/data \
|
||||
-v /app/a.db:/app/filebrowser.db \
|
||||
-v /to_yoursslkeys/:/app/conf/key \
|
||||
-v <conf files folder>:/app/conf \
|
||||
wahyd4/aria2-ui
|
||||
```
|
||||
### Run with docker-compose
|
||||
|
||||
### 支持的 Docker 环境变量
|
||||
If you would like to get rid of those annoying command line commands, then 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=http://toozhao.com
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
```
|
||||
Then simply run `docker-compose up -d`, that's it!
|
||||
|
||||
* ENABLE_AUTH 启用 Basic auth 用户认证
|
||||
* ARIA2_USER Basic Auth 用户认证用户名
|
||||
* ARIA2_PWD Basic Auth 密码
|
||||
* RPC_SECRET Aria2 RPC 加密 token
|
||||
* DOMAIN 绑定的域名
|
||||
### Supported Environment Variables
|
||||
|
||||
* ENABLE_AUTH whether to enable Basic auth
|
||||
* 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
|
||||
* DOMAIN The domain you'd like to bind, when domain is a `https://` thing, then auto SSL feature will be enabled
|
||||
|
||||
|
||||
### 支持的 Docker volume 属性
|
||||
* `/data` 用来放置所有下载的文件的目录
|
||||
* `/root/conf/key` 用户来放置 Aria2 SSL `certificate`证书和 `key` 文件. `注意`: 证书的名字必须是 `aria2.crt`, Key 文件的名字必须是 `aria2.key`
|
||||
* `/root/conf/aria2.conf` 为 aria2 的配置文件,你可以映射自己的配置文件。
|
||||
### Supported Volumes
|
||||
* `/data` The folder contains all the files you download.
|
||||
* `/app/conf/key` The folder which stores 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. 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 HTTPS enabling
|
||||
|
||||
Make sure you have added 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
|
||||
|
||||
```bash
|
||||
docker buildx build --platform linux/arm/v7,linux/arm64,linux/amd64 -t aria2-ui .
|
||||
```
|
||||
|
||||
## Docker Hub
|
||||
|
||||
<https://hub.docker.com/r/wahyd4/aria2-ui/>
|
||||
|
||||
## 使用 Docker compose 来运行
|
||||
## Usage it in Docker compose
|
||||
|
||||
请参考 <https://github.com/wahyd4/aria2-ariang-x-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 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.
|
||||
4. How can I get `Rclone` authenticated? Due to Rclone is running in this docker image only as a component rather than an application, you can only interact with it via `/rclone` endpoint, and no other ports. So the web browser authentication mechanism doesn't work here. Please configure Rclone through command line within the container. You can follow the official doc [Configuring rclone on a remote / headless machine](https://rclone.org/remote_setup) or this [issue](https://github.com/wahyd4/aria2-ariang-docker/issues/118)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#{
|
||||
# auto_https off
|
||||
#}
|
||||
|
||||
{$DOMAIN}
|
||||
|
||||
redir /ui /ui/ 301
|
||||
redir /rclone /rclone/ 301
|
||||
|
||||
route /rclone/* {
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy http://localhost:5572
|
||||
}
|
||||
|
||||
route /ui/* {
|
||||
uri strip_prefix /ui
|
||||
root * /usr/local/www/aria2
|
||||
file_server
|
||||
}
|
||||
|
||||
basicauth /ui/* {
|
||||
ARIA2_USER ARIA2_PWD_ENCRYPT
|
||||
}
|
||||
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
|
||||
encode gzip
|
||||
log {
|
||||
output stderr
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#! /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"
|
||||
|
||||
/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
|
||||
@@ -0,0 +1,17 @@
|
||||
#! /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
|
||||
|
||||
echo "**** generate basic auth password for caddy ****"
|
||||
ARIA2_PWD_ENCRYPT=`caddy hash-password -plaintext ${ARIA2_PWD}`
|
||||
sed -i 's/ARIA2_USER/'"${ARIA2_USER}"'/g' /usr/local/caddy/SecureCaddyfile
|
||||
sed -i 's/ARIA2_PWD_ENCRYPT/'"${ARIA2_PWD_ENCRYPT}"'/g' /usr/local/caddy/SecureCaddyfile
|
||||
else
|
||||
echo "Using caddy without Basic Auth"
|
||||
export CADDY_FILE=/usr/local/caddy/Caddyfile
|
||||
fi
|
||||
|
||||
/usr/local/bin/caddy run -config ${CADDY_FILE} -adapter=caddyfile
|
||||
@@ -1,15 +0,0 @@
|
||||
{$DOMAIN} {
|
||||
root /usr/local/www/aria2
|
||||
timeouts none
|
||||
gzip
|
||||
log stdout
|
||||
errors stdout
|
||||
|
||||
|
||||
}
|
||||
|
||||
{$DOMAIN}/files {
|
||||
filemanager / /data
|
||||
}
|
||||
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
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
|
||||
|
||||
# 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 openrc gnupg screen aria2 tar --no-cache
|
||||
|
||||
RUN curl https://getcaddy.com | bash -s personal http.filemanager
|
||||
|
||||
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/0.4.0/aria-ng-0.4.0.zip && unzip aria-ng-0.4.0.zip && rm -rf aria-ng-0.4.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,19 +0,0 @@
|
||||
{$DOMAIN} {
|
||||
root /usr/local/www/aria2
|
||||
timeouts none
|
||||
gzip
|
||||
log stdout
|
||||
errors stdout
|
||||
|
||||
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
|
||||
|
||||
}
|
||||
|
||||
|
||||
{$DOMAIN}/files {
|
||||
gzip
|
||||
log stdout
|
||||
errors stdout
|
||||
filemanager / /data
|
||||
basicauth / {$ARIA2_USER} {$ARIA2_PWD}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
#! /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 \
|
||||
&& 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
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ rpc-listen-all=true
|
||||
#rpc-listen-port=6800
|
||||
#最大同时下载数(任务数), 路由建议值: 3
|
||||
max-concurrent-downloads=5
|
||||
#种子最小分享率
|
||||
seed-ratio=100.0
|
||||
#断点续传
|
||||
continue=true
|
||||
#同服务器连接数
|
||||
@@ -46,21 +48,22 @@ dir=/data
|
||||
#所需时间 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
|
||||
|
||||
|
||||
## 进度保存相关 ##
|
||||
# 从会话文件中读取下载任务
|
||||
input-file=/root/conf/aria2.session
|
||||
input-file=/app/conf/aria2.session
|
||||
# 在Aria2退出时保存`错误/未完成`的下载任务到会话文件
|
||||
save-session=/root/conf/aria2.session
|
||||
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.txt
|
||||
bt-tracker=udp://tracker.skyts.net:6969/announce,udp://tracker.safe.moe:6969/announce,udp://tracker.piratepublic.com:1337/announce,udp://tracker.pirateparty.gr:6969/announce,udp://tracker.coppersurfer.tk:6969/announce,udp://tracker.leechers-paradise.org:6969/announce,udp://allesanddro.de:1337/announce,udp://9.rarbg.com:2710/announce,http://p4p.arenabg.com:1337/announce,udp://p4p.arenabg.com:1337/announce,udp://tracker.opentrackr.org:1337/announce,udp://tracker.internetwarriors.net:1337/announce,http://tracker.opentrackr.org:1337/announce,udp://public.popcorn-tracker.org:6969/announce,udp://tracker2.wasabii.com.tw:6969/announce,udp://tracker2.christianbro.pw:6969/announce,udp://tracker1.xku.tv:6969/announce,udp://tracker1.wasabii.com.tw:6969/announce,udp://tracker.zer0day.to:1337/announce,udp://peerfect.org:6969/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://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
|
||||
@@ -0,0 +1,25 @@
|
||||
#! /bin/bash -eu
|
||||
|
||||
echo "**** update uid and gid to ${PUID}:${PGID} ****"
|
||||
groupmod -o -g "$PGID" junv
|
||||
usermod -o -u "$PUID" junv
|
||||
|
||||
mkdir -p /app/.caddy
|
||||
mkdir -p /app/.cache
|
||||
|
||||
chown -R junv:junv \
|
||||
/app \
|
||||
/app/.caddy \
|
||||
/app/.cache \
|
||||
/usr/local \
|
||||
/var/log \
|
||||
/data
|
||||
|
||||
chmod +x /app/caddy.sh \
|
||||
/app/rclone.sh \
|
||||
/app/aria2c.sh
|
||||
|
||||
echo "**** give caddy permissions to use low ports ****"
|
||||
setcap cap_net_bind_service=+ep /usr/local/bin/caddy
|
||||
|
||||
"${@-sh}"
|
||||
Executable
+73
@@ -0,0 +1,73 @@
|
||||
#! /bin/sh -eux
|
||||
|
||||
echo "Set variables for $(arch)"
|
||||
|
||||
caddy_version=2.0.0
|
||||
filebrowser_version=v2.11.0
|
||||
rclone_version=v1.53.3
|
||||
ariang_version=1.1.7
|
||||
|
||||
case "$(arch)" in
|
||||
|
||||
x86_64)
|
||||
platform=linux-amd64
|
||||
caddy_file=caddy_${caddy_version}_linux_amd64.tar.gz
|
||||
rclone_file=rclone-${rclone_version}-${platform}.zip
|
||||
forego_file=forego-stable-${platform}.tgz
|
||||
;;
|
||||
armv7l)
|
||||
platform=linux-armv7
|
||||
caddy_file=caddy_${caddy_version}_linux_armv7.tar.gz
|
||||
rclone_file=rclone-${rclone_version}-linux-arm-v7.zip
|
||||
forego_file=forego-stable-linux-arm.tgz
|
||||
;;
|
||||
|
||||
aarch64)
|
||||
platform=linux-arm64
|
||||
caddy_file=caddy_${caddy_version}_linux_arm64.tar.gz
|
||||
rclone_file=rclone-${rclone_version}-${platform}.zip
|
||||
forego_file=forego-stable-${platform}.tgz
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "unsupported arch $(arch), exit now"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
filebrowser_file=${platform}-filebrowser.tar.gz
|
||||
ariang_file=AriaNg-${ariang_version}.zip
|
||||
|
||||
adduser -D -u 1000 junv \
|
||||
&& apk update \
|
||||
&& apk add runit shadow wget bash curl openrc gnupg aria2 tar mailcap --no-cache \
|
||||
&& wget -N https://github.com/caddyserver/caddy/releases/download/v${caddy_version}/${caddy_file} \
|
||||
&& tar -zxf ${caddy_file} \
|
||||
&& mv caddy /usr/local/bin/ \
|
||||
&& rm -rf ${caddy_file} \
|
||||
&& platform=linux-amd64 \
|
||||
&& wget -N https://github.com/filebrowser/filebrowser/releases/download/${filebrowser_version}/${filebrowser_file} \
|
||||
&& tar -zxf ${filebrowser_file} \
|
||||
&& rm -rf ${filebrowser_file} \
|
||||
&& rm LICENSE README.md CHANGELOG.md \
|
||||
&& wget -N https://bin.equinox.io/c/ekMN3bCZFUn/${forego_file} \
|
||||
&& tar -zxf ${forego_file} \
|
||||
&& rm -rf ${forego_file} \
|
||||
&& mkdir -p /usr/local/www \
|
||||
&& mkdir -p /usr/local/www/aria2 \
|
||||
&& rm -rf init /app/*.txt \
|
||||
&& curl -O https://downloads.rclone.org/${rclone_version}/${rclone_file} \
|
||||
&& unzip ${rclone_file} \
|
||||
&& cd rclone-* \
|
||||
&& cp rclone /usr/local/bin/ \
|
||||
&& chown junv:junv /usr/local/bin/rclone \
|
||||
&& chmod 755 /usr/local/bin/rclone \
|
||||
&& rm /app/${rclone_file} \
|
||||
&& rm -rf /app/rclone-* \
|
||||
&& mkdir /usr/local/www/aria2/Download \
|
||||
&& cd /usr/local/www/aria2 \
|
||||
&& chmod +rw /app/conf/aria2.session \
|
||||
&& wget -N --no-check-certificate https://github.com/mayswind/AriaNg/releases/download/${ariang_version}/${ariang_file} \
|
||||
&& unzip ${ariang_file} \
|
||||
&& rm -rf ${ariang_file} \
|
||||
&& chmod -R 755 /usr/local/www/aria2 \
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user