> For the complete documentation index, see [llms.txt](https://docs.triton.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.triton.one/using-your-endpoint/proxying.md).

# Proxying

What a proxy in front of a Triton endpoint changes, and what it must do to work.

{% hint style="warning" %}
Triton doesn't recommend putting a proxy in front of an endpoint. Contact support before you set one up.
{% endhint %}

## What a proxy changes

* **Anycast hostnames.** Triton routes by where your connection enters its network.
* **DNS-routed hostnames** (Solana devnet and testnet). Sui and Monad customer endpoints use Anycast. Triton routes by where the DNS lookup comes from.
* **Behind a proxy,** both mean the proxy's location, not your user's. See [Endpoints, regions, and routing](https://docs.triton.one/using-your-endpoint/endpoints-regions-routing.md).
* **DNS caching delays failover.** On DNS-routed hostnames, Triton removes an unhealthy node or load balancer from DNS answers. A proxy that caches or pins the answer keeps sending traffic to it.
* **All users share one IP.** Triton applies [rate and connection limits](https://docs.triton.one/using-your-endpoint/rate-and-connection-limits.md) and blocks per source IP. Every user behind your proxy shares one IP's limits.
* **Repeated 403 blocks cut off the IP.** When one IP triggers `403` blocks at a high rate, Triton rejects its new connections and drops its requests without a response. `429` responses don't count. Behind a proxy, that cuts off every user. See [Earlier connection drops for repeat offenders](https://docs.triton.one/security/privacy-and-security.md#earlier-connection-drops-for-repeat-offenders).

| Requests without a token                                   | What happens                                                                                                                                                                            |
| ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| From data-centre IP ranges (cloud, hosting and Cloudflare) | Can get `HTTP 403` with `Your IP or provider is blocked from this endpoint`. See [Triton RPC error codes](https://docs.triton.one/solana/faq/error-handling/triton-rpc-error-codes.md). |
| From some server HTTP clients                              | Get the same `403` from any IP                                                                                                                                                          |
| Plain `http://`                                            | Get the same `403`                                                                                                                                                                      |
| From Cloudflare Workers, with a `CF-Worker` header         | Get the same `403`                                                                                                                                                                      |

{% hint style="danger" %}
**A TLS-terminating proxy reads your traffic and can change it.** That includes your token and any transactions you submit. Triton can't guarantee the integrity of responses that pass through a proxy.
{% endhint %}

## Instead of a proxy

* **Keep a token out of browser code.** Use allowed origins with no token. See [Auth and security](https://docs.triton.one/security/authentication.md#allowed-origins-frontend).
* **Control the region.** Use a city hostname with your token (shared Solana mainnet only), or ask support for a hostname that points at one city. Allowed origins don't work on city hostnames. See [Pin a region](https://docs.triton.one/using-your-endpoint/endpoints-regions-routing.md#pin-a-region).
* **Limit or control the RPC calls your endpoint accepts.** Ask support for a custom rate tier. See [Rate and connection limits](https://docs.triton.one/using-your-endpoint/rate-and-connection-limits.md).
* **Other goals.** Tell support what the proxy is for.

## If you still need a proxy

* **Token.** Send your token on every request, in the URL path or the `x-token` header.
* **Token in logs.** Keep your token out of proxy logs and error responses.
* **Host.** Send your endpoint's exact hostname from the customer dashboard as `Host`.
* **Host lookup.** Triton uses `Host` to find your network, then looks up your token there.
* **Unknown Host.** If Triton doesn't know the `Host`, it doesn't recognise your token. Your own domain isn't known by default.
* **Origin.** Only for requests without a token: pass `Origin` unchanged. Triton checks it against your allowed origins.
* **HTTPS.** Connect to Triton over HTTPS and validate its certificate. Triton's certificates are issued for `rpcpool.com` hostnames.

| Protocol      | What to do                                                                                                         | Otherwise                                |
| ------------- | ------------------------------------------------------------------------------------------------------------------ | ---------------------------------------- |
| **JSON-RPC**  | Pass `POST` and the `Content-Type` header unchanged. Triton accepts `application/json` and `application/json-rpc`. | Other content types return `415`         |
| **WebSocket** | Pass `Upgrade: websocket`, `Connection: upgrade` and `Sec-WebSocket-Version: 13`                                   | Without version 13, Triton returns `426` |
| **gRPC**      | Use HTTP/2 to Triton and pass `Content-Type: application/grpc` unchanged. Send the token in the `x-token` header.  |                                          |

* **Client IP.** Triton doesn't take the client IP from request headers such as `X-Forwarded-For` or `X-Real-IP`.
* **Client IP header.** To rate-limit by your users' IPs, ask support whether a client-IP header is available for your setup. Blocks still count against your proxy's IP.
* **Rate tier.** Ask support to review your rate tier.
* **DNS.** Resolve Triton's hostname again at each TTL. Don't pin the IP.

{% hint style="danger" %}
If a proxy sends abusive traffic, Triton can block the proxy's IP addresses for your endpoint. That blocks every user behind them.
{% endhint %}

## What's next

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><i class="fa-earth-americas">:earth-americas:</i> <strong>Endpoints, regions, and routing</strong></td><td>Points of presence, endpoint hostnames, protocols, and region pinning.</td><td><a href="https://docs.triton.one/using-your-endpoint/endpoints-regions-routing.md">Endpoints, regions, and routing</a></td></tr><tr><td><i class="fa-gauge">:gauge:</i> <strong>Rate and connection limits</strong></td><td>Per-IP rate and connection limits, and 429 handling.</td><td><a href="https://docs.triton.one/using-your-endpoint/rate-and-connection-limits.md">Rate and connection limits</a></td></tr><tr><td><i class="fa-lock">:lock:</i> <strong>Auth and security</strong></td><td>Tokens, allowed origins, and what to do if a token leaks.</td><td><a href="https://docs.triton.one/security/authentication.md">Auth and security</a></td></tr></tbody></table>

***

<i class="fa-life-ring">:life-ring:</i> Contact support by clicking the chat icon in your [customer dashboard](https://customers.triton.one)\ <i class="fa-briefcase">:briefcase:</i> Sales questions? [Contact us](https://triton.one/contact)\ <i class="fa-sparkles">:sparkles:</i> AI agent? Read [llms.txt](https://docs.triton.one/llms.txt)\ <i class="fa-rss">:rss:</i> Follow updates: [Blog](https://blog.triton.one) · [X](https://x.com/triton_one) · [YouTube](https://www.youtube.com/@triton_one_ltd) · [Telegram](https://t.me/tritonone) · [GitHub](https://github.com/rpcpool)
