---
title: "Port"
url: https://proxy.wiki/glossary/port/
type: Glossary Term
author: "proxy.wiki editorial"
published: 2026-09-06
updated: 2026-09-06
site: proxy.wiki
topics: ["Proxy fundamentals"]
license: CC BY 4.0 — quote freely with attribution to https://proxy.wiki/
---

# Port

> A port is a 16-bit number identifying one endpoint of a transport connection, so a single address can carry many independent conversations at once.

**A port is a 16-bit number identifying one endpoint of a transport connection, so a single address can carry many independent conversations at once.** A connection is identified by the pair of addresses together with the pair of ports and the protocol.

## The three ranges

RFC 6335 divides the 16-bit space into three parts, and IANA maintains the registry of assignments.

| Range | Name | Assignment |
| --- | --- | --- |
| 0–1023 | System, or well known | Assigned by IANA, stricter review |
| 1024–49151 | User, or registered | Assigned by IANA on request |
| 49152–65535 | Dynamic, private or ephemeral | Never assigned; used for outbound connections |

A registered assignment is a convention, not enforcement. Any service may listen on any port it can bind.

## Ports as a proxy control surface

Many providers use the port number on a single gateway hostname to select behaviour: which country the [exit node](/glossary/exit-node/) is in, whether the address rotates per request, or which [sticky session](/glossary/sticky-session/) you attach to. This is a vendor convention with no standard behind it, so the mapping differs between providers and can change. Read the documentation for the endpoint you actually hold.

Where the same behaviour is available both by port and by username parameters, prefer whichever your client can vary per request. Some HTTP clients cache connections per host and port, which quietly changes what rotation means.

## Running out of them

Each outbound connection consumes a source port on the originating address, drawn from the ephemeral range. High [concurrency](/glossary/concurrency/) from one machine to one destination can exhaust that range, and connections in a closing state hold their port for a period afterwards. The symptom is connection failures that arrive suddenly at a threshold and do not look like anything the target did.

## Commonly confused with

Port forwarding publishes an internal service outward. [CONNECT](/glossary/http-connect/) asks a proxy to open an outbound connection to a host and port on your behalf. Both involve a port; only one of them is under the destination’s control.

## Frequently asked questions

### Why does my proxy provider give me a different port for each country?

Because the port is a convenient selector on a single gateway hostname, requiring no protocol extension and working with any client. It is a vendor convention rather than a standard, so the mapping varies between providers and can change. The same choice is often available through username parameters.

### What are ephemeral ports and why do they run out?

They are the 49152–65535 range that outbound connections draw their source port from. Each simultaneous connection from one address consumes one, and closed connections hold theirs for a period. Enough concurrency against one destination exhausts the range, producing failures that look like a block but are local.

### Does a proxy change the destination port?

Not normally. The proxy port is the one you connect to; the destination port is carried in your request or CONNECT target and is used unchanged for the onward connection. A proxy that rewrote destination ports would break most protocols, so treat unexpected rewriting as a fault.

## Sources

1. [RFC 6335: port number ranges and IANA assignment procedures](https://www.rfc-editor.org/rfc/rfc6335.html)
2. [IANA: the service name and transport protocol port number registry](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml)
