dendrite-demo-i2p
Experimental Anonymous-only Matrix homeserver written in Go.
In about an 1:50 flat, just to prove that it is actually easy to do.
It can federate over I2P using SAM, and (probably)federate with other Matrix servers using Tor if they don't block exit nodes or if they exist at onion servers. The configuration file should be exactly identical to one for Dendrite, the Go matrix server. In fact mostly this is just a dendrite demo which focuses on being an I2P homeserver with bridged I2P/Tor/Clearnet federation.
Status: I've officially actually used this with a real Matrix client. It was months ago and I have no idea if it works anymore. If I get more time to work on it I might, but what would be much cooler is if somebody else decided this was a cool idea and found a better, less obviously crude way of doing it. Because this is crude. It's an absolute hackjob. I literally wrote it because I was annoyed at somebody who was bothering me. You can find it in the scrollback of the unofficial I2P matrix room. It is for all intents and purposes a matter of public record. That's how it happened. TL:DR This is UNMAINTAINED.
It should be noted that this project follows the same pattern as my IRC Client/Server/WebUI in that it combines both the Server and the Client into the same app. In this case, the server is provided by Dendrite and the client is provided by Cinny.
Quick Start
#
git clone https://github.com/matrix-org/dendrite $GOPATH/src/github.com/matrix-org/dendrite/
cd $GOPATH/src/github.com/matrix-org/dendrite/ && go install ./...
# Generate a Matrix signing key for federation (required)
generate-keys --private-key matrix_key.pem
# Generate a self-signed certificate (optional, but a valid TLS certificate is normally
# needed for Matrix federation/clients to work properly!)
generate-keys --tls-cert server.crt --tls-key server.key
# TODO: to heck with the above ^ we have to use self-signed certificates anyway we may as
# well generates ones we know will work automatically without user intervention.
# Copy and modify the config file - you'll need to set a server name and paths to the keys
# at the very least, along with setting up the database connection strings.
cp $GOPATH/src/github.com/matrix-org/dendrite/dendrite-config.yaml dendrite.yaml
cd $GOPATH/src/i2pgit.org/idk/dendrite-demo-i2p && go build
./dendrite-demo-i2p
IMPORTANT PAIN POINT You will need to configure your browser to accept ALL of the self-signed certificates that are generated by this application. Turns out this really sucks to actually do and having a CA inside of I2P is also a real mess to figure out. That makes this whole business pretty discouraging right now. For now, you're probably still better off with IRC inside of I2P. BRB works better right now.