changed aniworld to use wireguard
This commit is contained in:
parent
552c51ebb8
commit
5a49e922f0
@ -1,24 +1,13 @@
|
|||||||
FROM alpine:3.20 AS base
|
FROM alpine:3.20 AS base
|
||||||
|
|
||||||
ARG PROXY_SERVER
|
|
||||||
ARG PROXY_PORT
|
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
python3 \
|
python3
|
||||||
iptables
|
|
||||||
|
|
||||||
ADD https://github.com/semigodking/redsocks/releases/download/release-0.71/redsocks2-x86_64-release-0.71 /bin/redsocks2
|
|
||||||
RUN chmod +x /bin/redsocks2
|
|
||||||
|
|
||||||
COPY redsocks.conf /etc/redsocks.conf
|
|
||||||
RUN sed -i "s/vPROXY-SERVER/${PROXY_SERVER}/g" /etc/redsocks.conf && \
|
|
||||||
sed -i "s/vPROXY-PORT/${PROXY_PORT}/g" /etc/redsocks.conf
|
|
||||||
|
|
||||||
RUN mkdir -p /services /var/aniworld
|
RUN mkdir services
|
||||||
WORKDIR /services
|
RUN python3 -m venv services/aniworlddownloader_venv && \
|
||||||
|
services/aniworlddownloader_venv/bin/pip install --no-cache-dir aniworld
|
||||||
RUN python3 -m venv aniworlddownloader_venv && \
|
|
||||||
aniworlddownloader_venv/bin/pip install --no-cache-dir aniworld
|
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|||||||
25
aniworld/Dockerfile.i2p
Normal file
25
aniworld/Dockerfile.i2p
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
FROM alpine:3.20 AS base
|
||||||
|
|
||||||
|
ARG PROXY_SERVER
|
||||||
|
ARG PROXY_PORT
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
python3 \
|
||||||
|
iptables
|
||||||
|
|
||||||
|
ADD https://github.com/semigodking/redsocks/releases/download/release-0.71/redsocks2-x86_64-release-0.71 /bin/redsocks2
|
||||||
|
RUN chmod +x /bin/redsocks2
|
||||||
|
|
||||||
|
COPY redsocks.conf /etc/redsocks.conf
|
||||||
|
RUN sed -i "s/vPROXY-SERVER/${PROXY_SERVER}/g" /etc/redsocks.conf && \
|
||||||
|
sed -i "s/vPROXY-PORT/${PROXY_PORT}/g" /etc/redsocks.conf
|
||||||
|
|
||||||
|
RUN mkdir -p /services /var/aniworld
|
||||||
|
WORKDIR /services
|
||||||
|
|
||||||
|
RUN python3 -m venv aniworlddownloader_venv && \
|
||||||
|
aniworlddownloader_venv/bin/pip install --no-cache-dir aniworld
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
COPY entrypoint.sh.i2p /entrypoint.sh
|
||||||
|
ENTRYPOINT ["sh", "/entrypoint.sh"]
|
||||||
@ -1,8 +1,6 @@
|
|||||||
#!/usr/share/env bash
|
#!/usr/share/env bash
|
||||||
iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-port 12345
|
|
||||||
iptables -t nat -A OUTPUT -p tcp --dport 443 -j REDIRECT --to-port 12345
|
|
||||||
|
|
||||||
redsocks2 -c /etc/redsocks.conf
|
|
||||||
/services/aniworlddownloader_venv/bin//aniworld --web-ui --no-browser --web-expose --web-port 3000 --output-dir /var/aniworld/downloads &
|
/services/aniworlddownloader_venv/bin/aniworld --web-ui --no-browser --web-expose --web-port 3000 --output-dir /var/aniworld/downloads &
|
||||||
|
|
||||||
while true; do sleep 1000; done
|
while true; do sleep 1000; done
|
||||||
8
aniworld/entrypoint.sh.i2p
Executable file
8
aniworld/entrypoint.sh.i2p
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/share/env bash
|
||||||
|
iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-port 12345
|
||||||
|
iptables -t nat -A OUTPUT -p tcp --dport 443 -j REDIRECT --to-port 12345
|
||||||
|
|
||||||
|
redsocks2 -c /etc/redsocks.conf
|
||||||
|
/services/aniworlddownloader_venv/bin//aniworld --web-ui --no-browser --web-expose --web-port 3000 --output-dir /var/aniworld/downloads &
|
||||||
|
|
||||||
|
while true; do sleep 1000; done
|
||||||
15
aniworld/wg0.conf
Normal file
15
aniworld/wg0.conf
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[Interface]
|
||||||
|
# Key for proxmoxADS
|
||||||
|
# Bouncing = 2
|
||||||
|
# NAT-PMP (Port Forwarding) = off
|
||||||
|
# VPN Accelerator = on
|
||||||
|
# Table = off
|
||||||
|
PrivateKey = uPGxlIrs0+erepQsbnkld/aBde7qd7HwwsMrGaNtGUg=
|
||||||
|
Address = 10.2.0.2/32
|
||||||
|
DNS = 10.2.0.1
|
||||||
|
|
||||||
|
[Peer]
|
||||||
|
# NL-FREE#136
|
||||||
|
PublicKey = 8xx8LqTpTHCEWou3Wu43p2CaEqnO9kcKQrLb+C8fZw8=
|
||||||
|
AllowedIPs = 0.0.0.0/0, ::/0
|
||||||
|
Endpoint = 169.150.218.70:51820
|
||||||
54
compose.yml
54
compose.yml
@ -1,25 +1,28 @@
|
|||||||
services:
|
version: "3.8"
|
||||||
aniworld:
|
|
||||||
build:
|
|
||||||
context: aniworld
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
target: base
|
|
||||||
args:
|
|
||||||
- "PROXY_SERVER=i2pendpoint.arpa"
|
|
||||||
- "PROXY_PORT=4444"
|
|
||||||
pull_policy: build
|
|
||||||
user: "0:0"
|
|
||||||
image: katzenkralle/aniworld_served:latest
|
|
||||||
|
|
||||||
|
|
||||||
|
configs:
|
||||||
|
wg0_conf:
|
||||||
|
file: ./aniworld/wg0.conf
|
||||||
|
|
||||||
|
services:
|
||||||
|
wireguard:
|
||||||
|
image: linuxserver/wireguard
|
||||||
|
cap_add:
|
||||||
|
- NET_ADMIN # Required for networking changes
|
||||||
|
- SYS_MODULE # Optional for WireGuard modules
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/Berlin
|
||||||
|
restart: unless-stopped
|
||||||
|
sysctls:
|
||||||
|
- net.ipv4.conf.all.src_valid_mark=1
|
||||||
|
configs:
|
||||||
|
- source: wg0_conf
|
||||||
|
target: /config/wg0.conf
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
|
|
||||||
cap_add:
|
|
||||||
- NET_ADMIN
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- data_aniworld:/var/aniworld/downloads
|
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
traefik.enable: true
|
traefik.enable: true
|
||||||
traefik.http.routers.aniworld.service: aniworld
|
traefik.http.routers.aniworld.service: aniworld
|
||||||
@ -29,6 +32,19 @@ services:
|
|||||||
traefik.http.services.aniworld.loadbalancer.server.port: 3000
|
traefik.http.services.aniworld.loadbalancer.server.port: 3000
|
||||||
traefik.http.routers.aniworld.middlewares: traefik-auth
|
traefik.http.routers.aniworld.middlewares: traefik-auth
|
||||||
|
|
||||||
|
|
||||||
|
aniworld:
|
||||||
|
build:
|
||||||
|
context: ./aniworld
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
target: base
|
||||||
|
image: katzenkralle/aniworld_served:latest
|
||||||
|
user: "0:0"
|
||||||
|
network_mode: "service:wireguard"
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- data_aniworld:/var/aniworld/downloads
|
||||||
|
|
||||||
bittorrent:
|
bittorrent:
|
||||||
image: linuxserver/qbittorrent:5.1.4
|
image: linuxserver/qbittorrent:5.1.4
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user