diff options
-rw-r--r-- | net-misc/i2pd/files/99i2pd | 1 | ||||
-rw-r--r-- | net-misc/i2pd/files/i2pd.1 | 101 | ||||
-rw-r--r-- | net-misc/i2pd/files/i2pd.conf | 4 | ||||
-rw-r--r-- | net-misc/i2pd/files/i2pd.confd | 6 | ||||
-rw-r--r-- | net-misc/i2pd/files/i2pd.initd | 24 | ||||
-rw-r--r-- | net-misc/i2pd/files/i2pd.logrotate | 14 | ||||
-rw-r--r-- | net-misc/i2pd/files/i2pd.service | 18 | ||||
-rw-r--r-- | net-misc/i2pd/i2pd-scm.ebuild | 76 | ||||
-rw-r--r-- | net-misc/i2pd/metadata.xml | 12 |
9 files changed, 256 insertions, 0 deletions
diff --git a/net-misc/i2pd/files/99i2pd b/net-misc/i2pd/files/99i2pd new file mode 100644 index 0000000..3cf3b46 --- /dev/null +++ b/net-misc/i2pd/files/99i2pd @@ -0,0 +1 @@ +CONFIG_PROTECT="/var/lib/i2pd/certificates" diff --git a/net-misc/i2pd/files/i2pd.1 b/net-misc/i2pd/files/i2pd.1 new file mode 100644 index 0000000..4dc6958 --- /dev/null +++ b/net-misc/i2pd/files/i2pd.1 @@ -0,0 +1,101 @@ +.TH I2PD "1" "November 29, 2014" + +.SH NAME +i2pd \- Load-balanced unspoofable packet switching network + +.SH SYNOPSIS +.B i2pd +[\fIOPTION1\fR) [\fIOPTION2\fR]... + +.SH DESCRIPTION +i2pd +is a C++ implementation of the router for the I2P anonymizing network, offering +a simple layer that identity-sensitive applications can use to securely +communicate. All data is wrapped with several layers of encryption, and the +network is both distributed and dynamic, with no trusted parties. + +.PP +Any of the configuration options below can be used in the \fI2PDOPTIONS\fR variable in \fI/etc/conf.d/i2pd\fR. +.BR +.TP +\fB\-\-host=\fR +The external IP +.TP +\fB\-\-port=\fR +The external port to listen on +.TP +\fB\-\-httpport=\fR +The HTTP port to listen on +.TP +\fB\-\-log=\fR[\fI1\fR|\fI0\fR] +.br +Enable of disable logging to a file. \fI1\fR for yes, \fI0\fR for no. (default: \fI0\fR, off) +.TP +\fB\-\-daemon=\fR[\fI1\fR|\fI0\fR] +Enable or disable daemon mode. Daemon mode is enabled with \fI1\fR and disabled with \fI0\fR. (default: \fI0\fR, off) +.TP +\fB\-\-service=\fR[\fI1\fR|\fI0\fR] +If enabled, system folders (\fB/var/run/i2pd.pid\fR, \fB/var/log/i2pd.log\fR, \fB/var/lib/i2pd\fR) will be used. If off, \fB$HOME/.i2pd\fR will be used instead. (default: \fI0\fR, off). +.TP +\fB\-\-unreachable=\fR[\fI1\fR|\fI0\fR] +\fI1\fR if router is declared as unreachable and works through introducers. (default: \fI0\fR, off) +.TP +\fB\-\-v6=\fR[\fI1\fR|\fI0\fR] +\fI1\fR if \fBi2pd\fR should communicate via IPv6. (default: \fI0\fR, off) +.TP +\fB\-\-httpproxyport=\fR +The local port for the HTTP Proxy to listen on (default: \fI4446\fR) +.TP +\fB\-\-socksproxyport=\fR +The local port for the SOCKS proxy to listen on (default: \fI4447\fR) +.TP +\fB\-\-ircport=\fR +The local port of IRC tunnel to listen on. (default: \fI6668\fR) +.TP +\fB\-\-ircdest=\fR +I2P destination address of an IRC server to connect to, e.g. \fIirc.postman.i2p\fR +.TP +\fB\-\-irckeys=\fR +optional keys file for local destination +.TP +\fB\-\-eepkeys=\fR +File name containing destination keys. For example \fIprivKeys.dat\fR +.TP +\fB\-\-eephost=\fR +Address incoming trafic is forwarded to, \fI127.0.0.1\fR by default +.TP +\fB\-\-eepport=\fR +Port incoming trafic forward to. \fI80\fR by default +.TP +\fB\-\-samport=\fR +Port of SAM bridge. Usually \fI7656\fR. SAM will not be enabled if this is not set. (default: unset) +.TP +\fB\-\-bobport=\fR +Port of BOB command channel. Usually \fI2827\fR. BOB will not be enabled if this is not set. (default: unset) + +.SH FILES +.PP +/etc/conf.d/i2pd +.RS 4 +i2pd service configuration file +.RE +.PP +/etc/i2pd.conf +.RS 4 +i2pd configuration file (when running as a system service). You may override the parameters here. +.RE +.PP +/var/lib/i2pd/ +.RS 4 +i2pd profile directory (when running as a system service, see \fB\-\-service=\fR above) +.RE +.PP +$HOME/.i2pd +.RS 4 +i2pd profile directory (when running as a normal user) +.SH AUTHOR +This manual page was written by kytv <killyourtv@i2pmail.org> for the Debian system (but may be used by others). And adapted by Francisco Blas Izquierdo Riera (klondike) <klondike@gentoo.org> to Gentoo. +.BR +Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation +.BR +On Gentoo systems, the complete text of the GNU General Public License Version 2 can be found in /usr/portage/licenses/GPL-2 diff --git a/net-misc/i2pd/files/i2pd.conf b/net-misc/i2pd/files/i2pd.conf new file mode 100644 index 0000000..10675e6 --- /dev/null +++ b/net-misc/i2pd/files/i2pd.conf @@ -0,0 +1,4 @@ +log = 1 +daemon = 1 +service = 1 + diff --git a/net-misc/i2pd/files/i2pd.confd b/net-misc/i2pd/files/i2pd.confd new file mode 100644 index 0000000..7913af7 --- /dev/null +++ b/net-misc/i2pd/files/i2pd.confd @@ -0,0 +1,6 @@ +I2PD_USER="${I2PD_USER:-i2pd}" +I2PD_GROUP="${I2PD_GROUP:-i2pd}" +I2PD_LOG="/var/log/i2pd.log" +I2PD_PID="/var/run/i2pd.pid" +# Options to i2pd +I2PDOPTIONS="--conf=/etc/i2pd.conf" diff --git a/net-misc/i2pd/files/i2pd.initd b/net-misc/i2pd/files/i2pd.initd new file mode 100644 index 0000000..cc3d234 --- /dev/null +++ b/net-misc/i2pd/files/i2pd.initd @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +description="C++ daemon for accessing the I2P network" + +depend() { + use dns logger netmount +} + +start() { + ebegin "Starting ${SVCNAME}" + checkpath -f "${I2PD_LOG}" -o "${I2PD_USER}:${I2PD_GROUP}" + checkpath -f "${I2PD_PID}" -o "${I2PD_USER}:${I2PD_GROUP}" + start-stop-daemon -S -b -u "${I2PD_USER}:${I2PD_GROUP}" /usr/bin/i2pd -- ${I2PDOPTIONS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon -K -p "${I2PD_PID}" + eend $? +} diff --git a/net-misc/i2pd/files/i2pd.logrotate b/net-misc/i2pd/files/i2pd.logrotate new file mode 100644 index 0000000..790cd2a --- /dev/null +++ b/net-misc/i2pd/files/i2pd.logrotate @@ -0,0 +1,14 @@ +/var/log/i2pd.log { + rotate 4 + weekly + missingok + notifempty + compress + delaycompress + copytruncate + create 640 i2pd i2pd + postrotate + /etc/init.d/i2pd restart >/dev/null + endscript +} + diff --git a/net-misc/i2pd/files/i2pd.service b/net-misc/i2pd/files/i2pd.service new file mode 100644 index 0000000..7f44cde --- /dev/null +++ b/net-misc/i2pd/files/i2pd.service @@ -0,0 +1,18 @@ +[Unit] +Description=C++ daemon for accessing the I2P network +After=network.target + +[Service] +Type=forking +Restart=on-abnormal +PIDFile=/var/run/i2pd.pid +User=i2pd +Group=i2pd +PermissionsStartOnly=yes +ExecStartPre=/bin/touch /var/run/i2pd.pid /var/log/i2pd.log +ExecStartPre=/bin/chown i2pd:i2pd /run/i2pd.pid /var/log/i2pd.log +ExecStart=/usr/lib/i2pd/i2p --conf=/etc/i2pd.conf + +[Install] +WantedBy=multi-user.target + diff --git a/net-misc/i2pd/i2pd-scm.ebuild b/net-misc/i2pd/i2pd-scm.ebuild new file mode 100644 index 0000000..704489b --- /dev/null +++ b/net-misc/i2pd/i2pd-scm.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils systemd user git-2 cmake-multilib + +DESCRIPTION="A C++ daemon for accessing the I2P anonymous network" +HOMEPAGE="https://github.com/PrivacySolutions/i2pd" +SRC_URI="" +EGIT_REPO_URI="git://github.com/PrivacySolutions/i2pd" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="cpu_flags_x86_aes i2p-hardening static" + +RDEPEND="!static? ( >=dev-libs/boost-1.46[threads] ) + !static? ( dev-libs/crypto++ ) + >=dev-libs/boost-1.46[threads,${MULTILIB_USEDEP}] + dev-libs/crypto++[${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND} + static? ( >=dev-libs/boost-1.46[static-libs,threads] ) + static? ( dev-libs/crypto++[static-libs] ) + >=dev-util/cmake-2.8.5 + i2p-hardening? ( >=sys-devel/gcc-4.6 ) + || ( >=sys-devel/gcc-4.6 >=sys-devel/clang-3.3 )" + +I2PD_USER="${I2PD_USER:-i2pd}" +I2PD_GROUP="${I2PD_GROUP:-i2pd}" + +#CMAKE_USE_DIR="${S}/build" + +multilib_src_configure() { + mycmakeargs=( + $(cmake-utils_use_with cpu_flags_x86_aes AESNI) + $(cmake-utils_use_with i2p-hardening HARDENING) + -DWITH_LIBRARY=ON + $(cmake-utils_use_with static STATIC) + $(multilib_is_native_abi && echo -DWITH_BINARY=ON \ + || echo -DWITH_BINARY=OFF) + ) + (multilib_is_native_abi) && cmake-utils_src_configure +} + +multilib_src_compile() { + (multilib_is_native_abi) && cmake-utils_src_compile +} + +multilib_src_install() { + (multilib_is_native_abi) && cmake-utils_src_install +} + +multilib_src_install_all() { + dodoc README.md + doman "${FILESDIR}/${PN}.1" + keepdir /var/lib/i2pd/ + fowners "${I2PD_USER}:${I2PD_GROUP}" /var/lib/i2pd/ + fperms 700 /var/lib/i2pd/ + insinto /etc/ + doins "${FILESDIR}/${PN}.conf" + fowners "${I2PD_USER}:${I2PD_GROUP}" "/etc/${PN}.conf" + fperms 600 "/etc/${PN}.conf" + dodir /usr/share/i2pd + cp -R "${S}/contrib/certificates" "${D}/var/lib/i2pd" || die "Install failed!" + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + systemd_dounit "${FILESDIR}/${PN}.service" + doenvd "${FILESDIR}/99${PN}" + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotate" "${PN}" +} + +pkg_setup() { + enewgroup "${I2PD_GROUP}" + enewuser "${I2PD_USER}" -1 -1 "/var/lib/run/${PN}" "${I2PD_GROUP}" +} diff --git a/net-misc/i2pd/metadata.xml b/net-misc/i2pd/metadata.xml new file mode 100644 index 0000000..dccf5a1 --- /dev/null +++ b/net-misc/i2pd/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <use> + <flag name="i2p-hardening"> + Compile with hardening on vanilla compilers/linkers + </flag> + </use> + <upstream> + <remote-id type="github">PrivacySolutions/i2pd</remote-id> + </upstream> +</pkgmetadata> |