From c91714660fe8815125ed586ae58533f08e178159 Mon Sep 17 00:00:00 2001 From: kev Date: Mon, 10 Jun 2019 07:24:36 +0800 Subject: [PATCH] add i2pd --- README.md | 1 + i2pd/Dockerfile | 36 +++++++++++++++++++++++++ i2pd/README.md | 38 +++++++++++++++++++++++++++ i2pd/arm/Dockerfile | 36 +++++++++++++++++++++++++ i2pd/arm/docker-compose.yml | 10 +++++++ i2pd/data/i2pd.conf | 28 ++++++++++++++++++++ i2pd/data/tunnels.conf.d/website.conf | 12 +++++++++ i2pd/docker-compose.yml | 10 +++++++ 8 files changed, 171 insertions(+) create mode 100644 i2pd/Dockerfile create mode 100644 i2pd/README.md create mode 100644 i2pd/arm/Dockerfile create mode 100644 i2pd/arm/docker-compose.yml create mode 100644 i2pd/data/i2pd.conf create mode 100644 i2pd/data/tunnels.conf.d/website.conf create mode 100644 i2pd/docker-compose.yml diff --git a/README.md b/README.md index 53ac482..5c0aec5 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,7 @@ A collection of delicious docker recipes. - [x] fteproxy-arm :+1: - [x] hans - [x] haproxy-arm +- [x] i2pd :ru: - [x] kcptun :cn: - [x] mtproxy - [x] mysql-proxy diff --git a/i2pd/Dockerfile b/i2pd/Dockerfile new file mode 100644 index 0000000..1370199 --- /dev/null +++ b/i2pd/Dockerfile @@ -0,0 +1,36 @@ +# +# Dockerfile for i2pd +# + +FROM debian:stretch +MAINTAINER EasyPi Software Foundation + +ENV I2PD_VERSION=2.26.0 +ENV I2PD_ARCH=amd64 +ENV I2PD_DIST=stretch +ENV I2PD_URL=https://github.com/PurpleI2P/i2pd/releases/download/${I2PD_VERSION}/i2pd_${I2PD_VERSION}-1${I2PD_DIST}1_${I2PD_ARCH}.deb + +RUN set -ex \ + && apt-get update \ + && apt-get install -y wget \ + && { \ + wget ${I2PD_URL} -O i2pd.deb; \ + dpkg -i i2pd.deb; \ + apt-get -f install -y; \ + sed -i '/^address =/s/127.0.0.1/0.0.0.0/' /etc/i2pd/i2pd.conf; \ + rm i2pd.deb; \ + } \ + && apt-get remove -y wget \ + && rm -rf /var/lib/apt/lists/* + +VOLUME /etc/i2pd /var/lib/i2pd + +EXPOSE 4444 4447 7070 + +ENTRYPOINT ["i2pd"] +CMD [ \ + "--conf=/etc/i2pd/i2pd.conf", \ + "--tunconf=/etc/i2pd/tunnels.conf", \ + "--tunnelsdir=/etc/i2pd/tunnels.conf.d", \ + "--service" \ + ] diff --git a/i2pd/README.md b/i2pd/README.md new file mode 100644 index 0000000..8b34314 --- /dev/null +++ b/i2pd/README.md @@ -0,0 +1,38 @@ +i2pd +==== + +[i2pd][1] (I2P Daemon) is a full-featured C++ implementation of I2P client. + +## docker-compose.yml + +```yaml +i2pd: + image: vimagick/i2pd + ports: + - "4444:4444" + - "4447:4447" + - "7070:7070" + volumes: + - ./data/i2pd.conf:/etc/i2pd/i2pd.conf + - ./data/tunnels.conf.d:/etc/i2pd/tunnels.conf.d + restart: unless-stopped +``` + +## Server + +``` +$ docker-compose up -d +``` + +## Client + +Download [FoxyProxy][2] for Firefox. + +## Example Sites + +http://planet.i2p/ +http://identiguy.i2p +http://tracker2.postman.i2p + +[1]: https://github.com/PurpleI2P/i2pd +[2]: https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-standard/ diff --git a/i2pd/arm/Dockerfile b/i2pd/arm/Dockerfile new file mode 100644 index 0000000..666343d --- /dev/null +++ b/i2pd/arm/Dockerfile @@ -0,0 +1,36 @@ +# +# Dockerfile for i2pd-arm +# + +FROM arm32v7/debian:stretch +MAINTAINER EasyPi Software Foundation + +ENV I2PD_VERSION=2.26.0 +ENV I2PD_ARCH=armhf +ENV I2PD_DIST=stretch +ENV I2PD_URL=https://github.com/PurpleI2P/i2pd/releases/download/${I2PD_VERSION}/i2pd_${I2PD_VERSION}-1${I2PD_DIST}1_${I2PD_ARCH}.deb + +RUN set -ex \ + && apt-get update \ + && apt-get install -y wget \ + && { \ + wget ${I2PD_URL} -O i2pd.deb; \ + dpkg -i i2pd.deb; \ + apt-get -f install -y; \ + sed -i '/^address =/s/127.0.0.1/0.0.0.0/' /etc/i2pd/i2pd.conf; \ + rm i2pd.deb; \ + } \ + && apt-get remove -y wget \ + && rm -rf /var/lib/apt/lists/* + +VOLUME /etc/i2pd /var/lib/i2pd + +EXPOSE 4444 4447 7070 + +ENTRYPOINT ["i2pd"] +CMD [ \ + "--conf=/etc/i2pd/i2pd.conf", \ + "--tunconf=/etc/i2pd/tunnels.conf", \ + "--tunnelsdir=/etc/i2pd/tunnels.conf.d", \ + "--service" \ + ] diff --git a/i2pd/arm/docker-compose.yml b/i2pd/arm/docker-compose.yml new file mode 100644 index 0000000..94da3d8 --- /dev/null +++ b/i2pd/arm/docker-compose.yml @@ -0,0 +1,10 @@ +i2pd: + image: easypi/i2pd-arm + ports: + - "4444:4444" + - "4447:4447" + - "7070:7070" + volumes: + - ./data/i2pd.conf:/etc/i2pd/i2pd.conf + - ./data/tunnels.conf.d:/etc/i2pd/tunnels.conf.d + restart: unless-stopped diff --git a/i2pd/data/i2pd.conf b/i2pd/data/i2pd.conf new file mode 100644 index 0000000..a25c2ef --- /dev/null +++ b/i2pd/data/i2pd.conf @@ -0,0 +1,28 @@ +## Configuration file for a typical i2pd user +## See https://i2pd.readthedocs.io/en/latest/user-guide/configuration/ +## for more options you can use in this file. +## +## Sample: https://github.com/PurpleI2P/i2pd/blob/openssl/contrib/i2pd.conf +## + +ipv4 = true +ipv6 = false + +[http] +strictheaders = false +address = 0.0.0.0 +port = 7070 + +[httpproxy] +address = 0.0.0.0 +port = 4444 + +[socksproxy] +address = 0.0.0.0 +port = 4447 + +[sam] +enabled = true + +[reseed] +verify = true diff --git a/i2pd/data/tunnels.conf.d/website.conf b/i2pd/data/tunnels.conf.d/website.conf new file mode 100644 index 0000000..db9490d --- /dev/null +++ b/i2pd/data/tunnels.conf.d/website.conf @@ -0,0 +1,12 @@ +# You can find examples in /usr/share/doc/i2pd/tunnels.d directory +# Document: https://github.com/PurpleI2P/i2pd/wiki/tunnels.conf + +[website] +type = http +host = 192.168.1.1 +port = 80 +inbound.length = 1 +inbound.quantity = 5 +outbound.length = 1 +outbound.quantity = 5 +keys = website.dat diff --git a/i2pd/docker-compose.yml b/i2pd/docker-compose.yml new file mode 100644 index 0000000..094f84b --- /dev/null +++ b/i2pd/docker-compose.yml @@ -0,0 +1,10 @@ +i2pd: + image: vimagick/i2pd + ports: + - "4444:4444" + - "4447:4447" + - "7070:7070" + volumes: + - ./data/i2pd.conf:/etc/i2pd/i2pd.conf + - ./data/tunnels.conf.d:/etc/i2pd/tunnels.conf.d + restart: unless-stopped