From 384327d937aa4861b35c156bb95643d7e4f36480 Mon Sep 17 00:00:00 2001 From: anthonyraymond Date: Wed, 30 Aug 2017 00:03:48 +0200 Subject: [PATCH 1/8] auto resume seed on container restart --- Dockerfile.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.arm b/Dockerfile.arm index 4f05924..cb65e04 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -39,7 +39,7 @@ RUN curl -L "https://storage.googleapis.com/golang/go1.8.linux-armv6l.tar.gz" > && unset GOROOT && unset GOPATH # goreman setup -RUN echo "web: gosu aria /bin/busybox httpd -f -p 8080 -h /webui-aria2\nbackend: gosu aria /usr/bin/aria2c --conf-path=/data/.aria2/aria2.conf" > Procfile +RUN echo "web: gosu aria /bin/busybox httpd -f -p 8080 -h /webui-aria2\nbackend: gosu aria /usr/bin/aria2c --conf-path=/data/.aria2/aria2.conf" /data/downloads/*.torrent > Procfile # aria2 downloads directory VOLUME /data From de68127c7338f880c3033e9c5b2da74bf09999ae Mon Sep 17 00:00:00 2001 From: Anthony Raymond Date: Fri, 1 Sep 2017 21:02:32 +0200 Subject: [PATCH 2/8] typo in readme I wrote this part of the readme a while ago and i made a small type x) sorry about that --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9942055..a160020 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ sudo docker run -v /Downloads:/data -p 6800:6800 -p 9100:8080 --name="webui-aria This image contains both aria2 and webui-aria2. -Build it (may take several hours due to the aria2 compilation process. Don't panic and grap a coffee) +Build it (may take several hours due to the aria2 compilation process. Don't panic and grab a coffee) ``` docker build -f Dockerfile.arm -t yourname/webui-aria2 . ``` From 25c9e4768c70147d4cae57a0755249d559be0894 Mon Sep 17 00:00:00 2001 From: onlyJinx <925198583@qq.com> Date: Wed, 13 Sep 2017 21:37:55 +0800 Subject: [PATCH 3/8] Update index.html chrome Status bar discolored of Android --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index 4caa7af..d59693e 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,7 @@ + Aria2 WebUI From 067c36956139786cd8645c17fd318a03c18b0bbc Mon Sep 17 00:00:00 2001 From: Raidou Date: Wed, 20 Sep 2017 14:43:43 +0800 Subject: [PATCH 4/8] fix when --out parameter contain more space, and support single quotes --- js/ctrls/modal.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/ctrls/modal.js b/js/ctrls/modal.js index a3c6df3..85b30fd 100644 --- a/js/ctrls/modal.js +++ b/js/ctrls/modal.js @@ -79,15 +79,15 @@ angular parse: function() { return _ .chain(this.uris.trim().split(/\r?\n/g)) - .map(function(d) { + .map(function(d) { return _(d) - .replace(/("[^"]*")/g, function(c) { - return c.replace('%','%25').replace(' ','%20'); + .replace(/["'][^"]*['"]/g, function(c) { + return c.replace(/%/g,'%25').replace(/ /g,'%20'); }) .trim() .split(/\s+/g) .map(function(c) { - return c.replace('%20',' ').replace('%25','%').replace(/"/g,''); + return c.replace(/%20/g,' ').replace(/%25/g,'%').replace(/["']/g,''); }); }) .filter(function(d) { return d.length }) From b41c78206d8663b7f4b7abee9a5d4a04124a10e4 Mon Sep 17 00:00:00 2001 From: Weirong Xu Date: Wed, 20 Sep 2017 22:19:50 +0800 Subject: [PATCH 5/8] fix single quotes match --- js/ctrls/modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ctrls/modal.js b/js/ctrls/modal.js index 85b30fd..55d9c6d 100644 --- a/js/ctrls/modal.js +++ b/js/ctrls/modal.js @@ -81,7 +81,7 @@ angular .chain(this.uris.trim().split(/\r?\n/g)) .map(function(d) { return _(d) - .replace(/["'][^"]*['"]/g, function(c) { + .replace(/["'][^"']*["']/g, function(c) { return c.replace(/%/g,'%25').replace(/ /g,'%20'); }) .trim() From 1f9d05519e42b73fc574120a47dfacff64de460c Mon Sep 17 00:00:00 2001 From: antiwinter Date: Fri, 29 Sep 2017 16:54:50 +0800 Subject: [PATCH 6/8] 1. fix the repeatedly alerts when the token or URL is incorrect 2. fix a bug that update will not be called immediately after new configurations set --- js/services/rpc/rpc.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/services/rpc/rpc.js b/js/services/rpc/rpc.js index 8b57c3b..9cba9c5 100644 --- a/js/services/rpc/rpc.js +++ b/js/services/rpc/rpc.js @@ -107,7 +107,7 @@ function(syscall, globalTimeout, alerts, utils, rootScope, uri, authconf, filter alerts.addAlert('' + filter('translate')('Oh Snap!') + ' ' + filter('translate')('Could not connect to the aria2 RPC server. Will retry in 10 secs. You might want to check the connection settings by going to Settings > Connection Settings') , 'error'); - timeout = setTimeout(update, globalTimeout); +// timeout = setTimeout(update, globalTimeout); } }; @@ -189,10 +189,9 @@ function(syscall, globalTimeout, alerts, utils, rootScope, uri, authconf, filter else configurations = [conf]; - if (timeout) { + if (timeout) clearTimeout(timeout); - timeout = setTimeout(update, 0); - } + timeout = setTimeout(update, 0); }, // get current configuration being used From fd867ae2a85f5e174b036c60bd7f789902fa8360 Mon Sep 17 00:00:00 2001 From: anthonyraymond Date: Thu, 12 Oct 2017 22:09:59 +0200 Subject: [PATCH 7/8] Update to aria2 1.32 and split config and download volume --- Dockerfile.arm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Dockerfile.arm b/Dockerfile.arm index cb65e04..bc9808e 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -1,19 +1,18 @@ FROM resin/rpi-raspbian # less priviledge user, the id should map the user the downloaded files belongs to -RUN groupadd -r aria && useradd -r -g aria aria -u 1000 +RUN groupadd -r aria && useradd -m -r -g aria aria -u 1000 # webui + aria2 RUN apt-get update \ - && apt-get install -y busybox curl \ - git \ + && apt-get install -y busybox curl git \ make g++ libssl-dev nettle-dev libgmp-dev libssh2-1-dev libc-ares-dev libxml2-dev zlib1g-dev libsqlite3-dev pkg-config libxml2-dev libcppunit-dev autoconf automake autotools-dev autopoint libtool \ - && ARIA2_VERSION="1.31.0" \ + && ARIA2_VERSION="1.32.0" \ && mkdir aria_build && cd aria_build \ && curl -L https://github.com/aria2/aria2/releases/download/release-"$ARIA2_VERSION"/aria2-"$ARIA2_VERSION".tar.gz > aria2.tar.gz \ && tar -xzf aria2.tar.gz \ && cd aria2-$ARIA2_VERSION \ - && autoreconf -i && ./configure && make \ + && autoreconf -i && ./configure && make \ && mv src/aria2c /usr/bin/ \ && cd ../.. \ && rm -rf aria_build \ @@ -30,7 +29,7 @@ RUN GITHUB_REPO="https://github.com/tianon/gosu" \ && chmod +x /usr/local/bin/gosu # goland install (compile source code for ARM since no version are currently available) -RUN curl -L "https://storage.googleapis.com/golang/go1.8.linux-armv6l.tar.gz" > go.tar.gz \ +RUN curl -L "https://storage.googleapis.com/golang/go1.9.1.linux-armv6l.tar.gz" > go.tar.gz \ && tar -xzf go.tar.gz -C /usr/local \ && export GOROOT="/usr/local/go" && export GOPATH=`pwd` \ && $GOROOT/bin/go get github.com/mattn/goreman && $GOROOT/bin/go build -o /usr/local/bin/goreman github.com/mattn/goreman \ @@ -39,10 +38,12 @@ RUN curl -L "https://storage.googleapis.com/golang/go1.8.linux-armv6l.tar.gz" > && unset GOROOT && unset GOPATH # goreman setup -RUN echo "web: gosu aria /bin/busybox httpd -f -p 8080 -h /webui-aria2\nbackend: gosu aria /usr/bin/aria2c --conf-path=/data/.aria2/aria2.conf" /data/downloads/*.torrent > Procfile +RUN echo "web: gosu aria /bin/busybox httpd -f -p 8080 -h /webui-aria2\nbackend: gosu aria /usr/bin/aria2c --conf-path=/home/aria/.aria2/aria2.conf" /data/downloads/*.torrent > Procfile # aria2 downloads directory -VOLUME /data +VOLUME /data/downloads +# aria2 conf directory +VOLUME /home/aria/.aria2 # aria2 RPC port, map as-is or reconfigure webui EXPOSE 6800/tcp From ef8ded9ffdccf2b0bcb186fc8e492c14c7c73c3e Mon Sep 17 00:00:00 2001 From: anthonyraymond Date: Thu, 12 Oct 2017 23:38:46 +0200 Subject: [PATCH 8/8] Fix Dockerfile and update readme --- Dockerfile.arm | 2 +- README.md | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Dockerfile.arm b/Dockerfile.arm index bc9808e..2907a7c 100644 --- a/Dockerfile.arm +++ b/Dockerfile.arm @@ -38,7 +38,7 @@ RUN curl -L "https://storage.googleapis.com/golang/go1.9.1.linux-armv6l.tar.gz" && unset GOROOT && unset GOPATH # goreman setup -RUN echo "web: gosu aria /bin/busybox httpd -f -p 8080 -h /webui-aria2\nbackend: gosu aria /usr/bin/aria2c --conf-path=/home/aria/.aria2/aria2.conf" /data/downloads/*.torrent > Procfile +RUN echo "web: gosu aria /bin/busybox httpd -f -p 8080 -h /webui-aria2\nbackend: gosu aria /usr/bin/aria2c --conf-path=/home/aria/.aria2/aria2.conf /data/downloads/*.torrent" > Procfile # aria2 downloads directory VOLUME /data/downloads diff --git a/README.md b/README.md index a160020..e3e1cb0 100644 --- a/README.md +++ b/README.md @@ -68,17 +68,22 @@ Build it (may take several hours due to the aria2 compilation process. Don't pan docker build -f Dockerfile.arm -t yourname/webui-aria2 . ``` Prepare the host volume: -This image required few file to be mounted in the container's `/data` folder. +This image required few file to be mounted in the container. ``` -.aria2/session.txt (empty file) -.aria2/aria2.log (empty file) -.aria2/aria2.conf (aria2 configuration file, not webui-aria2 conf) must contains at least `enable-rpc=true` and `rpc-listen-all=true` -./downloads/ (where the downloaded files goes) +/home/aria/aria2/session.txt (empty file) +/home/aria/aria2/aria2.log (empty file) +/home/aria/aria2/aria2.conf (aria2 configuration file, not webui-aria2 conf) must contains at least `enable-rpc=true` and `rpc-listen-all=true` +/data/downloads/ (where the downloaded files goes) ``` Run it ``` -docker run --restart=always -d -v /home//data/aria2:/data -p 6800:6800 -p 9100:8080 --name="webui-aria2" yourname/webui-aria2 +docker run --restart=always \ + -v /home//data/aria2/downloads:/data/downloads \ + -v /home//data/aria2/.aria2:/home/aria/.aria2 \ + -p 6800:6800 -p 9100:8080 \ + --name="webui-aria2" \ + -d yourname/webui-aria2 ``` Support