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