The Polipo configuration that is shipped with the Tor Browser Bundle filters a specific set of headers in requests. By testing for this behavior, the local proxy can be determined.