Give it a page, add the page to my site

This commit is contained in:
idk
2021-12-04 11:25:05 -05:00
parent 9a7353a6e8
commit 1acf807a13
2 changed files with 113 additions and 0 deletions

View File

@@ -19,6 +19,18 @@ WHOAMI=$(shell whoami)
echo:
@echo "type make version to do release $(APP) $(VERSION) $(GOOS) $(GOARCH) $(MIN_GO_VERSION) $(I2P_UID) $(I2P_GID)"
index:
@echo "<!DOCTYPE html>" > index.html
@echo "<html>" >> index.html
@echo "<head>" >> index.html
@echo " <title>Reseed Tools</title>" >> index.html
@echo " <link rel=\"stylesheet\" type=\"text/css\" href =\"/style.css\" />" >> index.html
@echo "</head>" >> index.html
@echo "<body>" >> index.html
pandoc README.md >> index.html
@echo "</body>" >> index.html
@echo "</html>" >> index.html
build:
go build $(ARG) -o reseed-tools-$(GOOS)-$(GOARCH)

101
index.html Normal file
View File

@@ -0,0 +1,101 @@
<!DOCTYPE html>
<html>
<head>
<title>Reseed Tools</title>
<link rel="stylesheet" type="text/css" href ="/style.css" />
</head>
<body>
<h1 id="i2p-reseed-tools">I2P Reseed Tools</h1>
<p>This tool provides a secure and efficient reseed server for the I2P network. There are several utility commands to create, sign, and validate SU3 files. Please note that this requires at least Go version 1.13, and uses Go Modules.</p>
<h2 id="dependencies">Dependencies</h2>
<p><code>go</code>, <code>git</code>, and optionally <code>make</code> are required to build the project. Precompiled binaries for most platforms are available at my github mirror https://github.com/eyedeekay/i2p-tools-1.</p>
<p>In order to install the build-dependencies on Ubuntu or Debian, you may use:</p>
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="fu">sudo</span> apt-get install golang-go git make</span></code></pre></div>
<h2 id="installationfrom-source">Installation(From Source)</h2>
<pre><code>git clone https://i2pgit.org/idk/reseed-tools
cd reseed-tools
make build
# Optionally, if you want to install to /usr/bin/reseed-tools
sudo make install</code></pre>
<h2 id="usage">Usage</h2>
<h4 id="debianubuntu-note">Debian/Ubuntu note:</h4>
<p>Debian users who are running I2P as a system service must also run the <code>reseed-tools</code> as the same user. This is so that the reseed-tools can access the I2P services netDb directory. On Debian and Ubuntu, that user is <code>i2psvc</code> and the netDb directory is: <code>/var/lib/i2p/i2p-config/netDb</code>.</p>
<h5 id="systemd-service">Systemd Service</h5>
<p>A systemd service is provided which should work with the I2P Debian package when reseed-tools is installed in <code>/usr/bin/reseed-tools</code>. If you install with <code>make install</code> this service is also installed. This service will cause the bundles to regenerate every 12 hours.</p>
<p>The contact email for your reseed should be added in: <code>/etc/systemd/system/reseed.d/reseed.conf</code>.</p>
<p>Self-signed certificates will be auto-generated for these services. To change this you should edit the <code>/etc/systemd/system/reseed.d/reseed.service</code>.</p>
<ul>
<li>To enable starting the reseed service automatically with the system: <code>sudo systemctl enable reseed.service</code></li>
<li>To run the service manually: <code>sudo sysctl start reseed.service</code><br />
</li>
<li>To reload the systemd services: <code>sudo systemctl daemon-reload</code></li>
<li>To view the status/logs: <code>sudo journalctl -u reseed.service</code></li>
</ul>
<h5 id="sysv-service">SysV Service</h5>
<p>An initscript is also provided. The initscript, unlike the systemd service, cannot schedule itself to restart. You should restart the service roughly once a day to ensure that the information does not expire.</p>
<p>The contact email for your reseed should be added in: <code>/etc/init.d/reseed</code>.</p>
<p>Self-signed certificates will be auto-generated for these services. To change this you should edit the <code>/etc/init.d/reseed</code>.</p>
<h3 id="without-a-webserver-standalone-with-tls-support">Without a webserver, standalone with TLS support</h3>
<p>If this is your first time running a reseed server (ie. you dont have any existing keys), you can simply run the command and follow the prompts to create the appropriate keys, crl and certificates. Afterwards an HTTPS reseed server will start on the default port and generate 6 files in your current directory (a TLS key, certificate and crl, and a su3-file signing key, certificate and crl).</p>
<pre><code>reseed-tools reseed --signer=you@mail.i2p --netdb=/home/i2p/.i2p/netDb --tlsHost=your-domain.tld</code></pre>
<h2 id="example-commands">Example Commands:</h2>
<h3 id="locally-behind-a-webserver-reverse-proxy-setup-preferred">Locally behind a webserver (reverse proxy setup), preferred:</h3>
<p>If you are using a reverse proxy server it may provide the TLS certificate instead.</p>
<pre><code>reseed-tools reseed --signer=you@mail.i2p --netdb=/home/i2p/.i2p/netDb --port=8443 --ip=127.0.0.1 --trustProxy</code></pre>
<h3 id="without-a-webserver-standalone-self-supervisingautomatic-restarts">Without a webserver, standalone, self-supervising(Automatic restarts)</h3>
<pre><code>./reseed-tools reseed --signer=you@mail.i2p --netdb=/home/i2p/.i2p/netDb --littleboss=start</code></pre>
<h3 id="without-a-webserver-standalone-automatic-onionv3-with-tls-support">Without a webserver, standalone, automatic OnionV3 with TLS support</h3>
<pre><code>./reseed-tools reseed --signer=you@mail.i2p --netdb=/home/i2p/.i2p/netDb --onion --i2p --p2p</code></pre>
<h3 id="without-a-webserver-standalone-serve-p2p-with-libp2p">Without a webserver, standalone, serve P2P with LibP2P</h3>
<pre><code>./reseed-tools reseed --signer=you@mail.i2p --netdb=/home/i2p/.i2p/netDb --p2p</code></pre>
<h3 id="without-a-webserver-standalone-upload-a-single-signed-.su3-to-github">Without a webserver, standalone, upload a single signed .su3 to github</h3>
<ul>
<li>This one isnt working yet, Ill get to it eventually, Ive got a cooler idea now.</li>
</ul>
<pre><code>./reseed-tools reseed --signer=you@mail.i2p --netdb=/home/i2p/.i2p/netDb --github --ghrepo=reseed-tools --ghuser=eyedeekay</code></pre>
<h3 id="without-a-webserver-standalone-in-network-reseed">Without a webserver, standalone, in-network reseed</h3>
<pre><code>./reseed-tools reseed --signer=you@mail.i2p --netdb=/home/i2p/.i2p/netDb --i2p</code></pre>
<h3 id="without-a-webserver-standalone-regular-tls-onionv3-with-tls">Without a webserver, standalone, Regular TLS, OnionV3 with TLS</h3>
<pre><code>./reseed-tools reseed --tlsHost=your-domain.tld --signer=you@mail.i2p --netdb=/home/i2p/.i2p/netDb --onion</code></pre>
<h3 id="without-a-webserver-standalone-regular-tls-onionv3-with-tls-and-libp2p">Without a webserver, standalone, Regular TLS, OnionV3 with TLS, and LibP2P</h3>
<pre><code>./reseed-tools reseed --tlsHost=your-domain.tld --signer=you@mail.i2p --netdb=/home/i2p/.i2p/netDb --onion --p2p</code></pre>
<h3 id="without-a-webserver-standalone-regular-tls-onionv3-with-tls-i2p-in-network-reseed-and-libp2p-self-supervising">Without a webserver, standalone, Regular TLS, OnionV3 with TLS, I2P In-Network reseed, and LibP2P, self-supervising</h3>
<pre><code>./reseed-tools reseed --tlsHost=your-domain.tld --signer=you@mail.i2p --netdb=/home/i2p/.i2p/netDb --onion --p2p --littleboss=start</code></pre>
<h3 id="docker">Docker</h3>
<p>To make it easier to deploy reseeds, it is possible to run this software as a Docker image. Because the software requires access to a network database to host a reseed, you will need to mount the netDb as a volume inside your docker container to provide access to it, and you will need to run it as the same user and group inside the container as I2P.</p>
<p>When you run a reseed under Docker in this fashion, it will automatically generate a self-signed certificate for your reseed server in a Docker volume mamed reseed-keys. <em>Back up this directory</em>, if it is lost it is impossible to reproduce.</p>
<p>Please note that Docker is not currently compatible with .onion reseeds unless you pass the network=host tag.</p>
<h4 id="if-i2p-is-running-as-your-user-do-this">If I2P is running as your user, do this:</h4>
<pre><code> docker run -itd \
--name reseed \
--publish 443:8443 \
--restart always \
--volume $HOME/.i2p/netDb:$HOME/.i2p/netDb:z \
--volume reseed-keys:/var/lib/i2p/i2p-config/reseed \
eyedeekay/reseed \
--signer $YOUR_EMAIL_HERE</code></pre>
<h4 id="if-i2p-is-running-as-another-user-do-this">If I2P is running as another user, do this:</h4>
<pre><code> docker run -itd \
--name reseed \
--user $(I2P_UID) \
--group-add $(I2P_GID) \
--publish 443:8443 \
--restart always \
--volume /PATH/TO/USER/I2P/HERE/netDb:/var/lib/i2p/i2p-config/netDb:z \
--volume reseed-keys:/var/lib/i2p/i2p-config/reseed \
eyedeekay/reseed \
--signer $YOUR_EMAIL_HERE</code></pre>
<h4 id="debianubuntu-and-docker"><strong>Debian/Ubuntu and Docker</strong></h4>
<p>In many cases I2P will be running as the Debian system user <code>i2psvc</code>. This is the case for all installs where Debians Advanced Packaging Tool(apt) was used to peform the task. If you used <code>apt-get install</code> this command will work for you. In that case, just copy-and-paste:</p>
<pre><code> docker run -itd \
--name reseed \
--user $(id -u i2psvc) \
--group-add $(id -g i2psvc) \
--publish 443:8443 \
--restart always \
--volume /var/lib/i2p/i2p-config/netDb:/var/lib/i2p/i2p-config/netDb:z \
--volume reseed-keys:/var/lib/i2p/i2p-config/reseed \
eyedeekay/reseed \
--signer $YOUR_EMAIL_HERE</code></pre>
</body>
</html>