# Security, TLS, and production checklist

Source: https://prontaro.com/docs/outbound/security/

A clear trust model for every Prontaro mode: where encryption stays end to end, what metadata the server sees, and how to lock down credentials in production.

HTTP and SOCKS5 proxy (`:443`, `:8080`, `:1080`), `prontaro forward`, and TCP tunnels keep TLS encrypted end to end between your client and the destination server. [Relay URLs](https://prontaro.com/docs/outbound/relay.md) and [HTTPS tunnels](https://prontaro.com/docs/tunnels/https.md) terminate TLS on the Prontaro server and never log request bodies, headers, query strings, or credentials.

## What Prontaro servers see

Each Prontaro mode handles encryption and metadata differently:

| Mode | Where TLS terminates | What Prontaro sees | mTLS support |
| --- | --- | --- | --- |
| **HTTPS proxy (`:443`) & HTTP CONNECT (`:8080`)** | End-to-end (client ↔ target) | `host:port`, SNI, timing, bytes | Yes |
| **SOCKS5h (`:1080`) & `prontaro forward`** | End-to-end (client ↔ target) | `host:port`, SNI, timing, bytes | Yes |
| **Relay URLs (`*.prontaro.run`)** | On the Prontaro server (re-encrypted to target) | HTTP request in memory (never logged) | No |
| **HTTPS tunnels (`prontaro http`)** | On the Prontaro server (TLS to visitor + tunnel to CLI) | Method, path without query, status, bytes | No |
| **TCP tunnels (`prontaro tcp`)** | End-to-end (direct TCP) | Client IP, port, timing, bytes | Yes |

> **Default to HTTPS proxy on port :443**
>
> Using `https://<login>:<pass>@<entry>.prontaro.io:443` encrypts your proxy username and password in transit. Port `:8080` (`http://`) sends `Proxy-Authorization` in plaintext — reserve it for legacy SDKs that lack `https://` proxy support.
>
> Prontaro servers never store plaintext proxy passwords; they keep only SHA-256 hashes.

## Why `socks5h://` is mandatory (avoiding DNS leaks)

When using SOCKS5, always use the `socks5h://` scheme (`h` stands for *hostname resolution on the proxy*). Plain `socks5://` causes two problems at once:

1. **DNS leak.** Your client resolves the hostname locally through host or container DNS and sends only the resulting IP to Prontaro, exposing the target hostname to the local resolver.
2. **Domain rules in “To” stop matching.** If your **To** allowlist permits `api.example.com:443`, but the client sends a bare IPv4 address instead of the hostname, Prontaro rejects the connection because domain rules cannot be matched against a bare IP.

```
 curl -fsS --proxy "socks5h://u_prod:s3cr3t@<entry>.prontaro.io:1080"
203.0.113.10
```

## Least privilege: “From” and “To”

New proxy credentials start open so you can verify connectivity against `api.ipify.org` right away. Immediately after verification, lock them down along both axes:

- **From:** IPv4 addresses and CIDR blocks allowed to authenticate. Set this for servers with fixed IPs; on serverless platforms (Vercel, AWS Lambda) or GitLab/GitHub Shared Runners, leave **From** open and tighten **To**.
- **To:** exact hostnames (`api.example.com:443`, `*.partner.example.com:443`) or `ip:port` entries allowed as targets. Leaked credentials cannot be abused as an open proxy to arbitrary hosts.

1. Open **IP addresses** in [my.prontaro.com](https://my.prontaro.com/ips), select the proxy credentials, and switch to the **Access** tab.
2. Add your server IPv4 addresses under **From** (if static) and the exact target `host:port` entries under **To**.
3. Click **Save**.

IP addresses Proxy credentials Access [Open in dashboard](https://my.prontaro.com/ips)

### Built-in destination blocks

Regardless of your **To** rules, Prontaro servers always block outbound connections to:

- private and special-use IPv4 ranges (RFC 1918 `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`, loopback `127.0.0.0/8`, CGNAT `100.64.0.0/10`, link-local `169.254.0.0/16`, multicast) and internal Prontaro server addresses;
- mail ports `25`, `465`, and `587`;
- direct IPv6 addresses.

> **SNI boundary on shared CDNs**
>
> **To** rules check the hostname in `CONNECT` or `SOCKS5h` and its resolved IP. If a partner API shares an IP on a large CDN, someone with leaked credentials could theoretically send a different SNI inside TLS to reach another site hosted on that same CDN IP.
>
> Treat **To** rules as defense in depth and revoke credentials immediately on any suspected leak.

## Separate credentials per environment and zero-downtime rotation

Never share one set of proxy credentials or one CLI token across environments. Issue distinct credentials per service and stage (`billing-prod`, `billing-staging`, `gitlab-ci`, `dev-laptop`) so revoking a leaked CI or developer key never touches production traffic.

### Rotating proxy credentials with zero downtime

Create new credentials with the same **From** and **To** rules first, switch your app over, and delete the old ones last. Step by step: [HTTP & SOCKS5 proxy](https://prontaro.com/docs/outbound/proxy.md).

### Rotating Relay URLs

Each [Relay URL](https://prontaro.com/docs/outbound/relay.md) is protected by a random hostname that is never published, plus optional `Prontaro-Relay-Auth` credentials. Deleted URLs are never reissued.

1. Open **IP addresses → Relay addresses** in [my.prontaro.com](https://my.prontaro.com/ips) and create a new Relay for the same target host (adding a `Prontaro-Relay-Auth` password if used).
2. Switch your client to the new URL and verify requests succeed.
3. Delete the old Relay from **Relay addresses**.

IP addresses Relay address [Open in dashboard](https://my.prontaro.com/ips)

> **Tightening rules or revoking drops active sessions**
>
> When you delete proxy credentials or narrow **From** and **To** rules, Prontaro forcibly closes existing connections that no longer match within seconds.

## What is never written to Logs

[Connection logs](https://prontaro.com/docs/billing/logs.md) (retained up to 30 days on Pro) record only diagnostic metadata: timestamp, client IP, destination `host:port` (or HTTP method and path for HTTPS tunnels), outcome, duration, and bytes transferred.

Prontaro never logs:

- HTTP request or response bodies;
- URL query strings (`?token=...`, `?api_key=...` are stripped before recording);
- HTTP headers (`Authorization`, `Cookie`, `Prontaro-Relay-Auth`, API keys);
- Basic Auth passwords, proxy passwords, or CLI tokens;
- direct TCP payloads (TLS traffic, SSH sessions, SQL queries, or database rows).

## Production checklist

Verify every item before routing production traffic through Prontaro:

- **Encrypted proxy transport:** apps use `https://...:443` (or `socks5h://...:1080`, never plain `socks5://`).
- **Environment isolation:** separate proxy credentials and CLI tokens (`PRONTARO_KEY`) exist for `prod`, `staging`, and CI.
- **Tight destinations:** after checking `api.ipify.org`, **To** allows only required `host:port` endpoints (plus **From**, if clients have static IPs).
- **Relay protection:** every production Relay requires `Prontaro-Relay-Auth`, and the Relay URL lives in a secrets manager, not in source control.
- **Locked inbound TCP:** `prontaro tcp` tunnels allow only trusted IPv4 addresses or CIDRs, never open to everyone; SSH servers disable password login.
- **CI and frontend safety:** GitLab and GitHub variables are Masked and Protected away from forks; frontend configs never use `NEXT_PUBLIC_` for proxy URLs.
- **Resilience during route handover ([BGP failover](https://prontaro.com/docs/outbound/failover.md)):** HTTP clients set explicit timeouts and bounded retries with exponential backoff and jitter (plus `Idempotency-Key` on `POST`) so brief route handovers complete seamlessly.
- **Incident revocation:** on-call engineers know how to revoke proxy credentials, Relays, or CLI tokens in [my.prontaro.com](https://my.prontaro.com/) in under a minute.

## Next steps

- [HTTP & SOCKS5 proxy](https://prontaro.com/docs/outbound/proxy.md) — proxy setup, From/To access rules, and diagnostics.
- [Relay URLs](https://prontaro.com/docs/outbound/relay.md) — access rules, `Prontaro-Relay-Auth` passwords, and limits.
- [Access control & firewalls](https://prontaro.com/docs/tunnels/access.md) — IP allowlists and Basic Auth for inbound tunnels.
- [Connection logs](https://prontaro.com/docs/billing/logs.md) — connection metadata and one-click IP allowlisting.
- [Reliability, zero-downtime updates, and BGP failover](https://prontaro.com/docs/outbound/failover.md) — server hot upgrades and automatic standby failover.
