Commit Graph

227 Commits

Author SHA1 Message Date
Omar Polo 3300cbe06a initial punycode support 2021-01-27 10:47:49 +00:00
Omar Polo 390a611893 sane defaults for the config-less mode 2021-01-27 10:43:55 +00:00
Omar Polo 2d3f837ac5 [seccomp] allow getrandom 2021-01-25 15:25:04 +00:00
Omar Polo 333a671107 gen compat for getprogname 2021-01-25 15:09:18 +00:00
Omar Polo 2b15ad2860 adding openssl test 2021-01-25 15:06:59 +00:00
Omar Polo 1078229283 unveil x the vhosts directories 2021-01-25 15:02:55 +00:00
Omar Polo 2d3cc76f6d we don't need unveil "x" in listener
not a big deal, since the pledge prohibits us to exec, but
nevertheless.
2021-01-25 14:58:54 +00:00
Omar Polo 6c117838be fix docker example 2021-01-25 14:55:03 +00:00
Omar Polo 0a0e6ba7f9 typo 2021-01-25 14:52:57 +00:00
Omar Polo 2f09adb085 readme addition 2021-01-25 14:52:19 +00:00
Omar Polo 71cf39757d added missing argument for -H 2021-01-25 14:32:16 +00:00
Omar Polo a5d04ea066 sync 2021-01-25 14:31:40 +00:00
Omar Polo f28d96d399 sync manpage with actual usage and improve examples 2021-01-25 14:31:34 +00:00
Omar Polo 8443bff77a rework the configless mode: change flags and generate certs 2021-01-25 14:08:31 +00:00
Omar Polo 0b00962d37 mention chroot 2021-01-25 10:36:21 +00:00
Omar Polo 145ba43e16 sync 2021-01-25 10:34:05 +00:00
Omar Polo ae08ec7da5 chroot & drop privileges 2021-01-25 10:30:07 +00:00
Omar Polo 2030e31486 order 2021-01-25 09:45:09 +00:00
Omar Polo f88311e534 [seccomp] allow fcntl F_SETFD
musl does a F_SETFD in its fdopendir
2021-01-24 19:12:32 +00:00
Omar Polo 252908e6bb added support for location blocks 2021-01-24 18:53:26 +00:00
Omar Polo c8b7433918 added support for location blocks 2021-01-24 14:11:40 +00:00
Omar Polo 501e489c90 initialize config 2021-01-24 12:45:22 +00:00
Omar Polo 8d6ae384be move configuration init stuff in its own function 2021-01-24 10:39:48 +00:00
Omar Polo 7b31a6386d test CGI with big files 2021-01-24 10:24:34 +00:00
Omar Polo 28ec617809 sync the CGI environment with the manpage
while there also add SERVER_PROTOCOL
2021-01-24 10:06:48 +00:00
Omar Polo ba7b2faa86 sync 2021-01-24 09:55:19 +00:00
Omar Polo 07b0a14218 void-ify some functions
their return value is no longer used, it's only confusing at this point.
2021-01-24 09:54:44 +00:00
Omar Polo 0baf6bed2a pass the fd, not the path! 2021-01-24 09:53:54 +00:00
Omar Polo a87f662565 refactoring state management
instead of having a flag to discern between two different behaviours
in S_SENDING, split that state into S_SENDING_FILE and S_SENDING_CGI
(this will also make it easier in the future to add other sending
states).  While there, also get rid of `goodbye' and make start_reply
advance the state machine by itself.
2021-01-24 09:49:09 +00:00
Omar Polo a7b9bb4d24 specify in which directory CGI scripts are executed 2021-01-24 09:20:38 +00:00
Omar Polo 05748e49fe chdir to the vhost root before exec'ing the CGI script 2021-01-24 09:15:05 +00:00
Omar Polo e7a2a99b5a added index option 2021-01-24 09:14:01 +00:00
Omar Polo 9adde3d8b2 reuse the same buffer for the request and response 2021-01-23 17:45:56 +00:00
Omar Polo 6cdecad88d fix test portability
wc return 2048 on fedora (it doesn't count the trailing \n), while on
OpenBSD, Void linux on aarch64 and Alpine linux on vmd(8) returns
2049.
2021-01-23 17:44:23 +00:00
Omar Polo f62aab517d handle TLS_WANT_POLL{IN,OUT}
libtls doesn't seem to return when doing blocking I/O, but libretls
does every single time.
2021-01-23 17:43:04 +00:00
Omar Polo 2349b02b26 bump the key size a little
on fedora with libretls (running on top of openssl) it won't open the
key otherwise.
2021-01-23 17:42:04 +00:00
Omar Polo c6b9ddecf6 gg may need some compat 2021-01-23 17:39:12 +00:00
Omar Polo ce06cdc5bd drop gg.py 2021-01-23 17:11:16 +00:00
Omar Polo 31a4993a94 use gg instead of gg.py for the regression suite 2021-01-23 17:10:00 +00:00
Omar Polo d760973a5b don't alter the struct iri 2021-01-23 17:07:52 +00:00
Omar Polo 497977d501 add gg, a barebones Gemini client 2021-01-23 16:56:24 +00:00
Omar Polo 3309ef975c accumulate the whole response line for CGI scripts 2021-01-23 15:32:38 +00:00
Omar Polo 45b4aa6e57 fix local libretls example 2021-01-23 12:22:09 +00:00
Omar Polo 1a49166de4 fix date 2021-01-23 11:29:02 +00:00
Omar Polo e29dbd7217 added missic copyright notice 2021-01-23 11:28:44 +00:00
Omar Polo 7f740a1440 typo 2021-01-22 17:54:37 +00:00
Omar Polo e0e15c30d7 simplify glob for pem 2021-01-22 17:41:12 +00:00
Omar Polo dd8cc7d3ce mention testing in readme 2021-01-22 17:28:39 +00:00
Omar Polo c421bd46ed drop genbigfile 2021-01-22 17:24:33 +00:00
Omar Polo 609fc9f9d9 use a c program to fill the file
it's several order of magnitude faster than the equivalent shell script
2021-01-22 17:18:55 +00:00