Blob


1 => contrib.gmi contrib
2 => /quickstart.gmi Quickstart
3 => /gmid.1.txt docs
5 # gmid
7 > A Gemini server
9 ## Features
11 * sandboxed by default on OpenBSD, FreeBSD and Linux
12 * able to reload the configuration on-the-fly without loosing connections
13 * punycode and IRI support
14 * CGI and FastCGI support
15 * virtual hosts and per-location rules
16 * low memory footprint
17 * event-based asynchronous I/O model
18 * rich configuration file
20 => gmid.1.txt Read the manpage.
22 ## Install
24 Some distros provide a package — thanks to the maintainers!
26 => https://repology.org/project/gmid/versions [https] Repology: packaging status for gmid
28 Source code and precompiled binaries for linux are available:
30 => https://github.com/omar-polo/gmid/releases/download/1.7.5/gmid-1.7.5.tar.gz gmid-1.7.5.tar.gz
32 => https://git.omarpolo.com/gmid/ git repository
33 => gemini://git.omarpolo.com/gmid.git/ git repository via Gemini
34 => https://github.com/omar-polo/gmid GitHub mirror
36 => https://github.com/omar-polo/gmid/releases/download/1.7.5/gmid.linux.aarch64 gmid.linux.aarch64
37 => https://github.com/omar-polo/gmid/releases/download/1.7.5/gmid.linux.amd64 gmid.linux.amd64
39 When in doubt, compile from source: it’s easy and takes less than a minute on a raspberry pi 3. The dependencies are:
41 * libevent
42 * OpenSSL/LibreSSL
43 * libtls (from either LibreSSL or LibreTLS)
44 * yacc or GNU bison
46 Once all the dependencies are installed, building is as easy as:
48 ```Example of how to compile from source
49 $ curl -LO https://github.com/omar-polo/gmid/releases/download/1.7.5/gmid-1.7.5.tar.gz
50 $ tar xzvf gmid-1.7.5.tar.gz
51 $ cd gmid-1.7.5
52 $ ./configure
53 $ make
54 $ sudo make install # eventually
55 ```
57 A SHA256 file is available. However, that only checks for accidental corruption: you can use signify (SHA256.sig and the public key gmid-1.7.pub) or GPG. The hash of the signify public key is also included in the SHA256 file and thus signed with my GPG. The signify public key for the next release ‘gmid-1.8.pub’ is also included.
59 => https://github.com/omar-polo/gmid/releases/download/1.7.5/SHA256 SHA256
60 => https://github.com/omar-polo/gmid/releases/download/1.7.5/SHA256 SHA256.gpg
61 => https://github.com/omar-polo/gmid/releases/download/1.7.5/SHA256.sig SHA256.sig
63 To verify the signatures with signify(1)
65 ```Example of how to verify the signature with signify
66 $ signify -C -p gmid-1.7.pub -x SHA256.sig
67 Signature Verified
68 gmid-1.7.pub: OK
69 gmid-1.7.5.tar.gz: OK
70 gmid-1.8.pub: OK
71 gmid.linux.aarch64: OK
72 gmid.linux.amd64: OK
73 ```
75 ## Change log for the last versions
77 1.7.5 “Space-dye Vest” fifth bugfix release — Released October 15, 2021
79 This version includes the following bugfix
81 * don’t die when a connection is closed before being accepted by gmid (i.e. handle ‘ECONNRESET’)
86 1.7.4 “Space-dye Vest” fourth bugfix release — Released September 24, 2021
88 This version includes the following bugfix:
90 * fix a possible out-of-bound access when handling a request for a non-existent file in the root directory of a vhost that's matched by the cgi option
92 and the relative regression test.
97 1.7.3 “Space-dye Vest” third bugfix release — Released September 19, 2021
99 ### Improvements
101 * follows symlinks
102 * improved documentation and added key generation example (thanks! Anna)
104 ### Bugfix
106 * fix syslog logging on FreeBSD. Reported by Karl Jeacle, thanks!
107 * don't crash if ``-c'' is missing in configtest mode (-n). Reported by heph, thanks!
108 * allow fstat64 on linux (needed by glibc on aarch64). Reported by pine, thanks!
113 1.7.2 “Space-dye Vest” second bugfix release — Released July 19, 2021
115 This version incudes the following bugfix:
117 * an un-initialized field in the configless code path leads to a crash on the first request.
119 and the relative regression test.
123 1.7.1 “Space-dye Vest” bugfix release — Released July 11, 2021
125 This version includes two bugfixes:
126 * use ${MAKE} to recursively call make.
127 * fix the misleading example in the manpage: macros may not be reserved words
131 1.7 “Space-dye Vest” — Released July 10, 2021
133 Starting from this version gmid doesn't depend on lex anymore, but yacc is still needed.
135 ### New features
137 * initial fastcgi support! (it's still young!)
138 * added user-defined macros, either via ‘-Dname=val’ or directly in the configuration file.
139 * new ‘include’ keyword to load additional configuration files.
140 * new ‘env’ rule to define environment vars for CGI scripts.
141 * new ‘alias’ rule to define hostname aliases for a server.
142 * allow ‘root’ to be specified per-location block.
143 * pidfile support with the new ‘-P’ cli flag.
144 * define ‘TLS_VERSION’, ‘TLS_CIPHER’ and ‘TLS_CIPHER_STRENGTH’ for CGI scripts.
146 ### Improvements
148 * remove limits on the number of virtual hosts and location blocks that can be defined.
149 * print the datetime when logging to stderr.
150 * use ‘text/x-patch’ for ‘.patch’ and ‘.diff’ files.
151 * sort the auto index alphabetically.
152 * various improvements to the log management.
153 * drop the dependency on lex.
154 * added ‘--help’ as synonym of ‘-h’ and ‘-V’/‘--version‘ to print the version.
155 * c-like handling of strings in the configuration file: when two or more strings are next to each-others, are automatically joined into a single string. This is particularly useful with $-macros.
157 ### Bug fixes
159 * correctly handle CGI scripts that replies with the maxium header length allowed.
160 * fixed the static target.
161 * fixed recursive mkdirs for configless mode (i.e. create ‘~/.local/share/gmid’)
162 * logs sent to syslog now have proper priority (before every message ended up as LOG_CRIT). Found by Anna “CyberTailor”, thanks!
163 * ensure ‘%p’ (path) is always absolute in ‘block return’ rules.
164 * fix automatic certificate generation, it caused problems on some adroid devices. Found by Gnuserland, thanks!
165 * document the ‘log’ rule.
166 * the seccomp filter was reworked and now it's known to work properly on a vast range of architectures (to be more specific: all the architectures supported by alpine linux), see github issue #4. Prompted and tested by @begss, thanks!
167 * various improvements to the configure script, notified and fixed by Anna “CyberTailor”, thanks!
168 * added a timeout to the regression tests.
170 ### Breaking changes
172 * if duplicate rules are found in the configuration file, an error is now raised instead of silently using only the last value.
173 * (sort of) ‘gg’ moved to ‘regress’ as it's only used in the regression suite.
174 * (notice) the “mime "mime-type" "extension"” rule was deprecated and replaced by the new “map "mime-type" to-ext "extension"”. The ‘mime’ rule will be removed in a future version because its syntax is incompatible with the new string auto-concat mechanism.