Skip to content

Instantly share code, notes, and snippets.

@xbot
Last active May 23, 2025 02:39
Show Gist options
  • Select an option

  • Save xbot/27040ca35b7763f28403b2242efa3751 to your computer and use it in GitHub Desktop.

Select an option

Save xbot/27040ca35b7763f28403b2242efa3751 to your computer and use it in GitHub Desktop.
A Caddyfile indicating the configurations for subdomains of a wildcard domain and the HTTPS certificate setup with DNS challenge.
*.lab.mydomain.com {
tls {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
}
@bt host bt.lab.mydomain.com
handle @bt {
reverse_proxy bt:8759
}
@bitwarden host bitwarden.lab.mydomain.com
handle @bitwarden {
encode gzip
reverse_proxy /notifications/hub/negotiate nas:7777
reverse_proxy /notifications/hub nas:3012
reverse_proxy nas:7777
}
@pve host pve.lab.mydomain.com
handle @pve {
reverse_proxy https://pve:8006 {
transport http {
tls_insecure_skip_verify
}
}
}
}
@toyo2333
Copy link

请问下作者,这个这些个 *.lab.mydomain.com 最终是通过什么进行外网访问的呢? Cloudflare Zero Trust 那个隧道么?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment