Monviech / os-caddy-plugin

Caddy Plugin with GUI for OPNsense
Other
38 stars 0 forks source link

Compile Caddy Version and add to GUI: ntlm-transport (needed for Exchange Server reverse proxy) #53

Closed Monviech closed 8 months ago

Monviech commented 8 months ago

Compile Caddy Version and add to GUI: ntlm-transport (needed for Exchange Server reverse proxy)

https://github.com/caddyserver/ntlm-transport

A working handle for exchange server would look like this. This one sends all ecp requests to an invalid domain and lets the rest through.

# Reverse Proxy Domain: "0e5c4f7b-3e2e-419c-b8fe-0f6ee4737567"
*.example.com {
        tls /usr/local/etc/caddy/certificates/temp/657bfc84aa680.pem /usr/local/etc/caddy/certificates/temp/657bfc84aa680.key

        @cdd470d0-525d-4c93-b2a8-5fa4f476942f host autodiscover.example.com
        handle @cdd470d0-525d-4c93-b2a8-5fa4f476942f {
                handle /ecp* {
                        reverse_proxy blackhole:443 {
                                transport http_ntlm {
                                        tls
                                }
                        }
                }
                handle {
                        reverse_proxy autodiscover.example.com:443 {
                                transport http_ntlm {
                                        tls
                                }
                        }
                }
        }
        @a2189314-858f-4a3d-824c-3245c3652c18 host outlook.example.com
        handle @a2189314-858f-4a3d-824c-3245c3652c18 {
                handle /ecp* {
                        reverse_proxy blackhole:443 {
                                transport http_ntlm {
                                        tls
                                }
                        }
                }
                handle {
                        reverse_proxy outlook.example.com:443 {
                                transport http_ntlm {
                                        tls
                                }
                        }
                }
        }
}
Monviech commented 8 months ago

https://github.com/Monviech/os-caddy-plugin/pull/54