This page is about Caddy 1 and will stay here forever.

User Guide

Detecting HTTPS Interception

Caddy has the ability to detect certain Man-in-the-Middle (MITM) attacks on HTTPS connections that may otherwise be invisible to the browser and the end user. This means Caddy can determine whether it is "likely" or "unlikely" that a TLS proxy is actively intercepting an HTTPS connection.

This Connection
It seems likely that your connection is actively being intercepted by a TLS proxy. Your connection is probably NOT private! (Read the rest of this page to learn about possible false positives.)
Phew! It looks like your connection to this website is not being intercepted. (Read the rest of this page to learn about possible false negatives.)
Your connection is not over HTTPS, so Caddy cannot detect if there is a Man-in-the-Middle, although without encryption there probably is one.

All incoming HTTPS connections are automatically checked for tampering using techniques described by Durumeric, Halderman, et. al. in their NDSS '17 paper. The results of the inspection are exposed in various ways throughout Caddy so you can choose how to handle a suspected MITM attack on your clients. (Keep in mind that many TLS proxies take the form of "benevolent" antivirus or firewall products.)

TLS connections that are being intercepted are NOT secure, despite software vendor advertisements to the contrary. The degree to which you respond to a suspected MITM attack is up to you and depends on the nature of your site, your audience, and political circumstances. You might respond to suspected HTTPS interception in any of these ways (in order of increasing ostentatiousness):

Please read this entire page before implementing any measures that might be considered extreme.


The Caddy authors, maintainers, and contributors will make a good-faith attempt to keep this feature working correctly with commonly-used versions of mainstream browsers, but cannot guarantee perfect accuracy. This feature relies on hard-coded heuristics that attempt to identify browsers from the TLS handshake. Browser and OS updates may render the heuristics obsolete at any time. The Caddy developers are not responsible for any damages, costs, miscommunications, or misunderstandings, or other consequences that may result from using this feature. Use with wisdom and at your own risk.

Supported Clients

Caddy is programmed to protect recent versions of Chrome, Firefox, IE/Edge, and Safari. Bleeding-edge development versions of these browsers may not yet be recognized (let us know if they're not!). We also experimentally attempt to recognize and support the Tor browser.

False Positives

Caddy may, on occasion, incorrectly flag a connection as "likely" intercepted even if it is not. This usually happens when clients spoof their User-Agent string. For the best possible protection, we recommend that users do not change their User-Agent header and that site owners keep Caddy updated.

It is also possible that there is a browser/platform combination that is not yet considered. To report a false positive, please file an issue with your real, unmodified User-Agent string, browser version, OS/platform details, the raw ClientHello bytes, and any other relevant build information. You must also be certain that your connection was made on a trusted network that is NOT being firewalled or proxied and that all OS "security" products are completely disabled on your machine and the local network. (You must convince us that the connection was actually secure, and we have to be able to reproduce your report.)

False Negatives

When HTTPS interception is occurring but Caddy is not able to detect it (an "unlikely" classification), there could be a number of reasons. From least to most ominous:

Caddy's MITM detection features work mainly because TLS proxies are implemented carelessly, documented poorly, and updated sparingly.