环境:Go 1.14+

  1. 下载caddy存储库:
git clone "https://github.com/caddyserver/caddy.git"
  1. 下载xcaddy:
wget https://github.com/caddyserver/xcaddy/releases/download/v0.1.5/xcaddy_0.1.5_linux_amd64.tar.gz
tar -zxvf xcaddy_0.1.5_linux_amd64.tar.gz
  1. 编译caddy:
./xcaddy build

添加插件进行编译(这里举例添加caddy的cf与ntlm-transport插件):

xcaddy build \
    --with github.com/caddy-dns/cloudflare
    --with github.com/caddyserver/ntlm-transport@v0.1.1
@可以指定版本号,版本号可以是标签名称或SHA。

完成!

Last modification:November 21, 2020