A proxy port is the number that tells your software which service on a proxy server to connect to. It is written after the host and a colon, as in proxy.example.com:8080. The host finds the server, and the port picks the service on it. Both must be correct, or the connection fails or reaches the wrong service.

Common Proxy Port Numbers

  • 8080: Registered with IANA as "HTTP Alternate" to port 80.
  • 1080: Registered with IANA for SOCKS. RFC 1928 states the SOCKS service is conventionally on TCP port 1080.
  • 80 and 443: The standard ports for HTTP and HTTPS.
  • Port ranges: RFC 6335 splits ports into System Ports (0 to 1023), User Ports (1024 to 49151), and Dynamic Ports (49152 to 65535). These registrations are conventions, so always use the port listed in your proxy details.

Setting the Port in Your Tools

  • Command line: curl takes a proxy as -x [protocol://]host[:port], for example curl -x http://proxy.example.com:8080 https://example.com. If you leave out the port, curl assumes 1080.
  • Protocol prefix: The prefix, such as http:// or socks5://, tells the client which protocol to speak. The port number alone does not.
  • Environment variables: curl also reads http_proxy, HTTPS_PROXY, and ALL_PROXY in the same host:port format, and skips the proxy for hosts listed in NO_PROXY.