相比較於之前的Nginx,Caddy是一個更加輕量級,安裝更加方便,配置超級簡單的web server,支持自動申請lets encrypt證書
本文注重於caddy,bbr以及其他內容可以參見之前的文章
Caddy
下載安裝
curl https://getcaddy.com | bash -s personal http.forwardproxy,http.proxyprotocol
CentOS的話請輸入一下命令
curl -s https://raw.githubusercontent.com/GEM7/My_scripts/master/caddy/caddy.service -o /etc/systemd/system/caddy.service
配置
配置真心超級簡單,如果需要使用自己的證書,比如CF的證書,請將證書和私鑰保存本地,在配置文件中引用即可。
你的域名:443 {
root /www
gzip
index index.html
tls 證書路徑 私鑰路徑
//如果需要自動申請的話,請移除上面這行
proxy 僞裝路徑 localhost:9999 {
websocket
header_upstream -Origin
}
}
V2Ray
V2的部分我就不廢話了,具體可以參考之前的文章
一樣的不需要配置tls部分。