diff --git a/on_host/compile.sh b/on_host/compile.sh new file mode 100644 index 0000000..6e4fc65 --- /dev/null +++ b/on_host/compile.sh @@ -0,0 +1,50 @@ +#!/bin/bash +sudo apt-get update +sudo apt-get -y upgrade +sudo apt-get install -y gcc +sudo apt-get install -y \ + git \ + make \ + cmake \ + debhelper +sudo apt-get install -y \ + libboost-date-time-dev \ + libboost-filesystem-dev \ + libboost-program-options-dev \ + libboost-system-dev \ + libssl-dev \ + zlib1g-dev +sudo apt-get install -y \ + libminiupnpc-dev +mkdir /tmp/BUILD_I2PD/ +cd /tmp/BUILD_I2PD/ +git clone --depth 1 --branch 2.52.0 https://github.com/PurpleI2P/i2pd.git +cd /tmp/BUILD_I2PD/i2pd/build +cmake -DCMAKE_BUILD_TYPE=Release -DWITH_AESNI=ON -DWITH_UPNP=ON . +make + +sudo apt-get install -y golang +mkdir /tmp/BUILD_YGGDRASIL/ +cd /tmp/BUILD_YGGDRASIL/ +git clone --depth 1 --branch $YGGDRASIL_VERSION https://github.com/yggdrasil-network/yggdrasil-go.git +ENV CGO_ENABLED=0 +cd /tmp/BUILD_YGGDRASIL/yggdrasil-go +sed -i -e 's/yggdrasil yggdrasilctl/yggdrasil yggdrasilctl genkeys/g' build +./build + +sudo apt-get install -y \ + libminiupnpc17 \ + git python3 python3-pip iputils-ping +mkdir /opt/I2PD/ +cd /opt/I2PD/ +cp /opt/BUILD_I2PD/i2pd/build/i2pd . +cp /opt/BUILD_I2PD/i2pd/contrib/certificates ./certificates +cp /tmp/i2pd_yggdrasil_docker/i2pd.conf . +ulimit -n 4096 + +mkdir /opt/YGGDRASIL/ +cd /opt/YGGDRASIL/ +cp /tmp/BUILD_YGGDRASIL/yggdrasil-go/yggdrasil . +cp /tmp/BUILD_YGGDRASIL/yggdrasil-go/yggdrasilctl . +cp /tmp/BUILD_YGGDRASIL/yggdrasil-go/genkeys . +cp /tmp/i2pd_yggdrasil_docker/yggdrasil.conf . diff --git a/on_host/run.sh b/on_host/run.sh new file mode 100644 index 0000000..aef1725 --- /dev/null +++ b/on_host/run.sh @@ -0,0 +1,25 @@ +#!/bin/bash +git config --global advice.detachedHead false +git clone --depth 1 --branch v0 https://github.com/oldnick85/yggdrasil_get_keys.git /tmp/yggdrasil_get_keys +python3 -m pip install -r /tmp/yggdrasil_get_keys/requirements.txt +python3 /tmp/yggdrasil_get_keys/yggdrasil_get_keys.py \ + --genkeys="/opt/YGGDRASIL/genkeys" \ + --yggdrasil-conf="/opt/YGGDRASIL/yggdrasil.conf" \ + --timeout=60 \ + --environment +rm -rf /tmp/yggdrasil_get_keys +git clone --depth 1 --branch v3 https://github.com/oldnick85/yggdrasil_find_public_peers.git /tmp/yggdrasil_find_public_peers +python3 -m pip install -r /tmp/yggdrasil_find_public_peers/requirements.txt +python3 /tmp/yggdrasil_find_public_peers/yggdrasil_find_public_peers.py \ + --yggdrasil-conf="/opt/YGGDRASIL/yggdrasil.conf" \ + --parallel=4 \ + --pings=10 \ + --best=5 \ + --ping-interval=0.5 +rm -rf yggdrasil_find_public_peers +sysctl net.ipv6.conf.all.disable_ipv6=0 || true +/opt/YGGDRASIL/yggdrasil -useconffile /opt/YGGDRASIL/yggdrasil.conf & +sleep 1m +/opt/I2PD/i2pd --datadir /opt/I2PD --conf /opt/I2PD/i2pd.conf & +wait -n +exit $? \ No newline at end of file diff --git a/src/Dockerfile b/src/Dockerfile index ab52449..b3affef 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -1,7 +1,7 @@ # syntax=docker/dockerfile:1 ARG UBUNTU_VERSION=23.10 FROM ubuntu:${UBUNTU_VERSION} AS builder_i2pd -ARG I2PD_VERSION=2.51.0 +ARG I2PD_VERSION=2.52.0 ARG I2PD_COMPILER=gcc RUN DEBIAN_FRONTEND=noninteractive\ apt-get update &&\ diff --git a/support/make_docker_image.sh b/support/make_docker_image.sh index 84ef9b3..711b298 100644 --- a/support/make_docker_image.sh +++ b/support/make_docker_image.sh @@ -2,7 +2,7 @@ TAG_VERSION=$(git describe --tags || echo "unknown") docker build --file="src/Dockerfile" \ --build-arg UBUNTU_VERSION=23.10 \ - --build-arg I2PD_VERSION=2.51.0 \ + --build-arg I2PD_VERSION=2.52.0 \ --build-arg I2PD_COMPILER=gcc \ --build-arg YGGDRASIL_VERSION=v0.5.5 \ --tag i2pd_yggdrasil:${TAG_VERSION} \