starting to setup i2p

i2p
lza_menace 4 years ago
parent 69262619fe
commit 67ee504e5d

@ -0,0 +1,16 @@
FROM ubuntu:20.04
RUN apt-get -y update && \
apt-get -y install \
wget unzip && \
apt-get clean
RUN useradd -m -d /home/i2pz i2pz
USER i2pz
RUN cd ~/ && \
wget https://github.com/i2p-zero/i2p-zero/releases/download/v1.18/i2p-zero-linux.v1.18.zip -O i2p-zero.zip && \
unzip i2p-zero.zip
ENTRYPOINT ["/home/i2pz/i2p-zero-linux.v1.18/router/bin/tunnel-control.sh", "socks.create", "48080"]

@ -8,3 +8,11 @@ services:
restart: unless-stopped
ports:
- 127.0.0.1:9050:9050
i2p:
container_name: i2p
build:
context: .
dockerfile: Dockerfile-i2p
restart: unless-stopped
ports:
- 127.0.0.1:4444:4444

@ -188,6 +188,12 @@ def import_():
pass
logging.info(f"{len(all_nodes)} node urls imported and ready to be validated")
@app.cli.command("i2p")
def i2p():
proxies = {"http": f"socks5h://{config.I2P_HOST}:{config.I2P_PORT}"}
r = requests.get("http://vkohxr7ealm23uacawcjpbxi3smas2wajr5ne6sgmmw42ygvjikq.b32.i2p", proxies=proxies)
print(r.content)
@app.template_filter("humanize")
def humanize(d):
t = arrow.get(d, "UTC")

@ -4,3 +4,5 @@ SECRET_KEY = os.environ.get('SECRET_KEY', 'xxxx')
DATA_DIR = os.environ.get('DATA_DIR', './data')
TOR_HOST = os.environ.get('TOR_HOST', '127.0.0.1')
TOR_PORT = os.environ.get('TOR_PORT', 9050)
I2P_HOST = os.environ.get('I2P_HOST', '127.0.0.1')
I2P_PORT = os.environ.get('I2P_PORT', 4444)

Loading…
Cancel
Save