Blame


1 b9220ca4 2021-01-11 op # gmid
2 3e4749f7 2020-10-02 op
3 b9220ca4 2021-01-11 op > dead simple, zero configuration Gemini server
4 3e4749f7 2020-10-02 op
5 b9220ca4 2021-01-11 op gmid is a simple and minimal Gemini server. It requires no
6 b9220ca4 2021-01-11 op configuration whatsoever so it's well suited for local development
7 b9220ca4 2021-01-11 op machines.
8 3e4749f7 2020-10-02 op
9 b9220ca4 2021-01-11 op Care has been taken to assure that gmid doesn't serve files outside
10 b9220ca4 2021-01-11 op the given directory, and it won't follow symlinks. Furthermore, on
11 b9220ca4 2021-01-11 op OpenBSD, gmid is also `pledge(2)`ed and `unveil(2)`ed: the set of
12 b9220ca4 2021-01-11 op pledges are `stdio rpath inet`, with the addition of `proc exec` if
13 b9220ca4 2021-01-11 op CGI scripts are enabled, while the given directory is unveiled with
14 b9220ca4 2021-01-11 op `rx`.
15 3e4749f7 2020-10-02 op
16 3e4749f7 2020-10-02 op
17 b9220ca4 2021-01-11 op ## Features
18 3e4749f7 2020-10-02 op
19 b9220ca4 2021-01-11 op - IRI support (RFC RFC3987)
20 b9220ca4 2021-01-11 op - dual stack: can serve over both IPv4 and IPv6
21 b9220ca4 2021-01-11 op - CGI scripts
22 b9220ca4 2021-01-11 op - (very) low memory footprint
23 b9220ca4 2021-01-11 op - small codebase, easily hackable
24 3e4749f7 2020-10-02 op
25 3e4749f7 2020-10-02 op
26 b9220ca4 2021-01-11 op ## Planned features
27 df6ca41d 2020-12-25 op
28 b9220ca4 2021-01-11 op - virtual hosts
29 3e4749f7 2020-10-02 op
30 fab952e1 2020-10-03 op
31 b9220ca4 2021-01-11 op ## Drawbacks
32 3e4749f7 2020-10-02 op
33 b9220ca4 2021-01-11 op - not suited for very busy hosts. If you receive an high number of
34 b9220ca4 2021-01-11 op connection per-second you'd probably want to run multiple gmid
35 b9220ca4 2021-01-11 op instances behind relayd/haproxy or a different server.
36 85dff1f9 2021-01-11 op
37 85dff1f9 2021-01-11 op
38 b9220ca4 2021-01-11 op ## Building
39 3e4749f7 2020-10-02 op
40 b9220ca4 2021-01-11 op gmid depends a POSIX libc and libtls. It can probably be linked
41 b9220ca4 2021-01-11 op against libretls, but I've never tried.
42 3e4749f7 2020-10-02 op
43 b9220ca4 2021-01-11 op See [INSTALL.gmi](INSTALL.gmi) for more info, but the build is as
44 b9220ca4 2021-01-11 op simple as
45 3e4749f7 2020-10-02 op
46 b9220ca4 2021-01-11 op make
47 3e4749f7 2020-10-02 op
48 b9220ca4 2021-01-11 op The Makefile isn't able to produce a statically linked executable
49 b9220ca4 2021-01-11 op (yet), so for that you have to execute by hand
50 d7802bb4 2020-12-02 op
51 b9220ca4 2021-01-11 op make
52 b9220ca4 2021-01-11 op cc -static *.o /usr/lib/lib{crypto,tls,ssl}.a -o gmid
53 b9220ca4 2021-01-11 op strip gmid
54 d7802bb4 2020-12-02 op
55 b9220ca4 2021-01-11 op to enjoy your ~2.3M statically-linked gmid.