Commit Graph

784 Commits

Author SHA1 Message Date
Omar Polo e89f473904 s/whole/all 2022-01-27 10:37:28 +00:00
Omar Polo e0f6dc646d improve proxy error path
properly release everything when during client_close if the request
was managed by a proxy.
2022-01-27 09:55:52 +00:00
Omar Polo d28bd963c2 always mark requests as done when their code is != 20 2022-01-27 09:54:48 +00:00
Omar Polo 89efa81bcc set REQUEST_PROXY only when proxy_init is successful 2022-01-27 09:53:43 +00:00
Omar Polo b9b77f5344 fix comment 2022-01-27 09:28:27 +00:00
Omar Polo b3602923d0 shuffle the code a bit to improve readability 2022-01-13 10:34:55 +00:00
Omar Polo febfcde82b fix and sync gg usage 2022-01-13 10:13:32 +00:00
Omar Polo e2534fd11f note who requested what 2022-01-06 18:13:14 +00:00
Omar Polo 901905e0cf bail out of client_read if we've already decide what to do
libevent2 can still somehowe call client_read even in code paths
that never enable reading from the evbuffer.  Can't reproduce on
the libevent in base on OpenBSD.  It's a bit ugly, but it's a small
workaround for something that otherwise *always* make gmid crash
when linked against libevent2.  (client_read works under the
assumption that c->host != NULL, matched_proxy crashes otherwise.)
2022-01-05 18:58:01 +00:00
Omar Polo 876a417023 tweak comment 2022-01-05 18:03:47 +00:00
Omar Polo c57dc42b31 tweak a sentence 2022-01-05 17:30:50 +00:00
Omar Polo 14cee92646 some Pa -> Ar; while here drop two `The' from the start of the sentence 2022-01-04 23:22:14 +00:00
Omar Polo 7c2374af2c document `require client ca' for proxies 2022-01-04 23:17:28 +00:00
Omar Polo d474a97922 add missing prototype 2022-01-04 23:15:13 +00:00
Omar Polo ba94a608a8 add `require client ca' for proxy blocks
refactor the code that calls validate_against_ca into an helper
function to reuse it in both apply_require_ca and (optionally) in
apply_reverse_proxy.
2022-01-04 23:14:34 +00:00
Omar Polo 280fd79b8f ignore .d too 2022-01-03 18:25:27 +00:00
Omar Polo 718c0d6c71 work around freebsd' printf
printf: Illegal option -i

this is why we can't have nice things, isn't it?
2022-01-03 18:11:51 +00:00
Omar Polo 7c956fefc2 track file dependency using -MMD if available
While here, move the SRCS variable to the configure and add the
-includes in Makefile.local; it de-clutters the Makefile a bit.
2022-01-03 18:05:54 +00:00
Omar Polo 613c827165 add `gg' to the list of things to clean 2022-01-03 17:12:07 +00:00
Omar Polo 8dfacf0242 remove TAGS and compile_flags.txt from the list of default actions 2022-01-03 17:11:45 +00:00
Omar Polo 92a9f41d3d add set_proxy to simplify testing + more checks in test_proxy_with_certs 2022-01-03 13:31:34 +00:00
Omar Polo 7b7def0a8f set prefork to 1 during regress 2022-01-03 13:31:34 +00:00
Omar Polo dd208aa2cf don't print `config OK' 2022-01-03 13:31:34 +00:00
Omar Polo 6effb78141 sync changelog 2022-01-02 16:38:59 +00:00
Omar Polo 5df593f3a6 oops, wrong email address 2022-01-02 16:37:26 +00:00
Omar Polo 207dc0f9f6 sync manpage 2022-01-02 16:37:07 +00:00
Omar Polo b7967bc1f6 proxy: allow multiple proxy blocks, matching options and validations
as a side effect the order of the content of a server block is relaxed:
options, location or proxy blocks can be put in any order.
2022-01-02 16:33:28 +00:00
Omar Polo e2f167afb3 bump copyright year :) 2022-01-02 15:50:14 +00:00
Omar Polo 8e7e7cacf2 fix regress when TESTS is more than one word 2022-01-02 13:54:54 +00:00
Omar Polo e19f21f5a6 parethesize `proxy', I'm about to change the syntax 2022-01-02 13:48:32 +00:00
Omar Polo ec5c5ced4a make clean: don't clean regress, add cleanall for that 2022-01-02 11:49:48 +00:00
Omar Polo 53884ec00a document use-tls 2022-01-01 20:18:08 +00:00
Omar Polo 593e412b49 allow to disable TLS when proxying requests 2022-01-01 20:16:14 +00:00
Omar Polo 294a57275a move %token USER to its own line 2022-01-01 19:51:53 +00:00
Omar Polo ee68c36198 document the new proxy stuff 2022-01-01 19:25:07 +00:00
Omar Polo 3c4b712bb2 plug some memory leaks in config parsing
I forgot to free some strings when they're no more used.
2022-01-01 19:10:00 +00:00
Omar Polo c7c8ef448b add `protocols' option to `proxy' rule 2022-01-01 19:04:50 +00:00
Omar Polo 5128c0b0e3 add `verifyname' option for `proxy' rule 2022-01-01 18:50:10 +00:00
Omar Polo 7bdcc91ec7 simplify the proxying code
it doesn't make any sense to keep the proxying info per-location:
proxying only one per-vhost.  It can't work differently, it doesn't make
sense anyway.
2022-01-01 17:08:39 +00:00
Omar Polo bd5f79542c update copyright years 2022-01-01 16:36:17 +00:00
Omar Polo a9cb709d44 sync changelog 2022-01-01 16:34:37 +00:00
Omar Polo c064f3de1d add proxying with client certificate test 2022-01-01 16:33:44 +00:00
Omar Polo e6ab6b25fc typo 2022-01-01 16:33:44 +00:00
Omar Polo d49093c105 support optional client certificate for proxy rule 2022-01-01 16:33:44 +00:00
Omar Polo da2185f37f move proxy sub-options to their own rule and allow grouping with { ... } 2022-01-01 16:33:40 +00:00
Omar Polo cc1c8f548c sync changelog 2022-01-01 10:54:17 +00:00
Omar Polo c3eb759a79 mention the reverse proxying 2021-12-29 20:53:22 +00:00
Omar Polo 6a6b4a2a98 typo 2021-12-29 20:36:54 +00:00
Omar Polo 4b5b1e82a9 add a test for the `proxy relay-to' rule 2021-12-29 20:36:54 +00:00
Omar Polo c143dcfa85 document the `proxy relay-to' rule 2021-12-29 20:36:54 +00:00