Commits
- Commit:
b7967bc1f695126e1bf2705bfd486bbc32aaf8b0
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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.
- Commit:
593e412b4988ca8b72bb7ef9b1cc663cb1184215
- From:
- Omar Polo <op@omarpolo.com>
- Date:
allow to disable TLS when proxying requests
- Commit:
c7c8ef448bc8832998606ec217907c7dc66fec6c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add `protocols' option to `proxy' rule
- Commit:
5128c0b0e3b51737783c4c68c9e34a76ec8c8b0e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add `verifyname' option for `proxy' rule
- Commit:
7bdcc91ec70ddde092ac5d7b4f75d54915e7b221
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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.
- Commit:
bd5f79542cf6491ed9e30bca926286e3b9e2600c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
update copyright years
- Commit:
d49093c105e7e9af2638bce945374ac0036b3498
- From:
- Omar Polo <op@omarpolo.com>
- Date:
support optional client certificate for proxy rule
- Commit:
72b033ef18ae3f82922f6f11ce0f5194e95f667d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add ability to proxy requests
Add to gmid the ability to forwad a request to another gemini server and
thus acting like a reverse proxy. The current syntax for the config
file is
server "example.com" {
...
proxy relay-to host:port
}
Further options (like the use of custom certificates) are planned.
cf. github issue #7
- Commit:
054387bb26e75cef12e8dc0f531e7ee42614edd7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move struct iri and parser at the top of the file
- Commit:
ff05125eb81e5bbf2cf05b8434d03bce584936e0
- From:
- Stephen Gregoratto <dev@sgregoratto.me>
- Via:
- omar-polo <op@omarpolo.com>
- Date:
Implement OCSP stapling support
Currently dogfooding this patch at gemini.sgregoratto.me. To test,
run the following command and look for the "OCSP response" header:
openssl s_client -connect "gemini.sgregoratto.me:1965" -status
- Commit:
f0a01fc742e83b3f4736b5d64af3ab18148afc5a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
two -n to dump the parsed configuration
This adds a barebone dumping of the parsed configuration. It is not
complete, but I'm interested in dumping the full path to `cert' and
`key' in order to write some scripts that can inspect the
configuration, extract the certificates and renew them when expired
automatically.
It's not easy to parse gmid configuration otherwise because the syntax
is flexible and users can use macros. Instead, the idea is to run
gmid and let it dump the configuration once it's been parsed in a
static and predictable format.
Now is possible to parse gmid configuration with, say, awk or perl.
- Commit:
492a274fd712e4589669254be327897868e44812
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add compat for sys/tree.h
- Commit:
207b3e80d867693ff74cf99c84f7dd41386adba1
- From:
- Omar Polo <op@omarpolo.com>
- Date:
Store clients inside a splay tree
From day one we've been using a static array of client struct to hold
the clients data. This has variuos drawbacks, among which:
* reuse of the storage ("shades of heartbleed")
* maximum fixed amount of clients connected at the same time
* bugs are harder to debug
The last point in particular is important because if we mess the client
ids, or try to execute some functions (e.g. the various fcgi_*) after a
client has been disconnected, it's harder to "see" this "use after
free"-tier kind of bug.
Now I'm using a splay tree to hold the data about the live connections.
Each client' data is managed by malloc. If we try to access a client
data after the disconnection we'll probably crash with a SIGSEGV and
find the bug is more easy.
Performance-wise the connection phase should be faster since we don't
have to loop anymore to find an empty spot in the clients array, but
some operations could be slightly slower (compare the O(1) access in an
array with a SPLAY_FIND operation -- still be faster than O(n) thought.)
- Commit:
4cd25209651f224be8c34d6006ef689963ce37d5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
one FastCGI connection per client
FastCGI is designed to multiplex requests over a single connection, so
ideally the server can open only one connection per worker to the
FastCGI application and that's that.
Doing this kind of multiplexing makes the code harder to follow and
easier to break/leak etc on the gmid side however. OpenBSD' httpd
seems to open one connection per client, so why can't we too?
One connection per request is still way better (lighter) than using
CGI, and we can avoid all the pitfalls of the multiplexing (keeping
track of "live ids", properly shut down etc...)
- Commit:
efb6210d7745c9466ab9a16f23d1549523428ef7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
improve libevent2 handling
* add configure check
* change the way the headers are required (copied from tmux)