Skip to content
AnswerWell geo Documentation

Research · 7 min read · Answerwell

Privacy Proxy Authentication, Deployment Models and Geolocation

How Privacy Proxy authenticates with PSK and Privacy Pass, chooses single-hop or double-hop deployment, and preserves geolocation via geohash headers.

This page summarises Cloudflare Privacy Proxy documentation: a managed, MASQUE-based forward proxy that hides client IP addresses from destinations while keeping regional services usable. The material below concentrates on authentication (what clients send before proxying), deployment models (who sees identity versus destination), and geolocation (how egress IPs are chosen). Related standards such as Privacy Pass power production auth; OHTTP Relay and Chrome Private State Tokens are separate privacy mechanisms and are only noted where the docs cross-reference them.

Privacy Proxy authentication: why clients must authenticate first

Section titled “Privacy Proxy authentication: why clients must authenticate first”

Privacy Proxy requires clients to authenticate before proxying traffic. Authentication is separate from tunneling: once the proxy accepts credentials, it forwards CONNECT traffic without inspecting payload bytes, while still learning the destination hostname and port (traffic flow).

Authentication methods PSK, Privacy Pass tokens and mTLS compared

Section titled “Authentication methods PSK, Privacy Pass tokens and mTLS compared”

Cloudflare documents three methods with different privacy and operations trade-offs:

Method Typical use Privacy level (per Cloudflare)
Pre-shared key (PSK) Proof of concept, testing Lower
Privacy Pass tokens Client-to-proxy (production) High
mTLS Server-to-server Higher

Privacy Proxy supports three authentication methods: Pre-shared key (PSK) … Privacy Pass tokens … mTLS.

— Cloudflare, Authentication

For integrations that speak SOCKS5 locally but not HTTP CONNECT, Chaussette can terminate SOCKS5 and forward authenticated CONNECT requests to the proxy endpoint.

Pre-shared key (PSK): Proxy-Authorization for local testing only

Section titled “Pre-shared key (PSK): Proxy-Authorization for local testing only”

PSK auth is the fastest way to prove connectivity after Cloudflare provisions an endpoint and key (Get started).

How to send PSK in the Proxy-Authorization header

Section titled “How to send PSK in the Proxy-Authorization header”

Include the PSK in the Proxy-Authorization header:

CONNECT example.com:443 HTTP/2
Host: example.com
Proxy-Authorization: Preshared <YOUR_PSK>

The proxy validates the key and allows the connection if it matches.

— Cloudflare, Authentication

A minimal check with curl:

curl -v \
--proxy https://your-proxy.example.com \
--proxy-header "Proxy-Authorization: Preshared <YOUR_PSK>" \
https://example.com

Successful tunnel setup returns 200 OK; failed auth returns 403 Forbidden (HTTP headers).

PSK authentication has limitations that make it unsuitable for production.

Shared secret: All clients use the same key, so you cannot revoke access for individual users.
No rate limiting per user: You cannot enforce per-user quotas or limits.
Linkability: The proxy can link all requests using the same PSK, which reduces user privacy.

Use PSK only for testing. For production deployments, use Privacy Pass tokens.

— Cloudflare, Authentication

Privacy Pass tokens: production authentication for Privacy Proxy

Section titled “Privacy Pass tokens: production authentication for Privacy Proxy”

Privacy Pass is an IETF token protocol Cloudflare uses so clients can prove authorization without giving the proxy a stable per-user identifier across requests.

Privacy Pass is a protocol that allows clients to authenticate without revealing their identity. Tokens are cryptographically unlinkable, meaning the proxy cannot correlate different requests from the same user.

— Cloudflare, Authentication

Privacy Proxy acts as the Origin role during redemption: it verifies tokens with the issuer public key and learns only validity, not issuance identity.

Privacy Pass four roles: Attester, Issuer, Client and Origin

Section titled “Privacy Pass four roles: Attester, Issuer, Client and Origin”

The Privacy Pass Protocol splits work so no single party should know both who the client is and where they go (see Deployment Models for who runs each role):

Role Responsibility
Client Requests access; runs issuance and redemption
Origin Issues challenges; verifies redeemed tokens (here, Privacy Proxy)
Attester Deployment-specific attestation (account, device, challenge)
Issuer Signs blinded token requests (Cloudflare often operates RFC 9578 issuers)

Most importantly, this splits information about the Client so that no single role knows everything, also known as unlinkability.

— Cloudflare, Deployment Models

Issuance (getting a token): the client proves something to the Attester; blinded requests go to the Issuer so finalized tokens cannot be linked to attestation events (Authentication).

Redemption (using the proxy): the client presents a token; the proxy verifies the issuer signature and allows the tunnel if valid.

Proxy-Authorization: PrivateToken header format

Section titled “Proxy-Authorization: PrivateToken header format”

Production redemption on the proxy uses the PrivateToken scheme (Authentication):

CONNECT example.com:443 HTTP/2
Host: example.com
Proxy-Authorization: PrivateToken token=&lt;base64-encoded-token&gt;

How to set up Privacy Pass for a Privacy Proxy deployment

Section titled “How to set up Privacy Pass for a Privacy Proxy deployment”

For production Privacy Pass on Privacy Proxy, Cloudflare’s checklist is:

  1. Choose an issuer (Cloudflare-operated or third party).
  2. Configure attestation (how clients prove eligibility before tokens).
  3. Distribute issuer configuration (public key and token-request endpoint to clients).

Contact us to configure Privacy Pass for your deployment.

— Cloudflare, Authentication

Managed production validation is covered in Production Deployment Testing (not self-serve). Client libraries include privacypass-ts for issuing and redeeming tokens in Node.js or browsers.

Single-hop versus double-hop deployment models

Section titled “Single-hop versus double-hop deployment models”

Privacy Proxy supports two deployment architectures: single-hop and double-hop. Choice depends on who should operate authentication and whether one party must never see both identity and destination.

Single-hop deployment: Cloudflare operates the full proxy path

Section titled “Single-hop deployment: Cloudflare operates the full proxy path”

In single-hop mode the client connects directly to Cloudflare’s Privacy Proxy, which handles auth, tunneling, and egress selection. Documented examples include Microsoft Edge Secure Network.

Fit when you want a fully managed path and your threat model accepts that the proxy operator can see both authenticated identity (via tokens or your attestation design) and destination hostnames.

Double-hop deployment: your Proxy A plus Cloudflare Proxy B

Section titled “Double-hop deployment: your Proxy A plus Cloudflare Proxy B”

In double-hop mode you run Proxy A (user authentication, optional geohash injection) and Cloudflare runs Proxy B (destination connect and egress). iCloud Private Relay is the canonical example.

Information Proxy A (you) Proxy B (Cloudflare)
Client IP address Yes No
User account Yes No
Destination server Encrypted Yes
Request content Encrypted Encrypted

Proxy A knows who the user is but cannot see where they are going (the destination is encrypted). Proxy B knows the destination but not who is making the request.

— Cloudflare, Deployment models

Authentication in double-hop: user to Proxy A

Section titled “Authentication in double-hop: user to Proxy A”

Authentication occurs at two levels in double-hop designs. Between the user and Proxy A, common patterns include account credentials or SSO, Privacy Pass tokens from your infrastructure, or client certificates (mTLS). Traffic then reaches Cloudflare’s hop with Privacy Pass or deployment-specific rules already satisfied.

Aspect Single-hop Double-hop
Infrastructure Cloudflare only You + Cloudflare
Privacy separation Proxy sees identity and destination Split across two operators
Operational complexity Lower Higher
Who manages first-hop auth Cloudflare-managed You

Geolocation: sec-ch-geohash and egress IP selection

Section titled “Geolocation: sec-ch-geohash and egress IP selection”

Traditional VPNs often break locale services because egress is far from the user. Privacy Proxy preserves user geolocation without exposing real IP addresses by mapping a coarse geohash to an egress pool.

How clients send geohash in sec-ch-geohash

Section titled “How clients send geohash in sec-ch-geohash”

Clients (or Proxy A in double-hop) send:

sec-ch-geohash: &lt;geohash&gt;-&lt;country_code&gt;

Example from the reference: sec-ch-geohash: u4pruydqqvj-GB (HTTP headers). Privacy Proxy validates the hash and picks an egress IP registered in that region; destinations geolocate the egress IP, not the client’s home IP (Geolocation).

Precision is intentionally reduced (often four to five geohash characters, roughly city or region). Cloudflare notes IPv6 egress can improve precision when origins publish AAAA records (Geolocation).

In double-hop, Proxy A derives the geohash from the client IP and forwards it; the docs state the geohash is protected against client spoofing (Geolocation).

Client libraries and common integration mistakes

Section titled “Client libraries and common integration mistakes”

Browsers cannot attach custom Proxy-Authorization headers directly, so Get started recommends curl for scripted tests or Chaussette as a local SOCKS5 front-end.

Typical mistakes:

  • Shipping PSK to end users — contradicts unlinkability and per-user controls (Authentication).
  • Skipping geohash — locale and licensing features may follow the wrong colo (Geolocation).
  • Collapsing Privacy Pass roles — running Origin and Attester together can let one entity learn identity and destination (Deployment Models).
  • Expecting direct browser proxy settings — auth headers require a helper proxy or native client integration (Get started).
  • Confusing Privacy Pass with legacy browser extensions — WAF Privacy Pass documents v1 extension deprecation; Privacy Proxy uses current PrivateToken redemption, not the 2017 extension flow.

Privacy Proxy is Enterprise-only; provisioning includes endpoint URL, PSK for tests, and egress IP ranges (Get started).

  1. Confirm Cloudflare provisioned your proxy URL, PSK (if still in test), and egress ranges (Get started).

  2. Run a trace through the proxy and verify the ip field shows a Cloudflare egress address, not your client IP:

    curl -v \
    --proxy https://your-proxy.example.com \
    --proxy-header "Proxy-Authorization: Preshared <YOUR_PSK>" \
    https://cloudflare.com/cdn-cgi/trace
  3. Repeat with a geohash header and check loc matches the intended region (Get started — optional geolocation test).

  4. For Privacy Pass production, fetch /.well-known/private-token-issuer-directory on your issuer host and complete an end-to-end redemption per Production Deployment Testing.

  5. You can check automatically in Answerwell (our tool): https://answerwell.org/workspace

If something on this page does not match your deployment or the linked Cloudflare docs, email yimasynthetic@gmail.com with the page URL and the exact sentence you believe is wrong, and we will clarify or correct it.