Miroir de https://git.sr.ht/~int80h/gemserv avec les modifications propres à Ti Nuage. https://git.sr.ht/~int80h/gemserv
Go to file
int 80h 827a9c1481 Bug fix: File path is checked to make sure it's in the root directory or in ~/public_gemini 2022-02-17 22:56:49 -05:00
.builds Added release-linux.yml to automatically build and upload tagged releases for linux 2021-12-27 19:54:34 -05:00
cgi-scripts SCGI 2020-05-26 17:31:28 -04:00
init-scripts Added Openrc init script 2020-05-28 15:25:12 -04:00
src Bug fix: File path is checked to make sure it's in the root directory or in ~/public_gemini 2022-02-17 22:56:49 -05:00
.gitignore Stopped ignoring Cargo.lock in git 2020-07-05 18:27:45 -04:00
Cargo.lock Bug fix: File path is checked to make sure it's in the root directory or in ~/public_gemini 2022-02-17 22:56:49 -05:00
Cargo.toml Bug fix: File path is checked to make sure it's in the root directory or in ~/public_gemini 2022-02-17 22:56:49 -05:00
Dockerfile Added Dockerfile, updated README and pumped Version 2021-12-05 15:30:52 -05:00
LICENSE Added config.toml, README and LICENSE 2020-04-28 18:49:34 -04:00
README Bug fix: File path is checked to make sure it's in the root directory or in ~/public_gemini 2022-02-17 22:56:49 -05:00
UPDATING Added UPDATING FILE. also fixed a few bugs 2020-05-28 16:58:03 -04:00
config.toml Changed host/port to interface and can now listen on multiple interface/ports 2021-11-26 20:21:40 -05:00

README

# Gemserv

A gemini server written in rust.

## Features

 - Vhosts
 - CGI
 - User directories
 - Reverse proxy
 - Redirect
 - SCGI
 - Reload config on SIGHUP

## Installation and running

To run either run "cargo run /path/to/config" or if no configuration is
specified it will look for "/usr/local/etc/gemserv.conf"

### Prebuilt binaries

You can download prebuilt binaries for linux on the release page.

### Install from crates.io:

cargo install gemserv

### Install from docker

docker pull 080h/gemserv

### Build from source:

 - Clone the repo
 - If you want to use all features run 'cargo build --release' or if you only
   want to serve static files run 'cargo build --release --no-default-features'
 - Modify the config.toml to your needs
 - Run './target/release/gemserv config.toml'

## Init scripts

In the init-scripts directory there's OpenRC(Courtesy of Tastytea) and systemd
service files.

## CGI and SCGI

There's example SCGI scripts for python and perl in the cgi-scripts directory.

In the configuration file there's "cgi" which is an optional bool to turn cgi
on. If it's true it'll run scripts from any directory. To limit it to only one
directory set "cgipath"

If "cgi" is false or not set the server will respond "Not Found" to any
executable file.

Scripts have 5 seconds to complete or they will be terminated.

### CGI Environments

These variables are preset for you. If you need more you can define them in the
config file under "cgienv"

 - GEMINI_URL
 - SERVER_NAME
 - SERVER_PROTOCOL
 - SERVER_SOFTWARE
 - SCRIPT_NAME
 - REMOTE_ADDR
 - REMOTE_HOST
 - REMOTE_PORT
 - QUERY_STRING
 - PATH_INFO

TLS variables
 - AUTH_TYPE
 - TLS_CLIENT_HASH
 - REMOTE_USER

## Changelog

### [0.6.6] - 20220217

Bug fix: File path is checked to make sure it's in the root directory or in ~/public_gemini

### [0.6.5] - 20220209

Bug fix: Another traversal bug.

### [0.6.4] - 20220202

Fixed a file system traversal bug. All previous versions are unsafe.