Omar Polo
13ed2fb63f
improve configuration parsing error
2021-01-27 16:45:45 +00:00
Omar Polo
40dc608f1f
adjust CFLAGS detection
2021-01-27 16:05:55 +00:00
Omar Polo
fe5967cd02
const-ify strings in struct location
2021-01-27 15:53:30 +00:00
Omar Polo
0cd6675437
compiler warnings
2021-01-27 15:41:33 +00:00
Omar Polo
b736ca35f2
drop unused variable
2021-01-27 15:35:55 +00:00
Omar Polo
44ee1bac8b
use starts_with in puny.c
2021-01-27 15:35:09 +00:00
Omar Polo
22c6d6334d
log info about SNI, punycode and matched vhost
2021-01-27 15:06:15 +00:00
Omar Polo
caad03081b
some null checks
2021-01-27 15:05:50 +00:00
Omar Polo
c4f682f855
trim_req_iri: set error string
2021-01-27 15:05:16 +00:00
Omar Polo
72bbed9136
make configless mode works again. also accept every host
2021-01-27 15:00:55 +00:00
Omar Polo
58173ca20e
customizable servname & verbose + misc tweaks
...
* add -H for explicit servname (for SNI)
* add -v to print also the request
* misc tweaks: move *flag variables to global scope (initialisation to
0 for free!) and explicit handshake.
2021-01-27 14:48:23 +00:00
Omar Polo
286c4f40a5
readme tweaks
...
fix features list and talk about I18N
2021-01-27 14:42:40 +00:00
Omar Polo
46af8c6cfe
drop the daemon config in favour of the -f flag
...
Now it daemonize by default when running with a config, unless the -f
flag is given.
2021-01-27 12:04:37 +00:00
Omar Polo
7957cbd9aa
const-ify puny_decode (and add puny.c)
2021-01-27 11:21:23 +00:00
Omar Polo
42650adec0
sync deps and sandbox info
2021-01-27 10:52:37 +00:00
Omar Polo
909ea500a4
typo
2021-01-27 10:52:11 +00:00
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