Skip to content

Commit

Permalink
2.5.10 (#49)
Browse files Browse the repository at this point in the history
* Update tor image

* bump version
  • Loading branch information
yowmamasita authored Aug 28, 2023
1 parent 00794c3 commit 427b8db
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "debrid-media-manager",
"version": "2.5.9",
"version": "2.5.10",
"private": false,
"scripts": {
"dev": "next dev",
Expand Down
2 changes: 1 addition & 1 deletion src/services/btdigg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export async function fetchSearchResults(
}
}
} catch (e: any) {
console.warn(e);
console.warn(`cache read error:`, e.message);
}

let pageNum = 1;
Expand Down
16 changes: 11 additions & 5 deletions tor.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
FROM alpine:latest

RUN apk --no-cache --update --upgrade add tor curl grep \
RUN apk --no-cache --update --upgrade add tor curl grep netcat-openbsd \
&& mv /etc/tor/torrc.sample /etc/tor/torrc \
&& sed -i \
-e 's/#SOCKSPort 192.168.0.1:9100/SOCKSPort 0.0.0.0:9050/g' \
/etc/tor/torrc \
&& chown -R tor /var/lib/tor
&& chown -R tor /var/lib/tor \
&& echo "#!/bin/sh" > /usr/local/bin/check-and-renew.sh \
&& echo "while true; do" >> /usr/local/bin/check-and-renew.sh \
&& echo " curl -x socks5h://127.0.0.1:9050 -s http://btdigggink2pdqzqrik3blmqemsbntpzwxottujilcdjfz56jumzfsyd.onion/search?q=Kraftfahrzeughaftpflichtversicherung | grep -qm1 Histats || (echo -e 'AUTHENTICATE \"\"\\nsignal NEWNYM\\nQUIT' | nc 127.0.0.1 9051)" >> /usr/local/bin/check-and-renew.sh \
&& echo " sleep 30" >> /usr/local/bin/check-and-renew.sh \
&& echo "done" >> /usr/local/bin/check-and-renew.sh \
&& chmod +x /usr/local/bin/check-and-renew.sh

USER tor
ENTRYPOINT tor
ENTRYPOINT tor & /usr/local/bin/check-and-renew.sh

EXPOSE 9050/tcp

HEALTHCHECK --interval=10s --timeout=5s --start-period=5s --retries=1 \
CMD curl -x socks5h://127.0.0.1:9050 -s http://btdigggink2pdqzqrik3blmqemsbntpzwxottujilcdjfz56jumzfsyd.onion/search?q=Kraftfahrzeughaftpflichtversicherung | grep -qm1 Histats
HEALTHCHECK --interval=60s --timeout=15s --start-period=20s \
CMD curl -s --socks5 127.0.0.1:9050 'https://check.torproject.org/api/ip' | grep -qm1 -E '"IsTor"\s*:\s*true'

0 comments on commit 427b8db

Please sign in to comment.