Caddy

本頁使用了標題或全文手工轉換
維基百科,自由的百科全書
Caddy
原作者Matthew Holt
首次釋出2015年4月28日,​9年前​(2015-04-28
目前版本
  • 2.7.6 (2023年12月8日;穩定版本)[1]
編輯維基數據連結
原始碼庫 編輯維基數據連結
程式語言Go
作業系統AndroidBSD variantsLinuxOS XWindows
類型Web伺服器, 反向代理伺服器
特許條款Apache特許條款2.0
網站官方網站 在維基數據上編輯此內容

Caddy伺服器(或稱Caddy Web)是一個開源的,使用 Golang 編寫,支援 HTTP/2 的 Web 伺服器端。它使用 Golang 標準庫提供 HTTP 功能。

Caddy 一個顯著的特性是預設啟用 HTTPS[2][3]它是第一個無需額外組態即可提供 HTTPS 特性的 Web 伺服器。[4]

作者 Matt Holt 於 2014 年 12 月開始開發 Caddy ,並於 2015 年 4 月釋出第一個版本。[5] 在釋出後的一年裏,它的下載量超過了 20000 次,並在 GitHub 上獲得了 4500 個 Star。[6]

Caddy 支援各種 Web 技術,提供靜態編譯的二進制檔案,支援 i386amd64ARM 架構上的 WindowsMacLinuxAndroidBSD 作業系統。

功能

Caddy 可以提供各種網站技術,它也可以作為反向代理和負載均衡器。Caddy 的大部分功能都以中介軟體的形式實現,並通過 Caddyfile 中的指令(用於組態 Caddy 的文字檔案)進行控制。[7]

安全

Caddy 免於很多已知的 CVEs 攻擊 (包括 Heartbleed, DROWN, POODLE, 和 BEAST[12],另外, Caddy 使用 TLS_FALLBACK_SCSV 以防止協定降級攻擊。

2015 年 6 月 2 日,版本 0.7.1 修復了 Caddy 簡單伺服器鑒權中介軟體中時間欺詐攻擊的漏洞。[13]

關於協定和密碼套件,Caddy 使用 TLS 1.0-1.2,並且傾向於 ECDHE ECDSA 與 AES256-GCM-SHA384,支援十幾種不同的加密方式。Cloudflare 已經使用了 Caddy 作為 TLS 1.3 的實現方案。[14]

傳統的特權降級無法工作在 Golang 程式上。[15] 為了繫結低於 1024 的埠, Caddy 必須使用 root 帳戶執行 (不建議) 或通過 setcap 給予低位埠使用權限 (建議的) 。 並且,在將來的版本中會嘗試使用非特級子行程執行。[16]

Caddy 沒有自動啟動 HTTP Strict Transport Security,推薦通過 Caddy 的 header 組態啟用 HSTS。[17]

自動簽發 HTTPS

Caddy 預設通過檢查域名來啟用 HTTPS (通過 ACME protocol 檢查域名並簽發證書), 並且重新導向 HTTP 請求到 HTTPS。[18] 它在啟動期間根據需要簽發證書,並在伺服器的使用期間自動重簽發。 Let's Encrypt 是預設的證書頒發機構,但用戶可以自訂所使用的 ACME CA,這在測試組態時是必要的。在 2016 年第一季度, 有百分之二的 Let's Encrypt 證書是由 Caddy 簽發的。

一個可選的組態允許 Caddy 在需要時簽發一個證書 "按需 TLS"[19] 使用這種方案時,用戶必須指定可通過該方案組態的證書數量。 當 Caddy 收到一個沒有組態證書的請求時, 它會自動通過 ACME 簽發並組態, 然後將證書儲存於記憶體和硬碟。 這個過程通常需要幾秒鐘的時間,並且受到限制。

當使用 TLS, Caddy 會自動切換對談金鑰以保證安全性。[20]

參考資料

  1. ^ Release v2.7.6. 2023年12月13日 [2023年12月8日]. 
  2. ^ Johnson, Brad. A Better Web Server with Free SSL. 23 February 2016 [5 March 2016]. (原始內容存檔於2017-08-02). 
  3. ^ Automatic HTTPS with Caddy Server. 18 December 2015 [5 March 2016]. (原始內容存檔於2017-08-02). 
  4. ^ Dmitry Chestnykh [@dchest]. Caddy is the first general-purpose web server to default to HTTPS without user intervention (using Let's Encrypt) (推文). 17 December 2015 –透過Twitter. 
  5. ^ Show HN: Caddy, a cross-platform HTTP/2 web server. 28 April 2015 [2017-04-03]. (原始內容存檔於2017-04-22). 
  6. ^ Is Caddy Free?. [2017-04-03]. (原始內容存檔於2017-04-22). 
  7. ^ The Caddyfile. [29 February 2016]. (原始內容存檔於2017-04-20). 
  8. ^ tls - Caddy Directives. [8 March 2016]. (原始內容存檔於2017-03-17). 
  9. ^ Benedetti, Benoit. Caddy, Le Serveur Web Facile [Caddy, The Easy Web Server]. GNU/Linux Magazine France (France). November 2015 (法語). 
  10. ^ How to Setup the Caddy Web Server with php-fpm. [2017-04-03]. (原始內容存檔於2017-08-18). 
  11. ^ Beke, Mathias. Caddy Server and WordPress (PHP-FPM). 21 August 2015 [2017-04-03]. (原始內容存檔於2016-05-03). 
  12. ^ SSL Server Test: caddyserver.com (Powered by Qualys SSL Labs). [5 March 2016]. (原始內容存檔於2021-04-10). 
  13. ^ Release 0.7.1 · mholt/caddy. 2 June 2015 [2017-04-03]. (原始內容存檔於2019-02-15). 
  14. ^ Nick Sullivan [@grittygrease]. It's built in Go using custom versions @rlbarnes's Mint and @mholt6's Caddy (推文). 4 Mar 2016 –透過Twitter. 
  15. ^ syscall: Setuid/Setgid doesn't apply to all threads on Linux. 21 January 2011 [5 March 2016]. (原始內容存檔於2018-02-07). 
  16. ^ Implement privilege de-escalation. 21 January 2016 [2017-04-03]. (原始內容存檔於2017-04-22). 
  17. ^ HTTP Strict Transport Security. [8 March 2016]. (原始內容存檔於2017-04-26). 
  18. ^ Automatic HTTPS. [5 March 2016]. (原始內容存檔於2017-03-17). 
  19. ^ On-Demand TLS. [5 March 2016]. (原始內容存檔於2017-03-17). 
  20. ^ Springall, Drew; Durumeric, Zakir; Halderman, J. Alex. Measuring the Security Harm of TLS Crypto Shortcuts. Proceedings of the 2016 ACM on Internet Measurement Conference. IMC '16 (New York, NY, USA: ACM). 2016-01-01: 33–47. ISBN 9781450345262. doi:10.1145/2987443.2987480. 

外部連結