1. install golang as here

  2. get forwardproxy with naïve fork ( naïve standalone version here )
    git clone -b naive https://github.com/klzgrad/forwardproxy
    
  3. get caddy2 custom build tool xcaddy
    go get -u github.com/caddyserver/xcaddy/cmd/xcaddy
    
  4. compile caddy with module (with naive forwardproxy + dns cloudflare)
    ~/go/bin/xcaddy build --with github.com/caddyserver/forwardproxy=$PWD/forwardproxy --with github.com/caddy-dns/cloudflare
    
  5. caddy is located pwd
    ./caddy version
    ./caddy list-modules
    which caddy
    mv ./caddy /usr/bin/caddy
    

here - https://github.com/bibugo/caddy2-with-cloudflare-naive/releases