# Proxy gateway

A proxy gateway is the entry point of a proxy network: the hostname and port that clients connect to, which authenticates them, reads their targeting parameters and forwards each connection to a suitable exit address. One gateway can front millions of exits, which is why residential and mobile services are configured once and steered from the username rather than by switching hosts.


## What a gateway does on every connection

1. Authenticates the client by credentials or by its source IP (whitelist).
2. Parses the username parameters: country, state, city, ASN, session id, hold time.
3. Picks an exit that matches, or reuses the one bound to the session id.
4. Opens the connection to the destination through that exit and copies bytes both ways.
5. Counts the traffic for billing and returns a gateway error if something failed before the destination.


## Gateway versus exit

The gateway's own IP address is not what the destination sees; the [exit IP](https://proxshift.com/glossary/exit-ip) is. Whitelisting on the target side must therefore use dedicated static addresses, not a gateway hostname whose exits change.


## How it works at ProxShift

ProxShift runs two gateways, res.proxshift.com for residential and mob.proxshift.com for mobile, each on port 9000 (HTTP/S) and 9001 (SOCKS5), sharing one credential pair per account.

Source: https://proxshift.com/glossary/proxy-gateway
