tskrtt

Simple libev based gopher server
git clone https://git.inz.fi/tskrtt/
Log | Files | Refs | README

README (2649B)


      1 A gopherd for Linux (and possibly others)
      2 
      3 Features:
      4 	* gopher menus (gophermap or gph)
      5 	* dir listings
      6 	* CGI support
      7 	* access logging
      8 	* TLS using libtls
      9 
     10 Usage:
     11 	tskrtt [-46d] [-t key cert] [-l logfile] [-b rootdir] [-p port]
     12 	       [-o outport] [-u user] [-g group] [-h host]
     13 	       [-i listen address]
     14 	-4		Only listen for IPv4 connections.
     15 	
     16 	-6		Only listen for IPv6 connections.
     17 
     18 	-c		Chroot to root directory.
     19 	
     20 	-d		Don't fork into background.
     21 	
     22 	-l logfile	Location for an access log file (no default).
     23 	
     24 	-b rootdir	Root directory of served content
     25 			(default: /var/gopher).
     26 	
     27 	-h host		Hostname used in generated content (default: listen
     28 			address or system hostname)
     29 	
     30 	-p port		Port on which the daemon will listen (default: 70).
     31 	
     32 	-o oport	Port shown on generated content (default: same as
     33 			port).
     34 	
     35 	-u user		Change to user after startup.
     36 	
     37 	-g group	Change to group after startup.
     38 	
     39 	-i address	Listen for incoming connections on given address
     40 			(default: listen on any address).
     41 	
     42 	-t key cert	Allow connections using TLS using the given key and
     43 			cert (default: only plain text connection).
     44 
     45 Requirements:
     46 	tskrtt is based on libev event loop (tested with 4.25 and 4.33). For
     47 	TLS support, LibreSSL libtls or libretls is required.
     48 
     49 Building:
     50 	Build using make. If TLS support is not wanted, edit Makefile.
     51 
     52 GPH format:
     53 	tskrtt supports GPH formatting and should be compatible with that
     54 	of geomyidae. In addition tskrtt allows for server and/or port not
     55 	to be defined, in which case server's hostname and port (or 70 if
     56 	server is defined) are used.
     57 
     58 Dynamic content:
     59 	Executable files ending in .cgi are run and the input is forwarded
     60 	to client as-is. A well behaving .cgi should output well formed
     61 	gopher data (for text and menu content), including using CR + LF as
     62 	line ending and ending transmission with a dot on an otherwise
     63 	empty line, and take care not to have it anywhere else in the output.
     64 
     65 	Executable files ending in .dcgi are similarily run, but they should
     66 	output GPH formatted text instead, which is parsed by tskrtt before
     67 	passing on to the client.
     68 
     69 	Note that while striving to be able to be compatible with HTTP CGI,
     70 	a major difference is that neither type should print HTTP headers. For
     71 	example a PHP script should begin with
     72 
     73 	#!/usr/bin/php-cgi --no-header
     74 
     75 	to avoid HTTP headers in the output.
     76 
     77 Chroot:
     78 	tskrtt can chroot to root dir (if built with support, chroot() is not
     79 	part of POSIX. Note that this has immerse effect on d?cgi, whereas
     80 	their interpreter / dynamic libraries need to be available inside the
     81 	chroot.
     82 
     83 Reporting bugs:
     84 	Bugs can be reported to inz@inz.fi via email.