aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd
AgeCommit message (Collapse)Author
2024-10-30cmd: Allow `add-package` to select version of package (#6665)Lucas VerÍssimo Botelho
* feat: allow versioning of packages * docs: remove xcaddy issue reference
2024-10-02ci: install xcaddy to fix release flow (#6602)v2.9.0-beta.2Mohammed Al Sahaf
2024-10-01cmd: Better error handling when reloading (#6601)Matt Holt
* caddyhttp: Limit auto-HTTPS error logs to 100 domains * Improve error message and increase error size limit
2024-09-30core: Implement socket activation listeners (#6573)Aaron Paterson
* caddy adapt for listen_protocols * adapt listen_socket * allow multiple listen sockets for port ranges and readd socket fd listen logic * readd logic to start servers according to listener protocols * gofmt * adapt caddytest * gosec * fmt and rename listen to listenWithSocket * fmt and rename listen to listenWithSocket * more consistent error msg * non unix listenReusableWithSocketFile * remove unused func * doc comment typo * nonosec * commit * doc comments * more doc comments * comment was misleading, cardinality did not change * addressesWithProtocols * update test * fd/ and fdgram/ * rm addr * actually write... * i guess we doin' "skip": now * wrong var in placeholder * wrong var in placeholder II * update param name in comment * dont save nil file pointers * windows * key -> parsedKey * osx * multiple default_bind with protocols * check for h1 and h2 listener netw
2024-08-27tls: use Go default kex for the moment that include PQC (#6542)Bas Westerbaan
By default Go 1.23 enables X25519Kyber768, a post-quantum key agreement method that is enabled by default on Chrome. Go 1.23 does not expose the CurveID, so we cannot add it by specifying it in CurvePreferences. The reason is that X25519Kyber768 is a preliminary key agreement that will be supplanted by X25519MLKEM768. For the moment there is value in enabling it. A consequence of this is that by default Caddy will enable support for P-384 and P-521. This PR also removes the special code to add support for X25519Kyber768 via the Cloudflare Go branch. Cf #6540
2024-08-22cmd: Use a factory to create the caddy root command (#6533)a
Co-authored-by: Francis Lavoie <[email protected]>
2024-08-12cmd: ignore exec.ErrDot when starting caddy in background (#6512)WeidiDeng
Co-authored-by: Mohammed Al Sahaf <[email protected]>
2024-06-05cmd: remove zealous check of Caddyfile auto-detection (#6370)Mohammed Al Sahaf
* cmd: remove zealous check of Caddyfile auto-detection * add test case * remove redundant check, add comment * one more case
2024-06-02cmd: fix regression in auto-detect of Caddyfile (#6362)v2.8.4Mohammed Al Sahaf
* cmd: fix regression in auto-detect of Caddyfile Signed-off-by: Mohammed Al Sahaf <[email protected]> * fix typo Co-authored-by: Git'Fellow <[email protected]> * add tests * address review comments --------- Signed-off-by: Mohammed Al Sahaf <[email protected]> Co-authored-by: Git'Fellow <[email protected]>
2024-06-02cmd: fix auto-detetction of .caddyfile extension (#6356)v2.8.3v2.8.2Mohammed Al Sahaf
* cmd: fix auto-detetction of .caddyfile extension Signed-off-by: Mohammed Al Sahaf <[email protected]> * move conditions around and add clarifying comment Signed-off-by: Mohammed Al Sahaf <[email protected]> * reject ambiguous config file name Signed-off-by: Mohammed Al Sahaf <[email protected]> --------- Signed-off-by: Mohammed Al Sahaf <[email protected]>
2024-04-24caddyhttp: Address some Go 1.20 features (#6252)Matt Holt
Co-authored-by: Francis Lavoie <[email protected]>
2024-04-18cmd: Only validate config is proper JSON if config slice has data (#6250)Mohammed Al Sahaf
* cmd: fix error when running without config * ci: add smoke test
2024-04-13caddytls: Upgrade ACMEz to v2; support ZeroSSL API; various fixes (#6229)Matt Holt
* WIP: acmez v2, CertMagic, and ZeroSSL issuer upgrades * caddytls: ZeroSSLIssuer now uses ZeroSSL API instead of ACME * Fix go.mod * caddytls: Fix automation related to managers (fix #6060) * Fix typo (appease linter) * Fix HTTP validation with ZeroSSL API
2024-04-11cmd: Fix panic related to config filename (fix #5919)Matthew Holt
2024-04-11cmd: Assume Caddyfile based on filename prefix and suffix (#5919)Omar Hussein
This can be helpful if editors only consider file extensions for certain features. * added special case support for caddyfile suffix, case insensitive * Update cmd/main.go Co-authored-by: Matt Holt <[email protected]> * skip caddyfile adapter for registered file extensions --------- Co-authored-by: Matt Holt <[email protected]>
2024-03-05cmd: Adjust config load logs/errors (#6032)Francis Lavoie
* cmd: Adjust config load logs/errors * Update cmd/main.go Co-authored-by: Matt Holt <[email protected]> --------- Co-authored-by: Matt Holt <[email protected]>
2024-03-01cmd: fix the output of the `Usage` section (#6138)Mohammed Al Sahaf
2024-01-31Update comment in setcap helper scriptMatthew Holt
2024-01-19refactor: move automaxprocs init in caddycmd.Main()Kévin Dunglas
2024-01-02chore: check against errors of `io/fs` instead of `os` (#6011)Mohammed Al Sahaf
* chore: replace `os.ErrNotExist` with `fs.ErrNotExist` * check against permission error from `io/fs` package
2023-12-18cmd: use automaxprocs for better perf in containers (#5711)Kévin Dunglas
* feat: use automaxprocs for better perf in containers * better logs * cs
2023-12-13cmd: Preserve LastModified date when exporting storage (#5968)Jens-Uwe Mager
2023-10-16cmd: Add newline character to version string in CLI output (#5895)Thanmay Nath
2023-10-13cmd: upgrade: resolve symlink of the executable (#5891)Mohammed Al Sahaf
2023-10-11cmd: Fix exiting with custom status code, add `caddy -v` (#5874)Francis Lavoie
* Simplify variables for commands * Add --envfile support for adapt command * Carry custom status code for commands to os.Exit() * cmd: add `-v` and `--version` to root caddy command * Add `--envfile` to `caddy environ`, extract flag parsing to func --------- Co-authored-by: Mohammed Al Sahaf <[email protected]>
2023-09-07cmd: Prevent overwriting existing env vars with `--envfile` (#5803)Evan Van Dam
Co-authored-by: Francis Lavoie <[email protected]>
2023-08-14ci: use gci linter (#5708)Jacob Gadikian
* use gofmput to format code * use gci to format imports * reconfigure gci * linter autofixes * rearrange imports a little * export GOOS=windows golangci-lint run ./... --fix
2023-08-09cmd: Require config for caddy validate (fix #5612) (#5614)pistasjis
* Require config for caddy validate - fixes #5612 Signed-off-by: Pistasj <[email protected]> * Try making adjacent Caddyfile check its own function Signed-off-by: Pistasj <[email protected]> * add Francis' suggestion Co-authored-by: Francis Lavoie <[email protected]> * Refactor * Fix borked commit, sigh --------- Signed-off-by: Pistasj <[email protected]> Co-authored-by: Francis Lavoie <[email protected]> Co-authored-by: Matthew Holt <[email protected]>
2023-08-07ci: Use gofumpt to format code (#5707)Jacob Gadikian
2023-08-06cmd: Split unix sockets for admin endpoint addresses (#5696)Emily
* cmd: fix cli when admin endpoint uses new unix socket permission format Fixes a bug where the following Caddyfile ```Caddyfile { admin unix/admin.sock|0660 } ``` and `caddy reload --config Caddyfile` would throw the following error instead of reloading it: ``` INFO using provided configuration {"config_file": "Caddyfile", "config_adapter": ""} Error: sending configuration to instance: performing request: Post "http://127.0.0.1/load": dial unix admin.sock|0660: connect: no such file or directory [ERROR] exit status 1 ``` --- This bug also affected `caddy start` and `caddy stop`. * Move splitter function to internal --------- Co-authored-by: Matthew Holt <[email protected]>
2023-08-02core: Allow loopback hosts for admin endpoint (fix #5650) (#5664)Matt Holt
2023-06-02cmd: Implement storage import/export (#5532)Cass C
* cmd: Implement 'storage import' and 'storage export' CLI commands. These commands use the certmagic.Storage interface. In particular, storage implementations should ensure that their List() functions correctly enumerate all keys when called with an empty prefix and recursive == true. Also, Stat() calls on keys holding values instead of nested keys are expected to set KeyInfo.IsTerminal = true. * remove errors.Join
2023-05-17cmd: Avoid spammy log messages (fix #5538)Matthew Holt
I forgot there are two calls to LoadConfig() here that needed replacing.
2023-05-12cmd: Reduce spammy logs from --watchMatthew Holt
2023-05-08feature: watch include directory (#5521)Yehonatan Ezron
Co-authored-by: Matt Holt <[email protected]>
2023-04-10cmd: Support `'` quotes in envfile parsing (#5437)Matt Holt
2023-04-03cmd: Create pidfile before config load (close #5477)Matthew Holt
2023-02-24cmd: Expand cobra support, add short flags (#5379)Francis Lavoie
* cmd: Expand cobra support * Convert commands to cobra, add short flags * Fix version command typo Co-authored-by: Emily Lange <[email protected]> * Apply suggestions from code review Co-authored-by: Matt Holt <[email protected]> --------- Co-authored-by: Emily Lange <[email protected]> Co-authored-by: Matt Holt <[email protected]>
2023-02-22cmd: Strict unmarshal for validate (#5383)Francis Lavoie
2023-02-16cmd: make `caddy fmt` hints more clear (#5378)Emily Lange
2023-02-16cmd: Adjust documentation for commands (#5377)Francis Lavoie
2023-01-31cmd: Add `--envfile` flag to `validate` command (#5350)Amis Shokoohi
Fixes https://github.com/caddyserver/caddy/issues/5346
2023-01-31cmd: `fmt` exit successfully after overwriting config file (#5351)Amis Shokoohi
Fixes https://github.com/caddyserver/caddy/issues/5349
2023-01-21cmd: `caddy fmt` return code is 1 if not formatted (#5297)Y.Horie
* cmd: Fix caddy fmt if input isn't formatted * Fixes #5294 * return exit 1 with an error message * cmd: Use formattingDifference for caddy fmt * #5294 * expose caddyfile.formattingDifference
2023-01-21chore: Fix typo, coral -> cobra (#5325)Y.Horie
2022-11-14reverseproxy: Mask the WS close message when we're the client (#5199)Francis Lavoie
* reverseproxy: Mask the WS close message when we're the client * weakrand * Bump golangci-lint version so path ignores work on Windows * gofmt * ugh, gofmt everything, I guess
2022-10-25cmd: replace deprecate func use (#5170)Mohammed Al Sahaf
2022-10-17cmd: Add missing `\n` to HelpTemplate (#5151)BakaFT
2022-09-14cmd: Improve error message if config missingMatthew Holt
2022-09-13cmd: Customizable user agent (close #2795)Matthew Holt