A web client for Gemini!
https://swee.codes/apps/gem2browser
- Python 73.5%
- HTML 11.2%
- Jinja 8%
- CSS 6.5%
- Dockerfile 0.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| gem2browser | ||
| .gitattributes | ||
| .gitignore | ||
| Dockerfile | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
Gem2Browser
"Take the web by storm."
A Gemini relay for HTTP using Python flask
Features
- Browses all of Gemini Space!
- Includes Titan editor
- Client certificate support
- In versions 3.0 and newer, it does not store certificates in the server.
Requirements
- Python 3
- Flask
- Gunicorn (or any other flask compatible WSGI)
- PyOpenSSL
Installation
Docker Compose
Use this docker-compose.yml
services:
gem2browser:
image: git.swee.codes/swee/gem2browser:latest
restart: unless-stopped
ports:
- 2009:2009/tcp
On your host
pip install gem2browser gunicorn
Run server
WSGI server (recommended)
guicorn --bind 0.0.0.0:2009 gem2browser:app
Development server
python -m gem2browser
This listens on 127.0.0.1:2009
Service files
Systemd
[Unit]
Description=Gem2Browser
After=network.target
Wants=network-online.target
[Service]
Type=simple
# User=g2b
ExecStart=/usr/bin/gunicorn --bind 0.0.0.0:2009 gem2browser:app
Restart=on-failure
[Install]
WantedBy=multi-user.target
OpenRC
#!/sbin/openrc-run
# command_user="g2b"
command="gunicorn"
command_args="--bind=0.0.0.0:2009 gem2browser:app"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"
depend() {
need net
use dns
}
FreeBSD rc
#!/bin/sh
# PROVIDE: gem2browser
# REQUIRE: NETWORKING
# KEYWORD: shutdown
. /etc/rc.subr
name="gem2browser"
rcvar="gem2browser_enable"
start_precmd="gem2browser_precmd"
procname="/usr/local/bin/python3"
pidfile="/var/run/${name}.pid"
load_rc_config $name
: ${gem2browser_enable:="NO"}
# : ${gem2browser_user:="g2b"}
command="/usr/sbin/daemon"
command_args="-f -l daemon -s info -p ${pidfile} gunicorn --bind=0.0.0.0:2009 gem2browser:app"
gem2browser_precmd() {
if [ ! -e "${pidfile}" ]; then
install -o "${gem2browser_user}" -g "wheel" "/dev/null" "${pidfile}"
fi
}
run_rc_command "$1"