GitXplorerGitXplorer
i

tskrtt

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
887e992156ed63506d42e9cf453335fd4019a4e0

Implement chroot to root dir

iinzanity committed 4 years ago
Unverified
8aeae05926ec600aeb4af09f789080ad63126426

Avoid double slashes

iinzanity committed 4 years ago
Unverified
522622907f2ef50606232ed57d41f8ae9c96691f

Fix tls memory leak

iinzanity committed 4 years ago
Unverified
047826e7424c33a0aeed29b3afcec761d2ba8c66

Refactoring

iinzanity committed 4 years ago
Unverified
9003c03e58e1a44dc9278b329e4eda9e86548513

Fixes and improvements to cgi

iinzanity committed 4 years ago
Unverified
53f99c0fbfe07af41b93a1a9306002d723a3f514

Improve CGI standard compliance

iinzanity committed 4 years ago

README

The README file for this repository.

A gopherd for Linux (and possibly others)

Features: * gopher menus (gophermap or gph) * dir listings * CGI support * access logging * TLS using libtls

Usage: tskrtt [-46d] [-t key cert] [-l logfile] [-b rootdir] [-p port] [-o outport] [-u user] [-g group] [-h host] [-i listen address] -4 Only listen for IPv4 connections.

-6		Only listen for IPv6 connections.

-c		Chroot to root directory.

-d		Don't fork into background.

-l logfile	Location for an access log file (no default).

-b rootdir	Root directory of served content
		(default: /var/gopher).

-h host		Hostname used in generated content (default: listen
		address or system hostname)

-p port		Port on which the daemon will listen (default: 70).

-o oport	Port shown on generated content (default: same as
		port).

-u user		Change to user after startup.

-g group	Change to group after startup.

-i address	Listen for incoming connections on given address
		(default: listen on any address).

-t key cert	Allow connections using TLS using the given key and
		cert (default: only plain text connection).

Requirements: tskrtt is based on libev event loop (tested with 4.25 and 4.33). For TLS support, LibreSSL libtls or libretls is required.

Building: Build using make. If TLS support is not wanted, edit Makefile.

GPH format: tskrtt supports GPH formatting and should be compatible with that of geomyidae. In addition tskrtt allows for server and/or port not to be defined, in which case server's hostname and port (or 70 if server is defined) are used.

Dynamic content: Executable files ending in .cgi are run and the input is forwarded to client as-is. A well behaving .cgi should output well formed gopher data (for text and menu content), including using CR + LF as line ending and ending transmission with a dot on an otherwise empty line, and take care not to have it anywhere else in the output.

Executable files ending in .dcgi are similarily run, but they should
output GPH formatted text instead, which is parsed by tskrtt before
passing on to the client.

Note that while striving to be able to be compatible with HTTP CGI,
a major difference is that neither type should print HTTP headers. For
example a PHP script should begin with

#!/usr/bin/php-cgi --no-header

to avoid HTTP headers in the output.

Chroot: tskrtt can chroot to root dir (if built with support, chroot() is not part of POSIX. Note that this has immerse effect on d?cgi, whereas their interpreter / dynamic libraries need to be available inside the chroot.

Reporting bugs: Bugs can be reported to inz@inz.fi via email.