mirror of
https://github.com/wahyd4/aria2-ariang-docker.git
synced 2026-08-09 05:15:55 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e703dd4338 | ||
|
|
ece987ec60 | ||
|
|
ff8a474b6d | ||
|
|
b6c155207d | ||
|
|
46fd0a842f | ||
|
|
a20300c9ea | ||
|
|
86252c1961 | ||
|
|
6493c7cc19 | ||
|
|
1bd477d89e | ||
|
|
337511813d | ||
|
|
c4a5f82641 | ||
|
|
c2adb8c41e | ||
|
|
ff54b5b92c | ||
|
|
c47b5d19e6 | ||
|
|
5108254f44 | ||
|
|
d12c6f7ea2 | ||
|
|
aa1db00ca1 |
+1
-1
@@ -1 +1 @@
|
||||
4.12.0
|
||||
4.15.0
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#{
|
||||
# auto_https off
|
||||
#}
|
||||
|
||||
{$DOMAIN}
|
||||
|
||||
log {
|
||||
level {env.CADDY_LOG_LEVEL}
|
||||
output stderr
|
||||
}
|
||||
|
||||
redir /ui / 301
|
||||
redir /ui/ / 301
|
||||
redir /rclone /rclone/ 301
|
||||
@@ -12,23 +13,20 @@ redir /files /files/ 301
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
|
||||
route /rclone/* {
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy 127.0.0.1:5572
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy 127.0.0.1:5572
|
||||
}
|
||||
|
||||
route /files/* {
|
||||
uri strip_prefix /files
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
uri strip_prefix /files
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
}
|
||||
|
||||
route /ping {
|
||||
respond "pong"
|
||||
respond "app version: {env.APP_VERSION}"
|
||||
}
|
||||
|
||||
root * /usr/local/www/aria2
|
||||
file_server
|
||||
|
||||
encode gzip
|
||||
log {
|
||||
output stderr
|
||||
}
|
||||
|
||||
+14
-7
@@ -6,9 +6,7 @@ WORKDIR /app
|
||||
|
||||
RUN git clone https://github.com/wahyd4/forego.git \
|
||||
&& cd forego \
|
||||
&& git checkout 20180216151118 \
|
||||
&& go mod init \
|
||||
&& go mod vendor \
|
||||
&& git checkout fix-go-mod \
|
||||
&& go mod download \
|
||||
&& go build -o forego \
|
||||
&& chmod +x forego
|
||||
@@ -33,8 +31,14 @@ ENV CADDYPATH=/app
|
||||
ENV RCLONE_CONFIG=/app/conf/rclone.conf
|
||||
ENV XDG_DATA_HOME=/app/.caddy/data
|
||||
ENV XDG_CONFIG_HOME=/app/.caddy/config
|
||||
ENV XDG_CACHE_HOME=/app/.cache
|
||||
ENV RCLONE_CONFIG_BASE64=""
|
||||
ENV ENABLE_APP_CHECKER=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
|
||||
|
||||
ADD install.sh aria2c.sh caddy.sh Procfile init.sh start.sh rclone.sh new-version-checker.sh APP_VERSION /app/
|
||||
ADD conf /app/conf
|
||||
@@ -46,13 +50,16 @@ RUN ./install.sh
|
||||
|
||||
RUN rm ./install.sh
|
||||
|
||||
# folder for storing ssl keys
|
||||
VOLUME /app/conf/key
|
||||
# For config files
|
||||
VOLUME /app/conf/
|
||||
|
||||
# file downloading folder
|
||||
# For file downloading
|
||||
VOLUME /data
|
||||
|
||||
EXPOSE 80 443
|
||||
# For rclone cache and aria2 DHT files
|
||||
VOLUME /app/.cache
|
||||
|
||||
EXPOSE 80 443 6881
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s \
|
||||
CMD curl -f http://localhost/ping || exit 1
|
||||
|
||||
+9
-10
@@ -1,13 +1,12 @@
|
||||
{
|
||||
debug
|
||||
admin off
|
||||
auto_https off
|
||||
admin off
|
||||
auto_https off
|
||||
}
|
||||
|
||||
:PORT
|
||||
|
||||
basicauth / {
|
||||
ARIA2_USER ARIA2_PWD_ENCRYPT
|
||||
ARIA2_USER ARIA2_PWD_ENCRYPT
|
||||
}
|
||||
|
||||
redir /ui / 301
|
||||
@@ -18,17 +17,17 @@ redir /files /files/ 301
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
|
||||
route /rclone/* {
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy 127.0.0.1:5572
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy 127.0.0.1:5572
|
||||
}
|
||||
|
||||
route /files/* {
|
||||
uri strip_prefix /files
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
uri strip_prefix /files
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
}
|
||||
|
||||
route /ping {
|
||||
respond "pong"
|
||||
respond "app version: {env.APP_VERSION}"
|
||||
}
|
||||
|
||||
root * /usr/local/www/aria2
|
||||
@@ -36,5 +35,5 @@ file_server
|
||||
|
||||
encode gzip
|
||||
log {
|
||||
output stderr
|
||||
output stderr
|
||||
}
|
||||
|
||||
+16
-3
@@ -2,15 +2,17 @@ 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)
|
||||
|
||||
[](https://heroku.com/deploy?template=https://github.com/wahyd4/aria2-ariang-docker/tree/master)
|
||||
|
||||
|
||||
[](https://badges.toozhao.com/stats/01EJ791D8BB43PDS8D7PP7H0YE "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"/>
|
||||
|
||||
|
||||
@@ -27,6 +29,7 @@ Aria2 + AriaNg
|
||||
- [自动 SSL](#自动-ssl)
|
||||
- [自行构建镜像](#自行构建镜像)
|
||||
- [Docker Hub](#docker-hub)
|
||||
- [在 Kubernetes 里面运行 (我的最爱)](#在-kubernetes-里面运行-我的最爱)
|
||||
- [使用 Docker compose 来运行](#使用-docker-compose-来运行)
|
||||
- [常见问题](#常见问题)
|
||||
|
||||
@@ -44,7 +47,7 @@ File Browser
|
||||
* 自动 HTTPS (Let's Encrypt)
|
||||
* 支持绑定自定义用户ID,可以主机上的非`root`用户,也可以管理下载的文件
|
||||
* Basic Auth 用户认证
|
||||
* 文件管理和视频播放 ([FileBrowser](https://filebrowser.xyz/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
|
||||
* 文件管理和视频播放 ([FileBrowser](https://filebrowser.org/),注意默认情况下,只能访问和管理 `/data` 目录下的文件)
|
||||
* 支持ARM CPU 架构,因此可以在树莓派等设备上运行,
|
||||
|
||||
## 推荐使用的docker image tag
|
||||
@@ -146,6 +149,16 @@ docker build -t aria2-ui .
|
||||
|
||||
<https://hub.docker.com/r/wahyd4/aria2-ui/>
|
||||
|
||||
## 在 Kubernetes 里面运行 (我的最爱)
|
||||
|
||||
首先,在Kubernetes 里面运行本Docker 镜像比在Docker 里面更加复杂,需要更多的相关知识,但是也更加有意思,给你带来更多的折腾之后的满足。
|
||||
你可以使用`minikube`,Docker 桌面应用自带Kubernetes 或者 使用`kubeadm`来安装Kubernetes,然后你需要根据自己的需要修改 [k8s-manifest.yaml](k8s-manifest.yaml) 来满足你的需要的需求。比如:
|
||||
|
||||
* NFS PV provider(使用NAS 作为容器存储)
|
||||
* Ingress 访问, Oauth 登录灯其他访问控制
|
||||
* VPN (让数据访问更加安全)
|
||||
* 其他的一些 Sidecars
|
||||
|
||||
## 使用 Docker compose 来运行
|
||||
|
||||
请参考 <https://github.com/wahyd4/aria2-ariang-x-docker-compose>
|
||||
|
||||
@@ -6,13 +6,11 @@ English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/mast
|
||||
[](https://hub.docker.com/r/wahyd4/aria2-ui/)
|
||||
[](https://github.com/wahyd4/aria2-ariang-docker/actions)
|
||||
|
||||
[](https://heroku.com/deploy?template=https://github.com/wahyd4/aria2-ariang-docker/tree/master)
|
||||
|
||||
[](https://badges.toozhao.com/stats/aria2-ariang-docker "Page Views Count")
|
||||
|
||||
|
||||
|
||||
**If you like this project, please consider support me / 如果喜欢本项目,请考虑打赏,谢谢!**
|
||||
**If you like this project, please consider [sponsoring me](https://github.com/sponsors/wahyd4) / 如果喜欢本项目,请考虑打赏,谢谢!**
|
||||
|
||||
<img src="https://raw.githubusercontent.com/wahyd4/work-in-australia/766592ac6318027d7b3c334d8c50ca80818eeff8/wepay.jpg" alt="buy me a drink" width="120"/>
|
||||
|
||||
@@ -27,7 +25,8 @@ English | [简体中文](https://github.com/wahyd4/aria2-ariang-docker/blob/mast
|
||||
- [Auto HTTPS enabling](#auto-https-enabling)
|
||||
- [Build the image by yourself](#build-the-image-by-yourself)
|
||||
- [Docker Hub](#docker-hub)
|
||||
- [Usage it in Docker compose](#usage-it-in-docker-compose)
|
||||
- [Running it on Kubernetes (My favorite)](#running-it-on-kubernetes-my-favorite)
|
||||
- [Running it with Docker compose](#running-it-with-docker-compose)
|
||||
- [FAQ](#faq)
|
||||
|
||||
One Docker image for file downloading, managing, sharing, as well as video playing and evening cloud storage synchronization.
|
||||
@@ -47,12 +46,13 @@ File Browser
|
||||
* [Aria2 (SSL support)](https://aria2.github.io)
|
||||
* [AriaNg](https://github.com/mayswind/AriaNg)
|
||||
* [Rclone](https://rclone.org/)
|
||||
* [File Browser](https://filebrowser.xyz/): Files mangement and videos playing
|
||||
* [File Browser](https://filebrowser.org/): Files mangement and videos playing
|
||||
* Auto HTTPS (Let's Encrypt)
|
||||
* Bind non root user into container, so non root user can also manage downloaded files.
|
||||
* 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
|
||||
|
||||
@@ -88,7 +88,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 \
|
||||
@@ -116,30 +118,38 @@ 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`
|
||||
| `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. |
|
||||
| CADDY_LOG_LEVEL | For specifying the log level of Caddy, set it to `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`. |
|
||||
|
||||
|
||||
### 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. 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/conf/aria2.conf` | See description above👆🏼 |
|
||||
|`/app/conf/aria2.session` | See description above👆🏼 |
|
||||
|`/app/conf/rclone.conf` | See description above👆🏼 |
|
||||
| `/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
|
||||
|
||||
@@ -158,10 +168,22 @@ docker run -d --name aria2-ui -p 80:80 -p 443:443 -e DOMAIN=https://toozhao.com
|
||||
|
||||
<https://hub.docker.com/r/wahyd4/aria2-ui/>
|
||||
|
||||
## Usage it in Docker compose
|
||||
## Running it on Kubernetes (My favorite)
|
||||
|
||||
First of all, I have to say running this docker image on Kubernetes is more challenging and requires more knowledges than running it in raw Docker, but which is more powerful.
|
||||
I couldn't tell you how to run it in Kubernetes step by step, but once you have a running Kubernetes cluster(You can install Kubernetes via `minikube`, `Docker desktop app`, `kubeadm` and many other tools.), then you can modify the [k8s-manifest.yaml](k8s-manifest.yaml) to satisfy all your requirements. Such as:
|
||||
|
||||
* NFS PV provider(Use your NAS as storage)
|
||||
* Ingress access, Oauth login, more access controls via Nginx etc.
|
||||
* VPN tunnel (Secure your traffic)
|
||||
* Sidecars and so on.
|
||||
|
||||
## Running it with 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.
|
||||
|
||||
+11
-10
@@ -1,8 +1,12 @@
|
||||
|
||||
{$DOMAIN}
|
||||
|
||||
log {
|
||||
level {env.CADDY_LOG_LEVEL}
|
||||
output stderr
|
||||
}
|
||||
|
||||
basicauth / {
|
||||
ARIA2_USER ARIA2_PWD_ENCRYPT
|
||||
ARIA2_USER ARIA2_PWD_ENCRYPT
|
||||
}
|
||||
|
||||
redir /ui / 301
|
||||
@@ -13,23 +17,20 @@ redir /files /files/ 301
|
||||
reverse_proxy /jsonrpc 127.0.0.1:6800
|
||||
|
||||
route /rclone/* {
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy 127.0.0.1:5572
|
||||
uri strip_prefix /rclone
|
||||
reverse_proxy 127.0.0.1:5572
|
||||
}
|
||||
|
||||
route /files/* {
|
||||
uri strip_prefix /files
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
uri strip_prefix /files
|
||||
reverse_proxy 127.0.0.1:8080
|
||||
}
|
||||
|
||||
route /ping {
|
||||
respond "pong"
|
||||
respond "app version: {env.APP_VERSION}"
|
||||
}
|
||||
|
||||
root * /usr/local/www/aria2
|
||||
file_server
|
||||
|
||||
encode gzip
|
||||
log {
|
||||
output stderr
|
||||
}
|
||||
|
||||
+8
-1
@@ -69,7 +69,14 @@ save-session-interval=10
|
||||
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
|
||||
|
||||
# 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
|
||||
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
|
||||
|
||||
Executable
+42
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash -eu
|
||||
RCLONE_AUTO_UPLOAD_PROVIDER=google-drive
|
||||
if [[ $RCLONE_AUTO_UPLOAD_PROVIDER == "" ]]; then
|
||||
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Auto upload isn't enabled"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $2 -eq 0 ]; then
|
||||
echo "[WARN] $(date -u +'%Y-%m-%dT%H:%M:%SZ') No files detected"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Start to upload files with: Files Count: [$2], Files Path: [$3]"
|
||||
|
||||
path=$3 # File full path
|
||||
downloadpath='/data' # Aria2 downloading folder
|
||||
provider_name=$RCLONE_AUTO_UPLOAD_PROVIDER # RClone remote provider
|
||||
folder=$RCLONE_AUTO_UPLOAD_REMOTE_PATH # Foler path in Rclone remote provider
|
||||
MinSize=$RCLONE_AUTO_UPLOAD_FILE_MIN_SIZE # Set mininum file size to be uploaded, files smaller than this will be deleted without uploading
|
||||
MaxSize=$RCLONE_AUTO_UPLOAD_FILE_MAX_SIZE # Set the Max file size to be uploaded
|
||||
|
||||
while true; do #提取下载文件根路径,如把/data/a/b/c/d.jpg变成/data/a
|
||||
file_path=$path
|
||||
path=${path%/*}
|
||||
if [ "$path" == "" ]; then #不在下载文件夹
|
||||
exit 0
|
||||
elif [ "$path" == "$downloadpath" ] && [ $2 -eq 1 ]; then # To handle single file
|
||||
rclone move "$file_path" ${provider_name}:${folder}/
|
||||
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Successfully uploaded file $file_path"
|
||||
exit 0
|
||||
elif [ "$path" == "$downloadpath" ]; then # To handle folder
|
||||
while [[ "$(ls -A "$file_path/")" != "" ]]; do
|
||||
rclone move "$file_path"/ ${provider_name}:${folder}/"${file_path##*/}"/ --delete-empty-src-dirs --min-size $MinSize --max-size $MaxSize
|
||||
|
||||
echo "[INFO] $(date -u +'%Y-%m-%dT%H:%M:%SZ') Successfully uploaded file $file_path"
|
||||
|
||||
rclone delete -v "$file_path" --max-size $MinSize # Delete files smaller than min file.
|
||||
done
|
||||
rm -rf "$file_path/"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
@@ -6,6 +6,7 @@ usermod -o -u "$PUID" junv
|
||||
|
||||
mkdir -p /app/.caddy
|
||||
mkdir -p /app/.cache
|
||||
mkdir -p /app/.cache/aria2
|
||||
|
||||
chown -R junv:junv \
|
||||
/app \
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@
|
||||
echo "[INFO] Set variables for $(arch)"
|
||||
|
||||
caddy_version=2.4.6
|
||||
filebrowser_version=v2.20.1
|
||||
rclone_version=v1.57.0
|
||||
filebrowser_version=v2.21.1
|
||||
rclone_version=v1.58.0
|
||||
ariang_version=1.2.3
|
||||
|
||||
case "$(arch)" in
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: files
|
||||
spec:
|
||||
revisionHistoryLimit: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: files
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: files
|
||||
spec:
|
||||
volumes:
|
||||
# - name: config
|
||||
# persistentVolumeClaim:
|
||||
# claimName: configs-pv
|
||||
- name: downloads
|
||||
persistentVolumeClaim:
|
||||
claimName: downloads-pv
|
||||
containers:
|
||||
- name: files
|
||||
image: wahyd4/aria2-ui:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: files-port
|
||||
protocol: TCP
|
||||
env:
|
||||
## Update this to the final port you would use in the browser
|
||||
- name: ARIA2_EXTERNAL_PORT
|
||||
value: "443"
|
||||
- name: PUID
|
||||
value: "1000"
|
||||
- name: PGID
|
||||
value: "1000"
|
||||
volumeMounts:
|
||||
# - name: config
|
||||
# subPath: aria
|
||||
# mountPath: /app/conf
|
||||
# - name: config
|
||||
# subPath: files/filebrowser.db
|
||||
# mountPath: /app/filebrowser.db
|
||||
- name: downloads
|
||||
mountPath: /data
|
||||
resources:
|
||||
requests:
|
||||
cpu: 150m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 400m
|
||||
memory: 1024Mi
|
||||
# An example of encrypting the traffic with some vpn providerm, please update the configurations accordingly
|
||||
# - name: openvpn
|
||||
# image: qmcgaw/gluetun:latest
|
||||
# securityContext:
|
||||
# runAsUser: 0
|
||||
# privileged: true
|
||||
# capabilities:
|
||||
# add: ["NET_ADMIN"]
|
||||
# imagePullPolicy: Always
|
||||
# env:
|
||||
# - name: OPENVPN_USER
|
||||
# value: xxxx
|
||||
# - name: OPENVPN_PASSWORD
|
||||
# valueFrom:
|
||||
# secretKeyRef:
|
||||
# name: openvpn-password
|
||||
# key: password
|
||||
# - name: VPNSP
|
||||
# value: "private internet access"
|
||||
# - name: PIA_ENCRYPTION
|
||||
# value: normal
|
||||
# - name: REGION
|
||||
# value: "AU Sydney"
|
||||
# - name: TZ
|
||||
# value: Australia/Melbourne
|
||||
# resources:
|
||||
# requests:
|
||||
# cpu: 100m
|
||||
# memory: 126Mi
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
# memory: 126Mi
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: files
|
||||
labels:
|
||||
app: files
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: files-port
|
||||
protocol: TCP
|
||||
name: web
|
||||
selector:
|
||||
app: files
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: downloads-pv
|
||||
labels:
|
||||
type: local
|
||||
spec:
|
||||
storageClassName: manual
|
||||
capacity:
|
||||
storage: 100Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
hostPath:
|
||||
path: "/mnt/data"
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: "downloads-pv"
|
||||
spec:
|
||||
storageClassName: "manual"
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Gi
|
||||
|
||||
|
||||
# ---
|
||||
# ingress example
|
||||
# apiVersion: networking.k8s.io/v1
|
||||
# kind: Ingress
|
||||
# metadata:
|
||||
# name: files-ingress
|
||||
# annotations:
|
||||
# kubernetes.io/ingress.class: "nginx"
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
# cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
# nginx.ingress.kubernetes.io/proxy-body-size: 10240m
|
||||
# spec:
|
||||
# tls:
|
||||
# - hosts:
|
||||
# - xx.example.com
|
||||
# secretName: files-tls
|
||||
# rules:
|
||||
# - host: xx.example.com
|
||||
# http:
|
||||
# paths:
|
||||
# - path: /
|
||||
# pathType: Prefix
|
||||
# backend:
|
||||
# service:
|
||||
# name: files
|
||||
# port:
|
||||
# number: 80
|
||||
Reference in New Issue
Block a user