- 13 Feb, 2018 1 commit
-
-
Matthew Holt authored
Also introduce caddy.OnProcessExit which is a list of functions that run before exiting the process cleanly; these do not count as shutdown callbacks, so they do not return errors and must execute quickly.
-
- 04 Feb, 2018 1 commit
-
-
Matthew Holt authored
- Expose the list of Caddy instances through caddy.Instances() - Added arbitrary storage to caddy.Instance - The cache of loaded certificates is no longer global; now scoped per-instance, meaning upon reload (like SIGUSR1) the old cert cache will be discarded entirely, whereas before, aggressively reloading config that added and removed lots of sites would cause unnecessary build-up in the cache over time. - Key certificates in the cache by their SHA-256 hash instead of by their names. This means certificates will not be duplicated in memory (within each instance), making Caddy much more memory-efficient for large-scale deployments with thousands of sites sharing certs. - Perform name-to-certificate lookups scoped per caddytls.Config instead of a single global lookup. This prevents certificates from stepping on each other when they overlap in their names. - Do not allow TLS configurations keyed by the same hostname to be different; this now throws an error. - Updated relevant tests, with a stark awareness that more tests are needed. - Change the NewContext function signature to include an *Instance. - Strongly recommend (basically require) use of caddytls.NewConfig() to create a new *caddytls.Config, to ensure pointers to the instance certificate cache are initialized properly. - Update the TLS-SNI challenge solver (even though TLS-SNI is disabled currently on the CA side). Store temporary challenge cert in instance cache, but do so directly by the ACME challenge name, not the hash. Modified the getCertificate function to check the cache directly for a name match if one isn't found otherwise. This will allow any caddytls.Config to be able to help solve a TLS-SNI challenge, with one extra side-effect that might actually be kind of interesting (and useless): clients could send a certificate's hash as the SNI and Caddy would be able to serve that certificate for the handshake. - Do not attempt to match a "default" (random) certificate when SNI is present but unrecognized; return no certificate so a TLS alert happens instead. - Store an Instance in the list of instances even while the instance is still starting up (this allows access to the cert cache for performing renewals at startup, etc). Will be removed from list again if instance startup fails. - Laid groundwork for ACMEv2 and Let's Encrypt wildcard support. Server type plugins will need to be updated slightly to accommodate minor adjustments to their API (like passing in an Instance). This commit includes the changes for the HTTP server. Certain Caddyfile configurations might error out with this change, if they configured different TLS settings for the same hostname. This change trades some complexity for other complexity, but ultimately this new complexity is more correct and robust than earlier logic. Fixes #1991 Fixes #1994 Fixes #1303
-
- 07 Jan, 2018 1 commit
-
-
Toby Allen authored
-
- 23 Dec, 2017 1 commit
-
-
Toby Allen authored
* First working mask * IP Mask working with defaults and empty * add tests for ipmask * Store Mask as setup, some tidying, cleaner flow * Prevent mask from running when directive not present * use custom replacement to store masked ip
-
- 17 Dec, 2017 1 commit
-
-
magikstm authored
-
- 13 Nov, 2017 2 commits
-
-
Craig Peterson authored
Caddyfile snippets
-
Craig Peterson authored
-
- 07 Nov, 2017 2 commits
-
-
Aaron Taylor authored
This allows custom replacements to be defined in a way that propagates throughout all plugins.
-
insomniac authored
* Checking that a server listener is not nil before printing verbose information * Improved readability of a loop
-
- 06 Nov, 2017 2 commits
-
-
Mohammad Gufran authored
-
Mohammad Gufran authored
* Simplify parseUpstream function * Add SRV support for proxy upstream
-
- 05 Nov, 2017 1 commit
-
-
Toby Allen authored
-
- 04 Nov, 2017 3 commits
-
-
Tw authored
Signed-off-by: Tw <tw19881113@gmail.com>
-
Toby Allen authored
-
Kevin Stock authored
This adds the ask sub-directive to tls that defines the URL of a backend HTTP service to be queried during the TLS handshake to determine if an on-demand TLS certificate should be acquired for incoming hostnames. When the ask sub-directive is defined, Caddy will query the URL for permission to acquire a cert by making a HTTP GET request to the URL including the requested domain in the query string. If the backend service returns a 2xx response Caddy will acquire a cert. Any other response code (including 3xx redirects) are be considered a rejection and the certificate will not be acquired.
-
- 02 Nov, 2017 1 commit
-
-
Sayem Chowdhury authored
* Update build instruction This changes add proper an easy instruction for building. * Update README.md
-
- 01 Nov, 2017 2 commits
-
-
Craig Peterson authored
-
Craig Peterson authored
-
- 31 Oct, 2017 3 commits
-
-
frk authored
The rc.subr framework already takes care of substituting user. So, using daemon's -u option is double user-substitution and fails if $caddy_user is non-root.
-
Arthur Silva authored
-
Arthur Silva authored
caddy.go:569: could be simplified sigtrap_posix.go:87: value of inst is never used upgrade.go:151: should omit nil check; len() for nil slices is defined as zero
-
- 29 Oct, 2017 1 commit
-
-
Mohammed Al Sahaf authored
-
- 22 Oct, 2017 2 commits
-
-
elcore authored
-
Toby Allen authored
Changes the log output of on startup
-
- 20 Oct, 2017 1 commit
-
-
Craig Peterson authored
-
- 19 Oct, 2017 5 commits
-
-
Craig Peterson authored
-
Craig Peterson authored
-
elcore authored
-
Craig Peterson authored
-
Craig Peterson authored
-
- 16 Oct, 2017 3 commits
-
-
Matthew Holt authored
-
Alex Gaynor authored
* Handle the case of an OCSP responder certificate expiring before an OCSP response it issued * oops * doh, gofmt
-
Matthew Holt authored
-
- 15 Oct, 2017 1 commit
-
-
Craig Peterson authored
-
- 13 Oct, 2017 3 commits
-
-
Craig Peterson authored
-
Craig Peterson authored
-
Wèi Cōngruì authored
-
- 12 Oct, 2017 2 commits
-
-
Eugene Dementiev authored
-
Guilherme Bernal authored
-
- 09 Oct, 2017 1 commit
-
-
Matthew Holt authored
-