Blob


1 <!doctype html>
2 <html lang="en">
3 <head>
4 <title>gmid</title>
5 <meta charset="utf8">
6 <meta name="viewport" content="width=device-width, initial-scale=1">
7 <style>
8 body {
9 font-family: monospace;
10 font-size: 14px;
11 max-width: 780px;
12 margin: 0 auto;
13 padding: 20px;
14 padding-bottom: 80px;
15 }
17 h1::before {
18 content: "# ";
19 }
21 h2 {
22 margin-top: 40px;
23 }
25 h2::before {
26 content: "## ";
27 }
29 h3::before {
30 content: "### ";
31 }
33 blockquote {
34 margin: 0;
35 padding: 0;
36 }
38 blockquote::before {
39 content: "> ";
40 }
42 blockquote p {
43 font-style: italic;
44 display: inline;
45 }
47 p.link::before {
48 content: "→ ";
49 }
51 strong::before { content: "*" }
52 strong::after { content: "*" }
54 hr {
55 border: 0;
56 height: 1px;
57 background-color: #222;
58 width: 100%;
59 display: block;
60 margin: 2em auto;
61 }
63 img {
64 border-radius: 5px;
65 }
67 pre {
68 overflow: auto;
69 padding: 1rem;
70 background-color: #f0f0f0;
71 border-radius: 3px;
72 }
74 pre.banner {
75 display: flex;
76 flex-direction: row;
77 justify-content: center;
78 }
80 code, kbd {
81 color: #9d109d;
82 }
84 img {
85 display: block;
86 margin: 0 auto;
87 max-width: 100%;
88 }
90 @media (prefers-color-scheme: dark) {
91 body {
92 background-color: #222;
93 color: white;
94 }
96 a {
97 color: aqua;
98 }
100 hr {
101 background-color: #ddd;
104 pre {
105 background-color: #353535;
108 code, kbd {
109 color: #ff4cff;
113 @media (max-width: 400px) {
114 pre.banner { font-size: 9px; }
117 @media (max-width: 500px) {
118 pre.banner { font-size: 10px; }
120 </style>
121 </head>
122 <body>
123 <header>
124 <nav>
125 Home |
126 <a href="contrib.html">contrib</a> |
127 <a href="quickstart.html">Quickstart</a> |
128 <a href="gmid.1.html">docs</a>
129 </nav>
130 </header>
131 <h1>gmid</h1>
132 <blockquote>
133 <p>A Gemini server</p>
134 </blockquote>
135 <h2>Features</h2>
136 <ul>
137 <li>sandboxed by default on OpenBSD, FreeBSD and Linux</li>
138 <li>able to reload the configuration on-the-fly without loosing connections</li>
139 <li>punycode and IRI support</li>
140 <li>CGI and FastCGI support</li>
141 <li>virtual hosts and per-location rules</li>
142 <li>low memory footprint</li>
143 <li>event-based asynchronous I/O model</li>
144 <li>rich configuration file</li>
145 </ul>
146 <h2>Install</h2>
147 <p>Some distros provide a package — thanks to the maintainers!</p>
148 <p>
149 <a href="https://repology.org/project/gmid/versions">
150 <img src="https://repology.org/badge/vertical-allrepos/gmid.svg" alt="Packaging status">
151 </a>
152 </p>
153 <p>Source code and precompiled binaries for linux are available:</p>
154 <ul>
155 <li>
156 <a href="https://github.com/omar-polo/gmid/releases/download/1.7.4/gmid-1.7.4.tar.gz">gmid-1.7.4.tar.gz</a>
157 </li>
158 </ul>
159 <ul>
160 <li>
161 <a href="https://git.omarpolo.com/gmid/">git repository</a>
162 </li>
163 <li>
164 <a href="gemini://git.omarpolo.com/gmid.git/">git repository via Gemini</a>
165 </li>
166 <li>
167 <a href="https://github.com/omar-polo/gmid">GitHub mirror</a>
168 </li>
169 </ul>
170 <ul>
171 <li>
172 <a href="https://github.com/omar-polo/gmid/releases/download/1.7.4/gmid.linux.aarch64">gmid.linux.aarch64</a>
173 </li>
174 <li>
175 <a href="https://github.com/omar-polo/gmid/releases/download/1.7.4/gmid.linux.amd64">gmid.linux.amd64</a>
176 </li>
177 </ul>
178 <p>
179 When in doubt, compile from source: it’s easy and takes less
180 than a minute on a raspberry pi 3. The dependencies are:
181 </p>
182 <ul>
183 <li>libevent</li>
184 <li>OpenSSL/LibreSSL</li>
185 <li>libtls (from either LibreSSL or LibreTLS)</li>
186 <li>yacc or GNU bison</li>
187 </ul>
188 <p>Once all the dependencies are installed, building is as easy as:</p>
189 <pre>$ curl -LO https://github.com/omar-polo/gmid/releases/download/1.7.4/gmid-1.7.4.tar.gz
190 $ tar xzvf gmid-1.7.4.tar.gz
191 $ cd gmid-1.7.4
192 $ ./configure
193 $ make
194 $ sudo make install # eventually</pre>
195 <p>
196 A SHA256 file is available. However, that only checks for
197 accidental corruption: you can use signify (SHA256.sig and the
198 public key gmid-1.7.pub) or GPG. The hash of the signify public
199 key is also included in the SHA256 file and thus signed with my
200 GPG. The signify public key for the next release ‘gmid-1.8.pub’
201 is also included.
202 </p>
203 <ul>
204 <li>
205 <a href="https://github.com/omar-polo/gmid/releases/download/1.7.4/SHA256">SHA256</a>
206 </li>
207 <li>
208 <a href="https://github.com/omar-polo/gmid/releases/download/1.7.4/SHA256.gpg">SHA256.gpg</a>
209 </li>
210 <li>
211 <a href="https://github.com/omar-polo/gmid/releases/download/1.7.4/SHA256.sig">SHA256.sig</a>
212 </li>
213 </ul>
214 <p>To verify the signatures with signify(1)</p>
215 <pre>$ signify -C -p gmid-1.7.pub -x SHA256.sig
216 Signature Verified
217 gmid-1.7.pub: OK
218 gmid-1.7.4.tar.gz: OK
219 gmid-1.8.pub: OK
220 gmid.linux.aarch64: OK
221 gmid.linux.amd64: OK</pre>
222 <h2>Changelog for the last versions</h2>
223 <p>1.7.4 “Space-dye Vest” fourth bugfix release — Released September 24, 2021</p>
224 <p>This version includes the following bugfix:</p>
225 <ul>
226 <li>
227 fix a possible out-of-bound access when handling a request for
228 a non-existent file in the root directory of a vhost that's
229 matched by the cgi option
230 </li>
231 </ul>
232 <p>and the relative regression test.</p>
233 <hr />
234 <p>1.7.3 “Space-dye Vest” third bugfix release — Released September 18, 2021</p>
235 <h3>Improvements</h3>
236 <ul>
237 <li>follows symlinks</li>
238 <li>improved documentation and added key generation example (thanks! Anna)</li>
239 </ul>
240 <h3>Bugfix</h3>
241 <ul>
242 <li>fix syslog logging on FreeBSD. Reported by Karl Jeacle, thanks!</li>
243 <li>don't crash if <code>-c</code> is missing in configtest mode (<code>-n</code>). Reported by heph, thanks!</li>
244 <li>allow fstat64 on linux (needed by glibc on aarch64). Reported by pine, thanks!</li>
245 </ul>
246 <hr />
247 <p>1.7.2 “Space-dye Vest” second bugfix release — Released July 19, 2021</p>
248 <p>This version includes the following bugfix:</p>
249 <ul>
250 <li>
251 An un-initialized field in the configless code path leads to a
252 crash on the first request.
253 </li>
254 </ul>
255 <p>and the relative regression test.</p>
256 <hr />
257 <p>1.7.1 “Space-dye Vest” bugfix release — Released July 11, 2021</p>
258 <p>This version includes two bugfixes:</p>
259 <ul>
260 <li>use <code>${MAKE}</code> to recursively call make.</li>
261 <li>
262 fix the misleading example in the manpage: macros name may not
263 be reserved words.
264 </li>
265 </ul>
266 <hr />
267 <p>1.7 “Space-dye Vest” — Released July 10, 2021</p>
268 <p>
269 Starting from this version gmid doesn't depend on lex anymore,
270 but yacc is still needed.
271 </p>
272 <h3>New Features</h3>
273 <ul>
274 <li>initial fastcgi support! (it&#8217;s still young!)</li>
275 <li>
276 added user-defined macros, either via <code>-Dname=val</code> or
277 directly in the configuration file.
278 </li>
279 <li>new <code>include</code> keyword to load additional configuration files.</li>
280 <li>new <code>env</code> rule to define environment vars for CGI scripts.</li>
281 <li>new <code>alias</code> rule to define hostname aliases for a server.</li>
282 <li>allow <code>root</code> to be specified per-location block.</li>
283 <li>pidfile support with the new <code>-P</code> cli flag.</li>
284 <li>
285 define <code>TLS_VERSION</code>, <code>TLS_CIPHER</code> and
286 <code>TLS_CIPHER_STRENGTH</code> for CGI scripts.
287 </li>
288 </ul>
289 <h3>Improvements</h3>
290 <ul>
291 <li>
292 remove limits on the number of virtual hosts and location
293 blocks that can be defined.
294 </li>
295 <li>print the datetime when logging to stderr.</li>
296 <li>
297 use <code>text&#47;x-patch</code> for <code>.patch</code> and <code>.diff</code> files.
298 </li>
299 <li>sort the auto index alphabetically.</li>
300 <li>various improvements to the log management.</li>
301 <li>drop the dependency on lex.</li>
302 <li>
303 added <code>--help</code> as synonym of <code>-h</code> and
304 <code>-V</code>&#47;<code>--version</code> to print the version.
305 </li>
306 <li>
307 c-like handling of strings in the configuration file: when
308 two or more strings are next to each-others, are
309 automatically joined into a single string. This is
310 particularly useful with <code>$</code>-macros.
311 </li>
312 </ul>
313 <h3>Bug fixes</h3>
314 <ul>
315 <li>
316 correctly handle CGI scripts that replies with the maxium
317 header length allowed.
318 </li>
319 <li>fixed the <code>static</code> target.</li>
320 <li>
321 fixed recursive mkdirs for configless mode (i.e. create
322 <code>~&#47;.local&#47;share&#47;gmid</code>)
323 </li>
324 <li>
325 logs sent to syslog now have proper priority (before every
326 message ended up as LOG_CRIT). Found by Anna
327 &#8220;CyberTailor&#8221;, thanks!
328 </li>
329 <li>
330 ensure <code>%p</code> (path) is always absolute in
331 <code>block return</code> rules.
332 </li>
333 <li>
334 fix automatic certificate generation, it caused problems on
335 some adroid devices. Found by Gnuserland, thanks!
336 </li>
337 <li>document the <code>log</code> rule.</li>
338 <li>
339 the seccomp filter was reworked and now it&#8217;s known to
340 work properly on a vast range of architectures (to be more
341 specific: all the architectures supported by alpine linux),
342 see github issue #4. Prompted and tested by @begss, thanks!
343 </li>
344 <li>
345 various improvements to the configure script, notified and
346 fixed by Anna &#8220;CyberTailor&#8221;, thanks!
347 </li>
348 <li>added a timeout to the regression tests.</li>
349 </ul>
350 <h3>Breaking changes</h3>
351 <ul>
352 <li>
353 if duplicate rules are found in the configuration file, an
354 error is now raised instead of silently using only the last
355 value.
356 </li>
357 <li>
358 (sort of) <code>gg</code> moved to <code>regress</code> as
359 it's only used in the regression suite.
360 </li>
361 <li>
362 (notice) the <code>mime "mime-type" "extension"</code> rule was deprecated and
363 replaced by the new <code>map "mime-type" to-ext "extension"</code>. The
364 <code>mime</code> rule will be removed in a future version
365 because its syntax is incompatible with the new string
366 auto-concat mechanism.
367 </li>
368 </ul>
369 </body>
370 </html>