Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.5.10 #49

Merged
merged 2 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
Loading