Caddy v2 greatly simplifies things for proxying websockets. The dumb rewrite hack is no longer necessary because request matchers handle it perfectly. Caddy is _by far_ the simplest and easiest solution for proxying websockets like this.
the encrypted property was removed in favor of forceTLS one, officially on pusher-js 6.