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>reverse proxying</li>
141 <li>CGI and FastCGI support</li>
142 <li>virtual hosts and per-location rules</li>
143 <li>low memory footprint</li>
144 <li>event-based asynchronous I/O model</li>
145 <li>rich configuration file</li>
146 </ul>
147 <h2>Install</h2>
148 <p>Some distros provide a package — thanks to the maintainers!</p>
149 <p>
150 <a href="https://repology.org/project/gmid/versions">
151 <img src="https://repology.org/badge/vertical-allrepos/gmid.svg" alt="Packaging status">
152 </a>
153 </p>
154 <p>Source code and precompiled binaries for linux are available:</p>
155 <ul>
156 <li>
157 <a href="https://github.com/omar-polo/gmid/releases/download/1.7.5/gmid-1.7.5.tar.gz">gmid-1.7.5.tar.gz</a>
158 </li>
159 </ul>
160 <ul>
161 <li>
162 <a href="https://git.omarpolo.com/gmid/">git repository</a>
163 </li>
164 <li>
165 <a href="gemini://git.omarpolo.com/gmid.git/">git repository via Gemini</a>
166 </li>
167 <li>
168 <a href="https://github.com/omar-polo/gmid">GitHub mirror</a>
169 </li>
170 </ul>
171 <ul>
172 <li>
173 <a href="https://github.com/omar-polo/gmid/releases/download/1.7.5/gmid.linux.aarch64">gmid.linux.aarch64</a>
174 </li>
175 <li>
176 <a href="https://github.com/omar-polo/gmid/releases/download/1.7.5/gmid.linux.amd64">gmid.linux.amd64</a>
177 </li>
178 </ul>
179 <p>
180 When in doubt, compile from source: it’s easy and takes less
181 than a minute on a raspberry pi 3. The dependencies are:
182 </p>
183 <ul>
184 <li>libevent</li>
185 <li>OpenSSL/LibreSSL</li>
186 <li>libtls (from either LibreSSL or LibreTLS)</li>
187 <li>yacc or GNU bison</li>
188 </ul>
189 <p>Once all the dependencies are installed, building is as easy as:</p>
190 <pre>$ curl -LO https://github.com/omar-polo/gmid/releases/download/1.7.5/gmid-1.7.5.tar.gz
191 $ tar xzvf gmid-1.7.5.tar.gz
192 $ cd gmid-1.7.5
193 $ ./configure
194 $ make
195 $ sudo make install # eventually</pre>
196 <p>
197 A SHA256 file is available. However, that only checks for
198 accidental corruption: you can use signify (SHA256.sig and the
199 public key gmid-1.7.pub) or GPG. The hash of the signify public
200 key is also included in the SHA256 file and thus signed with my
201 GPG. The signify public key for the next release ‘gmid-1.8.pub’
202 is also included.
203 </p>
204 <ul>
205 <li>
206 <a href="https://github.com/omar-polo/gmid/releases/download/1.7.5/SHA256">SHA256</a>
207 </li>
208 <li>
209 <a href="https://github.com/omar-polo/gmid/releases/download/1.7.5/SHA256.gpg">SHA256.gpg</a>
210 </li>
211 <li>
212 <a href="https://github.com/omar-polo/gmid/releases/download/1.7.5/SHA256.sig">SHA256.sig</a>
213 </li>
214 </ul>
215 <p>To verify the signatures with signify(1)</p>
216 <pre>$ signify -C -p gmid-1.7.pub -x SHA256.sig
217 Signature Verified
218 gmid-1.7.pub: OK
219 gmid-1.7.5.tar.gz: OK
220 gmid-1.8.pub: OK
221 gmid.linux.aarch64: OK
222 gmid.linux.amd64: OK</pre>
223 <h2>Changelog for the last versions</h2>
224 <p>1.7.5 “Space-dye Vest” fifth bugfix release — Released October 15, 2021</p>
225 <p>This version includes the following bugfix:</p>
226 <ul>
227 <li>don't die when a connection is closed before being accepted by gmid (i.e. handle <code>ECONNRESET</code>)</li>
228 </ul>
229 <hr />
230 <p>1.7.4 “Space-dye Vest” fourth bugfix release — Released September 24, 2021</p>
231 <p>This version includes the following bugfix:</p>
232 <ul>
233 <li>
234 fix a possible out-of-bound access when handling a request for
235 a non-existent file in the root directory of a vhost that's
236 matched by the cgi option
237 </li>
238 </ul>
239 <p>and the relative regression test.</p>
240 <hr />
241 <p>1.7.3 “Space-dye Vest” third bugfix release — Released September 18, 2021</p>
242 <h3>Improvements</h3>
243 <ul>
244 <li>follows symlinks</li>
245 <li>improved documentation and added key generation example (thanks! Anna)</li>
246 </ul>
247 <h3>Bugfix</h3>
248 <ul>
249 <li>fix syslog logging on FreeBSD. Reported by Karl Jeacle, thanks!</li>
250 <li>don't crash if <code>-c</code> is missing in configtest mode (<code>-n</code>). Reported by heph, thanks!</li>
251 <li>allow fstat64 on linux (needed by glibc on aarch64). Reported by pine, thanks!</li>
252 </ul>
253 <hr />
254 <p>1.7.2 “Space-dye Vest” second bugfix release — Released July 19, 2021</p>
255 <p>This version includes the following bugfix:</p>
256 <ul>
257 <li>
258 An un-initialized field in the configless code path leads to a
259 crash on the first request.
260 </li>
261 </ul>
262 <p>and the relative regression test.</p>
263 <hr />
264 <p>1.7.1 “Space-dye Vest” bugfix release — Released July 11, 2021</p>
265 <p>This version includes two bugfixes:</p>
266 <ul>
267 <li>use <code>${MAKE}</code> to recursively call make.</li>
268 <li>
269 fix the misleading example in the manpage: macros name may not
270 be reserved words.
271 </li>
272 </ul>
273 <hr />
274 <p>1.7 “Space-dye Vest” — Released July 10, 2021</p>
275 <p>
276 Starting from this version gmid doesn't depend on lex anymore,
277 but yacc is still needed.
278 </p>
279 <h3>New Features</h3>
280 <ul>
281 <li>initial fastcgi support! (it&#8217;s still young!)</li>
282 <li>
283 added user-defined macros, either via <code>-Dname=val</code> or
284 directly in the configuration file.
285 </li>
286 <li>new <code>include</code> keyword to load additional configuration files.</li>
287 <li>new <code>env</code> rule to define environment vars for CGI scripts.</li>
288 <li>new <code>alias</code> rule to define hostname aliases for a server.</li>
289 <li>allow <code>root</code> to be specified per-location block.</li>
290 <li>pidfile support with the new <code>-P</code> cli flag.</li>
291 <li>
292 define <code>TLS_VERSION</code>, <code>TLS_CIPHER</code> and
293 <code>TLS_CIPHER_STRENGTH</code> for CGI scripts.
294 </li>
295 </ul>
296 <h3>Improvements</h3>
297 <ul>
298 <li>
299 remove limits on the number of virtual hosts and location
300 blocks that can be defined.
301 </li>
302 <li>print the datetime when logging to stderr.</li>
303 <li>
304 use <code>text&#47;x-patch</code> for <code>.patch</code> and <code>.diff</code> files.
305 </li>
306 <li>sort the auto index alphabetically.</li>
307 <li>various improvements to the log management.</li>
308 <li>drop the dependency on lex.</li>
309 <li>
310 added <code>--help</code> as synonym of <code>-h</code> and
311 <code>-V</code>&#47;<code>--version</code> to print the version.
312 </li>
313 <li>
314 c-like handling of strings in the configuration file: when
315 two or more strings are next to each-others, are
316 automatically joined into a single string. This is
317 particularly useful with <code>$</code>-macros.
318 </li>
319 </ul>
320 <h3>Bug fixes</h3>
321 <ul>
322 <li>
323 correctly handle CGI scripts that replies with the maxium
324 header length allowed.
325 </li>
326 <li>fixed the <code>static</code> target.</li>
327 <li>
328 fixed recursive mkdirs for configless mode (i.e. create
329 <code>~&#47;.local&#47;share&#47;gmid</code>)
330 </li>
331 <li>
332 logs sent to syslog now have proper priority (before every
333 message ended up as LOG_CRIT). Found by Anna
334 &#8220;CyberTailor&#8221;, thanks!
335 </li>
336 <li>
337 ensure <code>%p</code> (path) is always absolute in
338 <code>block return</code> rules.
339 </li>
340 <li>
341 fix automatic certificate generation, it caused problems on
342 some adroid devices. Found by Gnuserland, thanks!
343 </li>
344 <li>document the <code>log</code> rule.</li>
345 <li>
346 the seccomp filter was reworked and now it&#8217;s known to
347 work properly on a vast range of architectures (to be more
348 specific: all the architectures supported by alpine linux),
349 see github issue #4. Prompted and tested by @begss, thanks!
350 </li>
351 <li>
352 various improvements to the configure script, notified and
353 fixed by Anna &#8220;CyberTailor&#8221;, thanks!
354 </li>
355 <li>added a timeout to the regression tests.</li>
356 </ul>
357 <h3>Breaking changes</h3>
358 <ul>
359 <li>
360 if duplicate rules are found in the configuration file, an
361 error is now raised instead of silently using only the last
362 value.
363 </li>
364 <li>
365 (sort of) <code>gg</code> moved to <code>regress</code> as
366 it's only used in the regression suite.
367 </li>
368 <li>
369 (notice) the <code>mime "mime-type" "extension"</code> rule was deprecated and
370 replaced by the new <code>map "mime-type" to-ext "extension"</code>. The
371 <code>mime</code> rule will be removed in a future version
372 because its syntax is incompatible with the new string
373 auto-concat mechanism.
374 </li>
375 </ul>
376 </body>
377 </html>