A Mastodon proxy for Gemini
Go to file
Romain de Laage 87784a8166
Hotfix: Reblog content were not visible
2022-05-11 15:28:11 +02:00
.gitignore Add makefile .gitignore, change example config and add go mod 2021-03-01 12:41:08 +01:00
Dockerfile Add docker image 2021-03-04 19:32:46 +01:00
LICENSE Add License and update readme 2021-03-03 10:02:35 +01:00
Makefile Bump to 1.2 2022-04-30 14:33:12 +02:00
README.md Add docker image 2021-03-04 19:32:46 +01:00
config.json Make rate limite configurable, little entrypoint fix 2021-04-18 10:43:12 +02:00
docker-compose.yml Bump version to 1.1 2021-04-18 10:44:57 +02:00
go.mod Add makefile .gitignore, change example config and add go mod 2021-03-01 12:41:08 +01:00
main.go Hotfix: Reblog content were not visible 2022-05-11 15:28:11 +02:00
mastoUtil.go Add support for media proxying and use io instead of deprecated io/ioutil 2022-04-30 14:32:28 +02:00
server.go Add support for media proxying and use io instead of deprecated io/ioutil 2022-04-30 14:32:28 +02:00
start.sh Make rate limite configurable, little entrypoint fix 2021-04-18 10:43:12 +02:00
util.go Hotfix: Reblog content were not visible 2022-05-11 15:28:11 +02:00

README.md

MastoGem : a Mastodon proxy for Gemini

Build from sources

$ make

All builds are in the build folder.

Generate key and certificate

TLS is mandatory with Gemini, a self-signed certificate is recommended. You must generate a key first:

$ openssl genrsa -out key.rsa 4096

Then, you must generate the certificate (replace localhost with your domain name):

$ openssl req -x509 -key key.rsa -out cert.pem -days 365 -subj "/CN=localhost"

Config

You have an example of config file in config.json, the program only accepts json files.

Run this program

You should provide the MASTOGEM_CONFIG_PATH environment variable when launching the program, if it was not provided or it was empty, default config will be loaded.

To run the program simply run the executable file corresponding to your architecture in the build folder. Make sure the certificate and the key where generated before.

Run with Docker

You could use docker or docker-compose to run this program, you must set a MASTODON_BASE_URL variable corresponding to the URL to your Mastodon instance (without the tailing slash), you also must bind a certificate (/cert.pem) and a key (/key.rsa).

You can set a TITLE and a HOME_MESSAGE variables.

Docker

sudo docker run	-it \
		-p 1965:1965 \
		-e MASTODON_BASE_URL=https://mamot.fr \
		--mount type=bind,source=$(pwd)/certs/cert.pem,destination=/cert.pem \
		--mount type=bind,source=$(pwd)/certs/key.rsa,destination=/key.rsa \ 
		dervom/mastogem

Docker-compose

sudo docker-compose up -d

Contribute

You contributions are welcomed, you can send me an email (romain.delaage@rdelaage.ovh).

This program is under AGLPv3 License