mirror of
https://github.com/wahyd4/aria2-ariang-docker.git
synced 2026-08-09 05:15:55 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c833f50a0 | ||
|
|
e328617536 | ||
|
|
dc615fba31 | ||
|
|
7e8fd16bc9 | ||
|
|
2429cb87d4 | ||
|
|
b22a36cb0d | ||
|
|
d19aee4d38 | ||
|
|
4a0bb9446f | ||
|
|
85e11866c1 | ||
|
|
9a74f672b0 | ||
|
|
e308b67902 | ||
|
|
9ac63aef85 | ||
|
|
4c2cb0ddaf | ||
|
|
e3beaca19e | ||
|
|
9fb6123520 | ||
|
|
4394fde881 | ||
|
|
21fbcad568 | ||
|
|
60a5a77193 | ||
|
|
99c036f46c | ||
|
|
ea0dbb9e14 | ||
|
|
3b41b6d1e2 | ||
|
|
1a16f7195d | ||
|
|
3e39cacc35 | ||
|
|
6c3caac687 | ||
|
|
f400b16be3 | ||
|
|
8fbc2bb854 | ||
|
|
e1c398c9d3 | ||
|
|
c3a5fda0a7 | ||
|
|
a6c4ab584d | ||
|
|
c81da61cec | ||
|
|
1e6c8855da | ||
|
|
7597acf095 | ||
|
|
2f63249629 | ||
|
|
b07e1388a4 | ||
|
|
197b0a433f | ||
|
|
437436e9c0 | ||
|
|
ec008b29bd | ||
|
|
014bb638f3 | ||
|
|
fab62224f7 | ||
|
|
3cf974c98c | ||
|
|
0610f47717 | ||
|
|
5d4656db63 | ||
|
|
311696caa1 | ||
|
|
e3cfdf6f68 | ||
|
|
58886cfc13 | ||
|
|
dc9238fc7d | ||
|
|
8488801ec6 | ||
|
|
ce31e13a61 | ||
|
|
fc572ada3e | ||
|
|
654f8f4b3d | ||
|
|
2196929d63 | ||
|
|
e703dd4338 | ||
|
|
ece987ec60 | ||
|
|
ff8a474b6d | ||
|
|
b6c155207d |
@@ -50,7 +50,7 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v3
|
||||
id: cache
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
4.14.1
|
||||
6.4.0
|
||||
|
||||
@@ -9,17 +9,63 @@ redir /ui / 301
|
||||
redir /ui/ / 301
|
||||
redir /rclone /rclone/ 301
|
||||
redir /files /files/ 301
|
||||
redir /ro /ro/ 301
|
||||
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
# Aria2 RPC with WebSocket support and timeouts
|
||||
reverse_proxy /rpc 127.0.0.1:6800 {
|
||||
transport http {
|
||||
read_timeout 300s
|
||||
write_timeout 300s
|
||||
dial_timeout 30s
|
||||
keepalive 90s
|
||||
keepalive_idle_conns 10
|
||||
max_conns_per_host 0
|
||||
}
|
||||
header_up X-Real-IP {remote_host}
|
||||
header_up X-Forwarded-For {remote_host}
|
||||
}
|
||||
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800 {
|
||||
transport http {
|
||||
read_timeout 300s
|
||||
write_timeout 300s
|
||||
dial_timeout 30s
|
||||
keepalive 90s
|
||||
keepalive_idle_conns 10
|
||||
max_conns_per_host 0
|
||||
}
|
||||
header_up X-Real-IP {remote_host}
|
||||
header_up X-Forwarded-For {remote_host}
|
||||
}
|
||||
|
||||
route /rclone/* {
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy 127.0.0.1:5572
|
||||
reverse_proxy 127.0.0.1:5572 {
|
||||
transport http {
|
||||
read_timeout 120s
|
||||
write_timeout 120s
|
||||
keepalive 60s
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
route /files/* {
|
||||
uri strip_prefix /files
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
reverse_proxy 127.0.0.1:8080 {
|
||||
transport http {
|
||||
read_timeout 120s
|
||||
write_timeout 120s
|
||||
keepalive 60s
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
route /ro/* {
|
||||
uri strip_prefix /ro
|
||||
root * /data
|
||||
file_server {
|
||||
browse "{$CADDY_FILE_SERVER_BROWSE_HTML}"
|
||||
}
|
||||
}
|
||||
|
||||
route /ping {
|
||||
|
||||
+11
-4
@@ -1,6 +1,6 @@
|
||||
FROM golang:alpine AS build-forego
|
||||
FROM golang AS build-forego
|
||||
|
||||
RUN apk add --no-cache git openssh
|
||||
RUN apt update && apt install -y git
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
@@ -11,7 +11,7 @@ RUN git clone https://github.com/wahyd4/forego.git \
|
||||
&& go build -o forego \
|
||||
&& chmod +x forego
|
||||
|
||||
FROM alpine:edge
|
||||
FROM debian:stable-slim
|
||||
|
||||
LABEL AUTHOR=Junv<wahyd4@gmail.com>
|
||||
|
||||
@@ -34,9 +34,16 @@ ENV XDG_CONFIG_HOME=/app/.caddy/config
|
||||
ENV XDG_CACHE_HOME=/app/.cache
|
||||
ENV RCLONE_CONFIG_BASE64=""
|
||||
ENV ENABLE_APP_CHECKER=true
|
||||
ENV ENABLE_FILEBROWSER=true
|
||||
ENV CADDY_LOG_LEVEL=INFO
|
||||
ENV RCLONE_AUTO_UPLOAD_PROVIDER=
|
||||
ENV RCLONE_AUTO_UPLOAD_REMOTE_PATH=/downloads
|
||||
ENV RCLONE_AUTO_UPLOAD_FILE_MIN_SIZE=1K
|
||||
ENV RCLONE_AUTO_UPLOAD_FILE_MAX_SIZE=100G
|
||||
ENV FIX_DATA_VOLUME_PERMISSIONS=false
|
||||
ENV CADDY_FILE_SERVER_BROWSE_HTML=/app/browse.html
|
||||
|
||||
ADD install.sh aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh new-version-checker.sh APP_VERSION /app/
|
||||
ADD install.sh aria2c.sh caddy.sh filebrowser.sh Procfile init.sh start.sh rclone.sh new-version-checker.sh APP_VERSION /app/
|
||||
ADD conf /app/conf
|
||||
ADD Caddyfile SecureCaddyfile HerokuCaddyfile /usr/local/caddy/
|
||||
|
||||
|
||||
+12
-1
@@ -5,7 +5,9 @@
|
||||
|
||||
:PORT
|
||||
|
||||
basicauth / {
|
||||
@protected path / /index.html /css/* /js/* /ro /ro/* /jsonrpc
|
||||
|
||||
basicauth @protected {
|
||||
ARIA2_USER ARIA2_PWD_ENCRYPT
|
||||
}
|
||||
|
||||
@@ -13,6 +15,7 @@ redir /ui / 301
|
||||
redir /ui/ / 301
|
||||
redir /rclone /rclone/ 301
|
||||
redir /files /files/ 301
|
||||
redir /ro /ro/ 301
|
||||
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
|
||||
@@ -26,6 +29,14 @@ route /files/* {
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
}
|
||||
|
||||
route /ro/* {
|
||||
uri strip_prefix /ro
|
||||
root * /data
|
||||
file_server {
|
||||
browse "{$CADDY_FILE_SERVER_BROWSE_HTML}"
|
||||
}
|
||||
}
|
||||
|
||||
route /ping {
|
||||
respond "app version: {env.APP_VERSION}"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
caddy: /app/caddy.sh
|
||||
filebrowser: /app/filebrowser -p 8080 -d /app/filebrowser.db -r /data -b /files
|
||||
filebrowser: /app/filebrowser.sh
|
||||
aria2c: /app/aria2c.sh
|
||||
rclone: /app/rclone.sh
|
||||
newer_version_checker: /app/new-version-checker.sh
|
||||
|
||||
@@ -2,6 +2,8 @@ Aria2 + AriaNg
|
||||
|
||||
[English](https://github.com/wahyd4/aria2-ariang-docker/blob/master/README.md) | 简体中文
|
||||
|
||||
> 🚨 注意:由于本人精力有限,现决定将主要精力放在更新功能,和英文版本文档。中文版本文档即日起暂停更新,欢迎志愿者对英文说明进行翻译或者赞助本项目,助力我投入更多时间。谢谢。(2022年4月19日)
|
||||
|
||||
[](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)
|
||||
|
||||
@@ -4,9 +4,9 @@ English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/mast
|
||||
|
||||
[](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://github.com/wahyd4/aria2-ariang-docker/actions)
|
||||
|
||||
[](https://badges.toozhao.com/stats/aria2-ariang-docker "Page Views Count")
|
||||

|
||||
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@ English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/mast
|
||||
- [Supported Environment Variables](#supported-environment-variables)
|
||||
- [Supported Volumes](#supported-volumes)
|
||||
- [Auto HTTPS enabling](#auto-https-enabling)
|
||||
- [Download Automation 🤖](#download-automation-)
|
||||
- [Download file through iPhone/Mac Shortcuts app.](#download-file-through-iphonemac-shortcuts-app)
|
||||
- [Download file through cURL](#download-file-through-curl)
|
||||
- [Build the image by yourself](#build-the-image-by-yourself)
|
||||
- [Docker Hub](#docker-hub)
|
||||
- [Running it on Kubernetes (My favorite)](#running-it-on-kubernetes-my-favorite)
|
||||
@@ -52,25 +55,28 @@ File Browser
|
||||
* Basic Auth
|
||||
* Support ARM CPUs as well, all supported CPU platforms can be found [here](https://cloud.docker.com/repository/docker/wahyd4/aria2-ui/tags)
|
||||
* Cloud Storage platforms synchronization
|
||||
* Auto uploading files to 3rd party Cloud storage providers via Rclone after files been downloaded.
|
||||
|
||||
## Recommended versions
|
||||
|
||||
* wahyd4/aria2-ui:latest
|
||||
|
||||
> Docker will pick the the proper ARCH for you. e.g. arm64v8 or x86_64
|
||||
> Docker will pick proper CPU ARCH for you. e.g. arm64v8 or x86_64
|
||||
|
||||
## How to run
|
||||
|
||||
### Quick run
|
||||
|
||||
```shell
|
||||
docker run -d --name aria2-ui -p 80:80 wahyd4/aria2-ui
|
||||
docker run -d --name aria2-ui -p 8000:80 wahyd4/aria2-ui
|
||||
```
|
||||
|
||||
* Aria2: <http://yourip>
|
||||
* FileManger: <http://yourip/files>
|
||||
* Rclone: <http://yourip/rclone>
|
||||
* Please use `admin`/`admin` as username and password to login `Filebrowser` for the first time. And use `user`/`password` to login `Rclone` if you don't update `ARIA2_USER` and `ARIA2_PWD`
|
||||
* Aria2: <http://yourip:8000>
|
||||
* Caddy File Server(Read Only) <http://yourip:8000/ro>
|
||||
* FileManger: <http://yourip:8000/files>
|
||||
* Rclone: <http://yourip:8000/rclone>
|
||||
* For the initial `admin` password of Filebrowser, please check the docker logs you should see something like `User 'admin' initialized with randomly generated password: xxx`, then use that password to login Filebrowser.
|
||||
* And use `user`/`password` to login `Rclone` if you don't update `ARIA2_USER` and `ARIA2_PWD`
|
||||
|
||||
### Full features run
|
||||
|
||||
@@ -87,7 +93,9 @@ File Browser
|
||||
-e ARIA2_USER=user \
|
||||
-e ARIA2_PWD=password \
|
||||
-e ARIA2_EXTERNAL_PORT=443 \
|
||||
-e CADDY_LOG_LEVEL=ERROR \
|
||||
-v /yourdata:/data \
|
||||
-v /app/.cache:/app/.cache \
|
||||
-v /app/a.db:/app/filebrowser.db \
|
||||
-v /to_yoursslkeys/:/app/conf/key \
|
||||
-v <conf files folder>:/app/conf \
|
||||
@@ -104,8 +112,8 @@ services:
|
||||
image: wahyd4/aria2-ui:latest
|
||||
environment:
|
||||
- ENABLE_AUTH=true
|
||||
- ARIA2_USER=hello
|
||||
- ARIA2_PWD=world
|
||||
- ARIA2_USER=user
|
||||
- ARIA2_PWD=password
|
||||
- DOMAIN=http://toozhao.com
|
||||
ports:
|
||||
- "80:80"
|
||||
@@ -115,30 +123,42 @@ services:
|
||||
Then simply run `docker-compose up -d`, that's it!
|
||||
|
||||
### Supported Environment Variables
|
||||
|
||||
* `ENABLE_AUTH` whether to enable Basic auth
|
||||
* `ENABLE_RCLONE` whether to disable Rclone, if you running this container offline or do not have stable connection to Github, please set to `false`
|
||||
* `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 TLS feature will be enabled
|
||||
* `RCLONE_CONFIG_BASE64` Inject and config Rclone through `base64` string, which is the only way to use Rclone on Heroku. Please use `cat /app/conf/rclone.conf | base64` or any base64 online tools such as [this](https://www.base64encode.org/) to encode your `rclone.conf` as bse64 string. Note, you need to set `ENABLE_RCLONE` to true as well.
|
||||
* `ENABLE_APP_CHECKER`, by default it's set to `true` to check if any new docker image version release on daily basis, which can help you get notification when new features released as well as some security vulnerabilities get fixed. You can set it to `false` to disable this feature. Note: you still need to manually pull the new image version and re run the docker container to complete upgrading.
|
||||
| ENV | Description|
|
||||
|:---|:---|
|
||||
| `ENABLE_AUTH` | Whether to enable Basic auth |
|
||||
| `ENABLE_RCLONE` | Whether to disable Rclone, if you running this container offline or do not have stable connection to Github, please set to `false` |
|
||||
| `ENABLE_FILEBROWSER` | Whether to disable Filebrowser, set it to `false` to disable it, by default it's enabled |
|
||||
| `ARIA2_USER` | Basic Auth username, Rclone GUI uses it as well. Default value: `user` |
|
||||
| `ARIA2_PWD` | Basic Auth password, Rclone GUI uses it as well. Default value: `password` |
|
||||
| `ARIA2_EXTERNAL_PORT` | The Aria2 port which exposed to public to access to |
|
||||
| `PUID` | Bind Linux UID into container which means you can use non `root` user to manage downloaded files, default UID is `1000` |
|
||||
| `PGID` | Bind Linux GID into container, default GID is 1000 |
|
||||
| `RPC_SECRET` | The Aria2 RPC secret token |
|
||||
| `DOMAIN` | The domain you'd like to bind, when domain is a `https://` thing, then auto TLS feature will be enabled |
|
||||
| `RCLONE_CONFIG_BASE64` | Inject and config Rclone through `base64` string, which is the only way to use Rclone on Heroku. Please use `cat /app/conf/rclone.conf \| base64` or any base64 online tools such as [this](https://www.base64encode.org/) to encode your `rclone.conf` as bse64 string. Note, you need to set `ENABLE_RCLONE` to true as well. |
|
||||
| `ENABLE_APP_CHECKER` | By default it's set to `true` to check if any new docker image version release on daily basis, which can help you get notification when new features released as well as some security vulnerabilities get fixed. You can set it to `false` to disable this feature. Note: you still need to manually pull the new image version and re run the docker container to complete upgrading. |
|
||||
| `CADDY_LOG_LEVEL` | For specifying the log level of Caddy, set it to `WARN` or`ERROR` to reduce logs. Default: `INFO` |
|
||||
| `RCLONE_AUTO_UPLOAD_PROVIDER` | The Rclone remote storage provider name, which can be found under `Rclone -> Configs`, default `""`, which means auto upload is disabled. When the value is not empty, then the files will be attempted to be uploaded.|
|
||||
| `RCLONE_AUTO_UPLOAD_REMOTE_PATH` | The file folder in remote cloud storage provider, default `/downloads`|
|
||||
| `RCLONE_AUTO_UPLOAD_FILE_MIN_SIZE` | Set the minimum file size of auto uploader, files smaller than it won't be uploaded, default `1K` |
|
||||
| `RCLONE_AUTO_UPLOAD_FILE_MAX_SIZE` | Set the limit of the Max file can be uploaded to 3rd party storage provider, default `100G`. |
|
||||
| `FIX_DATA_VOLUME_PERMISSIONS` | Default value is `false`. When set to `true`, the container will run `chown -R` command against `/data` folder and `PUID` and `PGID` you set. Please set it to `true` when container complains you don't have enough permissions to manage the files and folders you mounted.|
|
||||
|
||||
|
||||
### 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.
|
||||
| Mountable folder | Description|
|
||||
|:---|:---|
|
||||
| `/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. 🚨Please make sure you have `aria2.conf` and `aria2.session` file exist on your host, when yout mount /app/conf. 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/conf/aria2.conf` | See description above👆🏼 |
|
||||
|`/app/conf/aria2.session` | See description above👆🏼 |
|
||||
|`/app/conf/rclone.conf` | See description above👆🏼 |
|
||||
| `/app/conf/auto-upload.sh` | The bash script to be used for uploading downloaded files to remote storage provider via Rclone, mount your own script if you want to have custom logic. |
|
||||
| `/app/filebrowser.db` | File Browser settings database, make sure you make a empty file first on your host. |
|
||||
| `/app/.cache` | The folder for storing rclone caches and [aria2 DHT files](https://aria2.github.io/manual/en/html/aria2c.html#cmdoption-dht-file-path) |
|
||||
|
||||
|
||||
## Auto HTTPS enabling
|
||||
|
||||
@@ -147,6 +167,18 @@ Make sure you have added proper `A` record point to the host you running to your
|
||||
```bash
|
||||
docker run -d --name aria2-ui -p 80:80 -p 443:443 -e DOMAIN=https://toozhao.com wahyd4/aria2-ui
|
||||
```
|
||||
## Download Automation 🤖
|
||||
|
||||
### Download file through iPhone/Mac Shortcuts app.
|
||||
|
||||
First [Download Shortcut](https://www.icloud.com/shortcuts/7483b8cec7484c0f98b72882d0f1e3e2), then follow the promots to setup aria2-ui URL and RPC_SECRET. Then you are all ready to go, just to run the shortcut and provide the file URL which you want to download or the magnet/torrent file URL.
|
||||
|
||||
### Download file through cURL
|
||||
|
||||
```bash
|
||||
curl http://<ip>:<port>/jsonrpc -d "{\"jsonrcp\":\"2.0\",\"id\":\"someID\",\"method\":\"aria2.addUri\",\"params\":[\"token:someToken\",[\"http://some_file_url\"],{\"dir\":\"/data/downloads\"}]}"
|
||||
```
|
||||
|
||||
## Build the image by yourself
|
||||
|
||||
```bash
|
||||
@@ -178,3 +210,4 @@ I couldn't tell you how to run it in Kubernetes step by step, but once you have
|
||||
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)
|
||||
5. Why the app stopped working when I have `- v /<some-folder>:/app/conf` mounted. It happens when you mount the entire `/app/conf` folder but you don't have any files under that folder on your host. To fix this issue, please simply copy all files under [`conf`](https://github.com/wahyd4/aria2-ariang-docker/tree/master/conf) folder to your local folder that you mount to `/app/conf` and then rerun the container.
|
||||
|
||||
+52
-4
@@ -5,7 +5,9 @@ log {
|
||||
output stderr
|
||||
}
|
||||
|
||||
basicauth / {
|
||||
@protected path / /index.html /css/* /js/* /ro /ro/* /jsonrpc
|
||||
|
||||
basicauth @protected {
|
||||
ARIA2_USER ARIA2_PWD_ENCRYPT
|
||||
}
|
||||
|
||||
@@ -13,17 +15,63 @@ redir /ui / 301
|
||||
redir /ui/ / 301
|
||||
redir /rclone /rclone/ 301
|
||||
redir /files /files/ 301
|
||||
redir /ro /ro/ 301
|
||||
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
# Aria2 RPC with WebSocket support and timeouts
|
||||
reverse_proxy /rpc 127.0.0.1:6800 {
|
||||
transport http {
|
||||
read_timeout 300s
|
||||
write_timeout 300s
|
||||
dial_timeout 30s
|
||||
keepalive 90s
|
||||
keepalive_idle_conns 10
|
||||
max_conns_per_host 0
|
||||
}
|
||||
header_up X-Real-IP {remote_host}
|
||||
header_up X-Forwarded-For {remote_host}
|
||||
}
|
||||
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800 {
|
||||
transport http {
|
||||
read_timeout 300s
|
||||
write_timeout 300s
|
||||
dial_timeout 30s
|
||||
keepalive 90s
|
||||
keepalive_idle_conns 10
|
||||
max_conns_per_host 0
|
||||
}
|
||||
header_up X-Real-IP {remote_host}
|
||||
header_up X-Forwarded-For {remote_host}
|
||||
}
|
||||
|
||||
route /rclone/* {
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy 127.0.0.1:5572
|
||||
reverse_proxy 127.0.0.1:5572 {
|
||||
transport http {
|
||||
read_timeout 120s
|
||||
write_timeout 120s
|
||||
keepalive 60s
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
route /files/* {
|
||||
uri strip_prefix /files
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
reverse_proxy 127.0.0.1:8080 {
|
||||
transport http {
|
||||
read_timeout 120s
|
||||
write_timeout 120s
|
||||
keepalive 60s
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
route /ro/* {
|
||||
uri strip_prefix /ro
|
||||
root * /data
|
||||
file_server {
|
||||
browse "{$CADDY_FILE_SERVER_BROWSE_HTML}"
|
||||
}
|
||||
}
|
||||
|
||||
route /ping {
|
||||
|
||||
@@ -1,21 +1,26 @@
|
||||
#! /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)
|
||||
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 "[INFO] Start aria2 with secure config"
|
||||
if [[ "${ARIA2_SSL}" = "true" ]]; then
|
||||
echo "[INFO] Start aria2 with secure config and rpc-secret"
|
||||
|
||||
/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 \
|
||||
/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
|
||||
|
||||
elif [[ "${ARIA2_SSL}" = "false" ]] && [[ "${RPC_SECRET}" != "" ]]; then
|
||||
echo "[INFO] Start aria2 with rpc-secret"
|
||||
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" \
|
||||
--enable-rpc \
|
||||
--rpc-listen-all \
|
||||
--rpc-secret="${RPC_SECRET}"
|
||||
else
|
||||
|
||||
echo "[INFO] Start aria2 with standard mode"
|
||||
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" --enable-rpc --rpc-listen-all
|
||||
echo "[INFO] Start aria2 with standard mode"
|
||||
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" --enable-rpc --rpc-listen-all
|
||||
|
||||
fi
|
||||
|
||||
@@ -3,21 +3,21 @@
|
||||
echo "[INFO] Run aria2c and ariaNG"
|
||||
|
||||
echo "[INFO] Generate basic auth password for caddy"
|
||||
ARIA2_PWD_ENCRYPT=$(caddy hash-password -plaintext ${ARIA2_PWD})
|
||||
ARIA2_PWD_ENCRYPT=$(caddy hash-password --plaintext ${ARIA2_PWD})
|
||||
|
||||
case $ENABLE_AUTH in
|
||||
true)
|
||||
echo "[INFO] Use Basic Auth config file "
|
||||
export CADDY_FILE=/usr/local/caddy/SecureCaddyfile
|
||||
sed -i 's/ARIA2_USER/'"${ARIA2_USER}"'/g' ${CADDY_FILE}
|
||||
sed -i 's/ARIA2_PWD_ENCRYPT/'"${ARIA2_PWD_ENCRYPT}"'/g' ${CADDY_FILE}
|
||||
sed -i "s#ARIA2_USER#${ARIA2_USER}#g" ${CADDY_FILE}
|
||||
sed -i "s#ARIA2_PWD_ENCRYPT#${ARIA2_PWD_ENCRYPT}#g" ${CADDY_FILE}
|
||||
;;
|
||||
|
||||
heroku)
|
||||
echo "[INFO] Run Caddy with Heroku mode"
|
||||
export CADDY_FILE=/usr/local/caddy/HerokuCaddyfile
|
||||
sed -i 's/ARIA2_USER/'"${ARIA2_USER}"'/g' ${CADDY_FILE}
|
||||
sed -i 's/ARIA2_PWD_ENCRYPT/'"${ARIA2_PWD_ENCRYPT}"'/g' ${CADDY_FILE}
|
||||
sed -i "s#ARIA2_USER#${ARIA2_USER}#g" ${CADDY_FILE}
|
||||
sed -i "s#ARIA2_PWD_ENCRYPT#${ARIA2_PWD_ENCRYPT}#g" ${CADDY_FILE}
|
||||
|
||||
sed -i 's/PORT/'"${PORT}"'/g' ${CADDY_FILE}
|
||||
|
||||
@@ -28,4 +28,4 @@ heroku)
|
||||
;;
|
||||
esac
|
||||
|
||||
/usr/local/bin/caddy run -config ${CADDY_FILE} -adapter=caddyfile
|
||||
/usr/local/bin/caddy run --config ${CADDY_FILE} --adapter=caddyfile
|
||||
|
||||
+61
-8
@@ -14,7 +14,7 @@ rpc-listen-all=true
|
||||
#RPC端口, 仅当默认端口被占用时修改
|
||||
#rpc-listen-port=6800
|
||||
#最大同时下载数(任务数), 路由建议值: 3
|
||||
max-concurrent-downloads=5
|
||||
max-concurrent-downloads=3
|
||||
#种子最小分享率
|
||||
seed-ratio=100.0
|
||||
#断点续传
|
||||
@@ -24,7 +24,8 @@ max-connection-per-server=5
|
||||
#最小文件分片大小, 下载线程数上限取决于能分出多少片, 对于小文件重要
|
||||
min-split-size=10M
|
||||
#单文件最大线程数, 路由建议值: 5
|
||||
split=10
|
||||
# 降低到5以减少并发连接数 (3任务×5连接×5线程=75个连接,比之前的250少很多)
|
||||
split=5
|
||||
#下载速度限制
|
||||
max-overall-download-limit=0
|
||||
#单文件速度限制
|
||||
@@ -41,12 +42,14 @@ max-upload-limit=0
|
||||
# dir=/user-files/superuser/
|
||||
dir=/data
|
||||
#文件缓存, 使用内置的文件缓存, 如果你不相信Linux内核文件缓存和磁盘内置缓存时使用, 需要1.16及以上版本
|
||||
#disk-cache=0
|
||||
# 启用16MB磁盘缓存以提高性能
|
||||
disk-cache=16M
|
||||
#另一种Linux文件缓存方式, 使用前确保您使用的内核支持此选项, 需要1.15及以上版本(?)
|
||||
#enable-mmap=true
|
||||
#文件预分配, 能有效降低文件碎片, 提高磁盘性能. 缺点是预分配时间较长
|
||||
#所需时间 none < falloc ? trunc « prealloc, falloc和trunc需要文件系统和内核支持
|
||||
file-allocation=prealloc
|
||||
# 改用falloc,比prealloc快很多,同时保持较好的性能
|
||||
file-allocation=falloc
|
||||
|
||||
# disable IPV6 by default
|
||||
disable-ipv6=true
|
||||
@@ -56,6 +59,32 @@ log=/var/log/aria2.log
|
||||
#You can set either debug, info, notice, warn or error.
|
||||
log-level=warn
|
||||
|
||||
# 超时和重试设置
|
||||
# 连接超时时间(秒)
|
||||
connect-timeout=60
|
||||
# 超时时间(秒)
|
||||
timeout=60
|
||||
# 最大重试次数,0表示不限制
|
||||
max-tries=5
|
||||
# 重试等待时间(秒)
|
||||
retry-wait=10
|
||||
|
||||
# HTTP/FTP 选项
|
||||
# HTTP/FTP 最大连接数
|
||||
max-connection-per-server=5
|
||||
# 允许 HTTP/FTP 分片下载
|
||||
allow-piece-length-change=true
|
||||
# 允许覆盖已存在的文件
|
||||
allow-overwrite=false
|
||||
# 自动重命名
|
||||
auto-file-renaming=true
|
||||
|
||||
# 优化网络性能
|
||||
# URI 选择器,adaptive 会根据速度自动选择最快的服务器
|
||||
uri-selector=adaptive
|
||||
# 服务器状态保存间隔(秒)
|
||||
server-stat-of=/app/.cache/aria2_server_stat
|
||||
server-stat-timeout=86400
|
||||
|
||||
## Related to save downloading progress ##
|
||||
# 从会话文件中读取下载任务
|
||||
@@ -66,16 +95,40 @@ save-session=/app/conf/aria2.session
|
||||
save-session-interval=10
|
||||
|
||||
# BT trackers from https://trackerslist.com/best.txt updated on 2021-06-06
|
||||
bt-tracker=http://1337.abcvg.info:80/announce,http://nyaa.tracker.wf:7777/announce,http://opentracker.xyz:80/announce,http://rt.tace.ru:80/announce,http://share.camoe.cn:8080/announce,http://t.nyaatracker.com:80/announce,http://torrentsmd.com:8080/announce,http://tr.cili001.com:8070/announce,http://tracker-cdn.moeking.me:2095/announce,http://tracker.anirena.com:80/announce,http://tracker.anirena.com:80/b16a15d9a238d1f59178d3614b857290/announce,http://tracker.anonwebz.xyz:8080/announce,http://tracker.bt4g.com:2095/announce,http://tracker.files.fm:6969/announce,http://tracker.gbitt.info:80/announce,http://tracker.ipv6tracker.ru:80/announce,http://tracker.noobsubs.net:80/announce,http://tracker.shittyurl.org:80/announce,http://tracker.tfile.co:80/announce,http://tracker.tfile.me:80/announce,http://tracker.trackerfix.com:80/announce,http://vps02.net.orel.ru:80/announce,https://1337.abcvg.info:443/announce,https://tr.torland.ga:443/announce,https://tracker.coalition.space:443/announce,https://tracker.gbitt.info:443/announce,https://tracker.lilithraws.cf:443/announce,https://tracker.nanoha.org:443/announce,https://tracker.nitrix.me:443/announce,https://tracker.parrotsec.org:443/announce,https://tracker.shittyurl.org:443/announce,https://tracker.tamersunion.org:443/announce,https://w.wwwww.wtf:443/announce,udp://6rt.tace.ru:80/announce,udp://9.rarbg.com:2830/announce,udp://9.rarbg.me:2710/announce,udp://9.rarbg.to:2710/announce,udp://app.icon256.com:8000/announce,udp://bubu.mapfactor.com:6969/announce,udp://discord.heihachi.pw:6969/announce,udp://exodus.desync.com:6969/announce,udp://explodie.org:6969/announce,udp://fe.dealclub.de:6969/announce,udp://inferno.demonoid.is:3391/announce,udp://ipv6.tracker.zerobytes.xyz:16661/announce,udp://mail.realliferpg.de:6969/announce,udp://movies.zsw.ca:6969/announce,udp://mts.tvbit.co:6969/announce,udp://open.demonii.com:1337/announce,udp://open.stealth.si:80/announce,udp://opentor.org:2710/announce,udp://opentracker.i2p.rocks:6969/announce,udp://p4p.arenabg.ch:1337/announce,udp://p4p.arenabg.com:1337/announce,udp://pow7.com:80/announce,udp://retracker.hotplug.ru:2710/announce,udp://retracker.lanta-net.ru:2710/announce,udp://retracker.netbynet.ru:2710/announce,udp://retracker01-msk-virt.corbina.net:80/announce,udp://t1.leech.ie:1337/announce,udp://t2.leech.ie:1337/announce,udp://thetracker.org:80/announce,udp://torrentclub.online:54123/announce,udp://tracker-de.ololosh.space:6969/announce,udp://tracker.0x.tf:6969/announce,udp://tracker.altrosky.nl:6969/announce,udp://tracker.army:6969/announce,udp://tracker.beeimg.com:6969/announce,udp://tracker.birkenwald.de:6969/announce,udp://tracker.blacksparrowmedia.net:6969/announce,udp://tracker.breizh.pm:6969/announce,udp://tracker.ccp.ovh:6969/announce,udp://tracker.cyberia.is:6969/announce,udp://tracker.dler.com:6969/announce,udp://tracker.internetwarriors.net:1337/announce,udp://tracker.moeking.me:6969/announce,udp://tracker.nrx.me:6969/announce,udp://tracker.ololosh.space:6969/announce,udp://tracker.openbittorrent.com:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://tracker.shkinev.me:6969/announce,udp://tracker.theoks.net:6969/announce,udp://tracker.tiny-vps.com:6969/announce,udp://tracker.torrent.eu.org:451/announce,udp://tracker.uw0.xyz:6969/announce,udp://tracker.zerobytes.xyz:1337/announce,udp://tracker0.ufibox.com:6969/announce,udp://tracker1.bt.moack.co.kr:80/announce,udp://tracker1.itzmx.com:8080/announce,udp://tracker2.dler.com:80/announce,udp://tracker2.dler.org:80/announce,udp://tracker2.itzmx.com:6961/announce,udp://tracker3.itzmx.com:6961/announce,udp://tracker4.itzmx.com:2710/announce,udp://u.wwwww.wtf:1/announce,udp://valakas.rollo.dnsabr.com:2710/announce,udp://vibe.community:6969/announce,udp://wassermann.online:6969/announce,udp://www.torrent.eu.org:451/announce
|
||||
bt-tracker=http://1337.abcvg.info:80/announce,http://aboutbeautifulgallopinghorsesinthegreenpasture.online:80/announce,http://bt.okmp3.ru:2710/announce,http://echostar.ddnsfree.com:8080/announce,http://ipv4.rer.lol:2710/announce,http://ipv6.rer.lol:6969/announce,http://lucke.fenesisu.moe:6969/announce,http://nyaa.tracker.wf:7777/announce,http://t-backup.213891.xyz:80/announce,http://tk.greedland.net:80/announce,http://torrentsmd.com:8080/announce,http://tr.highstar.shop:80/announce,http://tracker.beeimg.com:6969/announce,http://tracker.bt4g.com:2095/announce,http://tracker.dhitechnical.com:6969/announce,http://tracker.mywaifu.best:6969/announce,http://tracker.renfei.net:8080/announce,http://tracker.tritan.gg:8080/announce,http://www.all4nothin.net:80/announce.php,http://www.wareztorrent.com:80/announce,https://1337.abcvg.info:443/announce,https://shahidrazi.online:443/announce,https://t.213891.xyz:443/announce,https://torrent.tracker.durukanbal.com:443/announce,https://tr.abiir.top:443/announce,https://tr.abir.ga:443/announce,https://tr.nyacat.pw:443/announce,https://tracker.alaskantf.com:443/announce,https://tracker.belmult.online:443/announce,https://tracker.foreverpirates.co:443/announce,https://tracker.ghostchu-services.top:443/announce,https://tracker.kuroy.me:443/announce,https://tracker.moeblog.cn:443/announce,https://tracker.pmman.tech:443/announce,https://tracker.qingwa.pro:443/announce,https://tracker.uraniumhexafluori.de:443/announce,https://tracker.yemekyedim.com:443/announce,https://tracker.zhuqiy.com:443/announce,https://tracker1.520.jp:443/announce,udp://anna.bt.bontal.net:6969/announce,udp://d40969.acod.regrucolo.ru:6969/announce,udp://evan.im:6969/announce,udp://exodus.desync.com:6969/announce,udp://extracker.dahrkael.net:6969/announce,udp://hificode.in:6969/announce,udp://martin-gebhardt.eu:25/announce,udp://open-tracker.demonoid.ch:6969/announce,udp://open.demonii.com:1337/announce,udp://open.demonoid.ch:6969/announce,udp://open.stealth.si:80/announce,udp://opentor.org:2710/announce,udp://opentracker.io:6969/announce,udp://p4p.arenabg.com:1337/announce,udp://public.demonoid.ch:6969/announce,udp://retracker.hotplug.ru:2710/announce,udp://retracker.lanta.me:2710/announce,udp://retracker01-msk-virt.corbina.net:80/announce,udp://run.publictracker.xyz:6969/announce,udp://torrentclub.online:54123/announce,udp://tr4ck3r.duckdns.org:6969/announce,udp://tracker.dler.com:6969/announce,udp://tracker.dler.org:6969/announce,udp://tracker.ducks.party:1984/announce,udp://tracker.fnix.net:6969/announce,udp://tracker.gmi.gd:6969/announce,udp://tracker.opentrackr.org:1337/announce,udp://tracker.playground.ru:6969/announce,udp://tracker.plx.im:6969/announce,udp://tracker.qu.ax:6969/announce,udp://tracker.skyts.net:6969/announce,udp://tracker.srv00.com:6969/announce,udp://tracker.theoks.net:6969/announce,udp://tracker.torrent.eu.org:451/announce,udp://tracker.tryhackx.org:6969/announce,udp://tracker.tvunderground.org.ru:3218/announce,udp://tracker1.myporn.club:9337/announce,udp://tracker2.dler.org:80/announce,udp://udp.tracker.projectk.org:23333/announce,udp://wepzone.net:6969/announce,udp://www.torrent.eu.org:451/announce,wss://tracker.openwebtorrent.com:443/announce
|
||||
|
||||
# The script to be run when download completes
|
||||
on-download-complete=/app/conf/aria2-sample-hook.sh
|
||||
#on-download-complete=/app/conf/aria2-sample-hook.sh
|
||||
on-download-complete=/app/conf/auto-upload.sh
|
||||
|
||||
# The script to be run when download fails
|
||||
on-download-error=/app/conf/aria2-sample-hook.sh
|
||||
|
||||
## DHT
|
||||
## BT/DHT 优化
|
||||
# 启用本地节点查找
|
||||
bt-enable-lpd=true
|
||||
# 启用 DHT 功能
|
||||
enable-dht=true
|
||||
# 启用 DHT6(IPv6 DHT)
|
||||
#enable-dht6=false
|
||||
# BT 监听端口
|
||||
listen-port=6881-6999
|
||||
# DHT 监听端口
|
||||
dht-listen-port=6881
|
||||
# DHT 入口节点
|
||||
dht-entry-point=dht.transmissionbt.com:6881
|
||||
dht-entry-point=dht.vuze.com:6881
|
||||
dht-entry-point=dht.libtorrent.org:25401
|
||||
dht-listen-port=6881
|
||||
# DHT 文件
|
||||
dht-file-path=/app/.cache/dht.dat
|
||||
dht-file-path6=/app/.cache/dht6.dat
|
||||
# BT 最大连接数
|
||||
bt-max-peers=50
|
||||
# BT 请求的 peer 数量
|
||||
bt-request-peer-speed-limit=50K
|
||||
# 继续之前的BT任务时不进行hash检查
|
||||
bt-seed-unverified=true
|
||||
# BT tracker 的最大连接超时时间
|
||||
bt-tracker-connect-timeout=10
|
||||
# BT tracker 超时时间
|
||||
bt-tracker-timeout=10
|
||||
|
||||
Executable
+35
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
if [[ ${RCLONE_AUTO_UPLOAD_PROVIDER} == "" ]]; then
|
||||
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Auto upload isn't enabled"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
file_count=$2
|
||||
file_path=$3
|
||||
downloadsFolder='/data'
|
||||
|
||||
if [ ${file_count} -eq 0 ]; then
|
||||
echo "[WARN] $(date -u +'%Y-%m-%dT%H:%M:%SZ') No files detected. Original parameters: Files Count: ${file_count}, Files Path: ${file_path}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Start to upload files with: Files Count: ${file_count}, Files Path: ${file_path}"
|
||||
|
||||
folder=${file_path%/*}
|
||||
|
||||
if [ "${folder}" == "" ]; then # Not the actual file, or no files downloaded.
|
||||
echo "[WARN] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Fail to find files ${file_path}"
|
||||
exit 0
|
||||
else
|
||||
if [[ "$(ls -A "$folder/")" != "" ]] && [[ ${folder} != ${downloadsFolder} ]] ; then
|
||||
# Copy files to remote
|
||||
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Start uploading entire folder ${folder}"
|
||||
rclone copy "${folder}" ${RCLONE_AUTO_UPLOAD_PROVIDER}:${RCLONE_AUTO_UPLOAD_REMOTE_PATH}${folder}/ --min-size ${RCLONE_AUTO_UPLOAD_FILE_MIN_SIZE} --max-size ${RCLONE_AUTO_UPLOAD_FILE_MAX_SIZE} -P
|
||||
else
|
||||
#Handle single file
|
||||
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Start uploading file file_path"
|
||||
rclone copy "${file_path}" ${RCLONE_AUTO_UPLOAD_PROVIDER}:${RCLONE_AUTO_UPLOAD_REMOTE_PATH}${folder}/ --min-size ${RCLONE_AUTO_UPLOAD_FILE_MIN_SIZE} --max-size ${RCLONE_AUTO_UPLOAD_FILE_MAX_SIZE} -P
|
||||
fi
|
||||
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Successfully uploaded ${file_count} files ${file_path}"
|
||||
fi
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash -eu
|
||||
|
||||
echo "Checking if FileBrowser is enabled..."
|
||||
|
||||
if [ "$ENABLE_FILEBROWSER" = "true" ]; then
|
||||
echo "Starting FileBrowser..."
|
||||
/app/filebrowser -p 8080 -d /app/filebrowser.db -r /data -b /files
|
||||
else
|
||||
echo "FileBrowser is disabled. Set ENABLE_FILEBROWSER=true to enable it."
|
||||
sleep 3650d
|
||||
fi
|
||||
@@ -8,17 +8,24 @@ mkdir -p /app/.caddy
|
||||
mkdir -p /app/.cache
|
||||
mkdir -p /app/.cache/aria2
|
||||
|
||||
echo "[INFO] Run chown against app related folders and user ${PUID}"
|
||||
|
||||
chown -R junv:junv \
|
||||
/app \
|
||||
/app/.caddy \
|
||||
/app/.cache \
|
||||
/usr/local \
|
||||
/var/log \
|
||||
/data
|
||||
/var/log
|
||||
|
||||
if [[ "${FIX_DATA_VOLUME_PERMISSIONS}" = "true" ]]; then
|
||||
echo "[INFO] Setup user ${PUID} proper permissions for /data"
|
||||
chown -R junv:junv /data
|
||||
fi
|
||||
|
||||
chmod +x /app/caddy.sh \
|
||||
/app/rclone.sh \
|
||||
/app/aria2c.sh
|
||||
/app/aria2c.sh \
|
||||
/app/filebrowser.sh
|
||||
|
||||
echo "[INFO] Give caddy permissions to use low ports"
|
||||
setcap cap_net_bind_service=+ep /usr/local/bin/caddy
|
||||
|
||||
+13
-9
@@ -2,10 +2,10 @@
|
||||
|
||||
echo "[INFO] Set variables for $(arch)"
|
||||
|
||||
caddy_version=2.4.6
|
||||
filebrowser_version=v2.21.1
|
||||
rclone_version=v1.58.0
|
||||
ariang_version=1.2.3
|
||||
caddy_version=2.10.2
|
||||
filebrowser_version=v2.44.2
|
||||
rclone_version=v1.71.2
|
||||
ariang_version=1.3.11
|
||||
|
||||
case "$(arch)" in
|
||||
|
||||
@@ -34,14 +34,15 @@ 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 fuse vim --no-cache \
|
||||
groupadd junv \
|
||||
&& useradd -g junv -m -s /bin/bash junv \
|
||||
&& apt update \
|
||||
&& apt install -y wget curl aria2 tar unzip libcap2-bin runit\
|
||||
&& 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} \
|
||||
&& wget -P /app -N https://raw.githubusercontent.com/glowinthedark/caddy-file-server-browse-extension/39e997c91539d0f04fcce53a3cb6605b2ae9e50c/browse.html \
|
||||
&& platform=linux-amd64 \
|
||||
&& wget -N https://github.com/filebrowser/filebrowser/releases/download/${filebrowser_version}/${filebrowser_file} \
|
||||
&& tar -zxf ${filebrowser_file} \
|
||||
@@ -65,6 +66,9 @@ adduser -D -u 1000 junv \
|
||||
&& unzip ${ariang_file} \
|
||||
&& rm -rf ${ariang_file} \
|
||||
&& chmod -R 755 /usr/local/www/aria2 \
|
||||
&& mkdir -p /data && chown junv:junv /data \
|
||||
&& mkdir -p /data/cloud \
|
||||
&& chown junv:junv /data/cloud \
|
||||
&& ln -s /data/cloud /app
|
||||
&& ln -s /data/cloud /app \
|
||||
&& apt remove -y unzip\
|
||||
&& apt clean
|
||||
|
||||
Reference in New Issue
Block a user