# Template: TCP or TLS (SFTP and other TCP)

This template makes one listener for a service that is not HTTP: SFTP, FTPS or HTTPS passed through untouched, or any other TCP port. It can also end TLS at the balancer for a plain service behind it.

Listeners › Add listener › **TCP or TLS**. The picture shows SFTP on port 2222 for three CrushMFT servers, with PROXY v2:

![The TCP or TLS template](Template-TCP-or-TLS/template.png)

| Field | What to enter |
|---|---|
| **Name** | optional |
| **Mode** | **TCP** to pass the bytes through unchanged (SFTP, FTPS, HTTPS pass-through); **TLS** to end TLS at the balancer |
| **Port** | the port clients use |
| **Bind IP** | `0.0.0.0` for every interface |
| **Backends** | one CrushMFT server per line, as `host:port` |
| **PROXY header** | None, v1 or v2. v2 is recommended for SFTP. Set the matching option on the CrushMFT port. |

**Continue** shows the listener in the [listener editor](Listener-Editor.md); **Save** starts it.

## The details

- Mode `tcp` relays the client's bytes unchanged: SFTP, FTPS and HTTPS passthrough keep their TLS or SSH end to end with CrushMFT, and `backend_tls` does not apply.
- Mode `tls` ends TLS at the balancer and relays plaintext to a plain backend port.
- PROXY header: none, v1 or v2 per endpoint. **v2 is recommended for SFTP.** Set the matching flag on the CrushMFT port ([PROXY headers](PROXY-Headers.md)).
- Stickiness is by client address (`sticky=ip`, the default).
