i2p and tor proxy

master
lza_menace 5 days ago
parent 254ac3d740
commit 4480f83e74

@ -1,5 +1,3 @@
version: "3.7"
volumes:
grafana:
prometheus:
@ -11,20 +9,32 @@ x-log-config: &log-config
max-size: "50m"
max-file: "20"
networks:
tor_net:
ipam:
driver: default
config:
- subnet: "172.31.255.0/24"
services:
prometheus:
image: prom/prometheus:v2.36.0
image: prom/prometheus:${PROM_TAG:-v2.36.0}
command:
- --config.file=/etc/prometheus/config.yaml
- --storage.tsdb.path=/prometheus
- --storage.tsdb.retention.time=360d
- --storage.tsdb.retention.time=${PROM_RETENTION:-360d}
container_name: wownerod_prometheus
restart: unless-stopped
depends_on:
exporter:
condition: service_started
# ports:
# - 127.0.0.1:9090:9090
volumes:
- prometheus:/prometheus
- ./files/prometheus/config.yaml:/etc/prometheus/config.yaml:ro
networks:
- tor_net
<<: *log-config
grafana:
user: "1000"
@ -32,7 +42,7 @@ services:
- -config=/etc/grafana/grafana.ini
container_name: wownerod_grafana
restart: unless-stopped
image: grafana/grafana:10.1.4
image: grafana/grafana:${GRAFANA_TAG:-10.1.4}
ports:
- 127.0.0.1:${GRAF_PORT:-3000}:3000
volumes:
@ -53,41 +63,96 @@ services:
GF_AUTH_DISABLE_LOGIN_FORM: "${GF_AUTH_DISABLE_LOGIN_FORM:-true}"
GF_SECURITY_ADMIN_PASSWORD: "${GF_SECURITY_ADMIN_PASSWORD}"
GF_SECURITY_ADMIN_USER: "${GF_SECURITY_ADMIN_USER}"
networks:
- tor_net
<<: *log-config
exporter:
command:
- --monero-addr=http://wownerod:34570
container_name: wownerod_exporter
build:
context: .
dockerfile: dockerfiles/exporter
restart: unless-stopped
depends_on:
wownerod:
condition: service_started
# ports:
# - 127.0.0.1:9000:9000
build:
context: dockerfiles
dockerfile: exporter
command:
- --monero-addr=http://wownerod:34570
networks:
- tor_net
<<: *log-config
nodemapper:
container_name: wownerod_nodemapper
restart: unless-stopped
build:
context: dockerfiles
dockerfile: nodemapper
context: .
dockerfile: dockerfiles/nodemapper
depends_on:
wownerod:
condition: service_started
environment:
NODE_HOST: wownerod
NODE_PORT: 34570
# ports:
# - 127.0.0.1:${MAPPER_PORT:-5000}:5000
networks:
- tor_net
<<: *log-config
tor:
container_name: wownerod_tor
build:
context: .
dockerfile: dockerfiles/tor
restart: unless-stopped
# ports:
# - 127.0.0.1:9050:9050
networks:
tor_net:
ipv4_address: 172.31.255.250
<<: *log-config
i2p:
container_name: wownerod_i2p
build:
context: .
dockerfile: dockerfiles/i2p
restart: unless-stopped
# ports:
# - 127.0.0.1:4447:4447
# - 127.0.0.1:4444:4444
networks:
tor_net:
ipv4_address: 172.31.255.251
<<: *log-config
wownerod:
container_name: wownerod_daemon
build:
context: dockerfiles
dockerfile: wownerod
context: .
dockerfile: dockerfiles/wownerod
restart: unless-stopped
volumes:
- ${DATA_PATH:-./data}:/data
command:
wownerod --data-dir=/data --rpc-bind-ip=0.0.0.0 --rpc-restricted-bind-ip=0.0.0.0 --confirm-external-bind --non-interactive --public-node --rpc-restricted-bind-port=34568 --rpc-bind-port=34570 --log-level=0 --enforce-dns-checkpointing --add-priority-node 143.198.195.132:34567 --add-priority-node 134.122.53.193:34567 --add-priority-node 204.48.28.218:34567
ports:
- 0.0.0.0:34567:34567
- 0.0.0.0:34568:34568
- 127.0.0.1:34570:34570
command:
- wownerod
- --data-dir=/data
- --p2p-bind-ip=0.0.0.0
- --rpc-restricted-bind-ip=0.0.0.0
- --rpc-restricted-bind-port=34568
- --zmq-rpc-bind-ip=0.0.0.0
- --rpc-bind-ip=0.0.0.0
- --rpc-bind-port=34570
- --non-interactive
- --confirm-external-bind
- --public-node
- --log-level=0
- --rpc-ssl=disabled
- --proxy=172.31.255.250:9050
- --tx-proxy=tor,172.31.255.250:9050,disable_noise,24
- --tx-proxy=i2p,172.31.255.251:4447,disable_noise,24
networks:
- tor_net
<<: *log-config

@ -0,0 +1,29 @@
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install wget sudo -y
RUN wget https://github.com/PurpleI2P/i2pd/releases/download/2.54.0/i2pd_2.54.0-1jammy1_amd64.deb -O i2pd.deb -q
RUN apt install ./i2pd.deb -y
RUN rm -rf i2p.deb && \
apt clean all && \
apt autoremove -y
RUN adduser \
--system \
--shell /bin/bash \
--gecos 'i2p' \
--group \
--disabled-password \
--home /home/i2p \
--uid 1000 \
i2p
COPY dockerfiles/i2p-config /i2p-config
USER i2p
EXPOSE 4447
ENTRYPOINT ["i2pd", "--conf", "/i2p-config"]

@ -0,0 +1,15 @@
datadir = /var/lib/i2pd
log = false
loglevel = none
ipv6 = false
bandwidth = 2048
[socksproxy]
enabled = true
address = 0.0.0.0
port = 4447
[httpproxy]
enabled = true
address = 0.0.0.0
port = 4444

@ -8,6 +8,6 @@ RUN .venv/bin/pip install flask==3.0.0
RUN .venv/bin/pip install geoip2==4.7.0
RUN wget https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-City.mmdb -qO ./geoip.mmdb
COPY nodemapper.py app.py
COPY dockerfiles/nodemapper.py app.py
ENTRYPOINT [ ".venv/bin/flask", "--app", "app", "run", "--host", "0.0.0.0" ]

@ -0,0 +1,15 @@
FROM ubuntu:22.04
RUN apt-get update && apt-get install tor -y
RUN mkdir -p /run/tor \
&& chown -R debian-tor:debian-tor /run/tor \
&& chmod 700 -R /run/tor
COPY dockerfiles/tor-config /etc/tor/torrc
USER debian-tor
EXPOSE 9050
ENTRYPOINT ["tor"]

@ -0,0 +1,7 @@
DataDirectory /var/lib/tor
ExitPolicy reject6 *:*, reject *:*
ExitRelay 0
IPv6Exit 0
Log notice stdout
PublishServerDescriptor 0
SOCKSPort 0.0.0.0:9050
Loading…
Cancel
Save