💾 Archived View for rawtext.club › ~sloum › geminilist › 002788.gmi captured on 2020-11-07 at 03:08:49. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2020-10-31)
-=-=-=-=-=-=-
Kevin Sangeelee kevin at susa.net
Sun Sep 27 20:56:34 BST 2020
- - - - - - - - - - - - - - - - - - -
Thanks again! This tiny server has around a 3MB resident footprint.
I think having a server capable of managing its own certificates is a greatidea - there have been plenty of issues where a certificate anomaly turnedout to be the problem.
One minor issue - I don't think that C11, as per the readme, supports thesingle argument version of static_assert, as used in include/server.h. Thefollowing is suggested: -
8< ----------diff --git a/include/server.h b/include/server.hindex c6f4a38..c4ea470 100644--- a/include/server.h+++ b/include/server.h@@ -27,7 +27,7 @@ struct gmnisrv_client { BIO *bio, *sbio;
char buf[4096];- static_assert(GEMINI_MAX_URL + 3 < 4096);+ static_assert(GEMINI_MAX_URL + 3 < 4096, "GEMINI_MAX_URL is toolarge"); size_t bufix, bufln;
enum response_state state;8< ----------
Kevin
On Sat, 26 Sep 2020 at 23:36, Drew DeVault <sir at cmpwn.com> wrote:
As promised, I have implemented a Gemini server in C11 for POSIX
systems: gmnisrv.
gemini://drewdevault.com/gmnisrv.gmi
gmnisrv is a high-performance server which requires next to no
configuration. You just write a file like this:
listen=0.0.0.0:1965 [::]:1965
[:tls]
store=/var/lib/gemini/certs
organization=gmnisrv user
[example.org]
root=/srv/gemini/example.org
[example.com]
root=/srv/gemini/example.com
Stick it in /etc/gmnisrv.ini, start the daemon, and you're done. It
automatically generates and rotates certificates for you.
The only dependencies are a C11 compiler, a POSIX-like system, and
OpenSSL*. It clocks in at about 3,000 lines of code. In the future, I
would like to add support for some simple URL rewrites and reverse proxy
support.
* I actually mean OpenSSL when I say it, not LibreSSL or GNUTLS or
anything else.
Development info can be found here:
https://sr.ht/~sircmpwn/gmni/
Enjoy!
-------------- next part --------------An HTML attachment was scrubbed...URL: <https://lists.orbitalfox.eu/archives/gemini/attachments/20200927/9fe94936/attachment.htm>