Skip to content
FAQ 5 Connection Type: 2 views

Which Port to Use for Proxy

Discover the functions of proxy ports 8080, 3128, and 1080. This article details their common uses to help you select the ideal port for your proxy.

The appropriate port for a proxy service depends on the proxy's protocol and intended use, with 8080 and 3128 being common for HTTP/HTTPS proxies, and 1080 designated for SOCKS proxies.

Proxy servers listen on specific network ports to accept client connections. The choice of port is dictated by the proxy's protocol (HTTP, HTTPS, SOCKS), common conventions, and network configurations. While any non-privileged port (above 1024) can technically be used, specific ports have become standard for particular proxy types, simplifying client configuration and interoperability.

Port 8080

Port 8080 is a commonly used alternative HTTP port. While HTTP traffic typically uses port 80, 8080 serves as a conventional non-standard port for web servers and HTTP/HTTPS proxies. Its use for proxies often stems from its established role as an "alternative HTTP" port, making it less likely to be blocked by firewalls that permit general web traffic, yet distinguishing it from direct web server access.

Characteristics

  • Protocol: HTTP, HTTPS (via CONNECT method)
  • Purpose: General-purpose HTTP/HTTPS proxy. Often used for testing or when port 80 is unavailable or restricted.
  • Default for: Some proxy software or custom configurations.
  • IANA Status: Registered for HTTP Alternate (Web Proxy) by the Internet Assigned Numbers Authority (IANA).

Configuration Example (HTTP Proxy)

To configure a client to use an HTTP proxy on port 8080:

# Using curl for HTTP
curl -x http://proxy.example.com:8080 http://target.example.com

# Using environment variables (common for many tools)
export HTTP_PROXY="http://proxy.example.com:8080"
export HTTPS_PROXY="http://proxy.example.com:8080"
curl http://target.example.com

In a web browser, this port would be specified under the HTTP/HTTPS proxy settings.

Port 3128

Port 3128 is a widely recognized and frequently used port for HTTP and HTTPS proxies, particularly associated with the Squid caching proxy server. Its prevalence is largely due to Squid's widespread adoption, establishing 3128 as a de facto standard for HTTP/HTTPS proxy services.

Characteristics

  • Protocol: HTTP, HTTPS (via CONNECT method)
  • Purpose: Dedicated HTTP/HTTPS proxy, often with caching capabilities. Common for enterprise and ISP-level proxies.
  • Default for: Squid proxy server.
  • IANA Status: Not officially registered for a specific service by IANA but widely adopted by convention.

Configuration Example (HTTP Proxy)

Configuring a client to use an HTTP proxy on port 3128 is identical to port 8080, only changing the port number:

# Using curl for HTTP
curl -x http://proxy.example.com:3128 http://target.example.com

# Using environment variables
export HTTP_PROXY="http://proxy.example.com:3128"
export HTTPS_PROXY="http://proxy.example.com:3128"
wget http://target.example.com/file.zip

Many network devices and applications are pre-configured to check for proxies on 3128 due to its common use.

Port 1080

Port 1080 is the standard port for SOCKS (SOCKet Secure) proxies. Unlike HTTP proxies, which are application-layer (Layer 7) proxies primarily for web traffic, SOCKS proxies operate at a lower layer (Layer 5, session layer) and can handle various types of network traffic, including HTTP, FTP, SMTP, and more. SOCKS proxies forward TCP connections and can also handle UDP traffic (with SOCKS5).

Characteristics

  • Protocol: SOCKS (SOCKS4, SOCKS5)
  • Purpose: General-purpose network proxy. Used when application-agnostic proxying is required, or when HTTP-specific features are not desired or supported by the client/server.
  • Default for: SOCKS proxy servers.
  • IANA Status: Registered for SOCKS by IANA.

Configuration Example (SOCKS Proxy)

Configuring a client for a SOCKS proxy on port 1080 requires specifying the SOCKS protocol:

# Using curl for SOCKS5
curl --socks5 proxy.example.com:1080 http://target.example.com

# Using environment variables for SOCKS5
export ALL_PROXY="socks5://proxy.example.com:1080"
ssh user@target.example.com # If SSH client supports ALL_PROXY

Web browsers typically have separate settings for SOCKS proxies, distinct from HTTP/HTTPS proxy configurations.

Port Comparison

The following table summarizes the key differences between ports 8080, 3128, and 1080 in the context of proxy services:

Feature Port 8080 Port 3128 Port 1080
Proxy Type HTTP/HTTPS Proxy HTTP/HTTPS Proxy SOCKS Proxy (SOCKS4/SOCKS5)
Protocol(s) HTTP, HTTPS (CONNECT) HTTP, HTTPS (CONNECT) TCP, UDP (SOCKS5), any application protocol
Layer Application Layer (L7) Application Layer (L7) Session Layer (L5)
Primary Use Alternative HTTP, general web proxy Enterprise/caching web proxy Generic network proxy for diverse applications
Common Software Custom, various web servers Squid, Apache Traffic Server OpenSSH (SOCKS5 forwarding), Dante, SOCKS servers
IANA Status Registered (HTTP Alternate) Unregistered (by convention) Registered (SOCKS)
Traffic Handled Web browsing, API calls Web browsing, API calls, caching Any TCP/UDP traffic (e.g., FTP, IRC, gaming, SSH, DNS)

Factors When Choosing a Port

When selecting a port for a proxy service, several factors influence the decision:

Protocol Compatibility

The fundamental consideration is the proxy protocol. If the proxy is designed for HTTP/HTTPS traffic, ports like 8080 or 3128 are appropriate. If the proxy needs to handle diverse protocols or operate at a lower network layer, a SOCKS proxy on port 1080 is required. Client applications must be configured to use the correct proxy protocol and port.

Firewall Rules and Network Policy

Network firewalls often restrict outgoing and incoming traffic based on port numbers.
* Common Ports: Ports 80 and 443 are typically open for HTTP/HTTPS. Ports 8080 and 3128 are also frequently allowed for web proxies.
* SOCKS Ports: Port 1080 for SOCKS might be treated differently; some networks might restrict it.
* Custom Ports: Using a non-standard port (e.g., 8000, 8123, 9090) can sometimes bypass basic port filtering, but relies on "security by obscurity" and is not a robust security measure. Complex firewalls inspect traffic contents, not just port numbers.

Application and Client Configuration

The client application (web browser, command-line tool, operating system network settings) must support the chosen proxy type and port.
* Most web browsers offer distinct settings for HTTP, HTTPS, FTP, and SOCKS proxies.
* Command-line tools like curl and wget use environment variables (HTTP_PROXY, HTTPS_PROXY, ALL_PROXY) or specific flags (-x, --socks5).
* Some applications might only support HTTP proxies, while others might specifically require SOCKS.

Port Availability

Ensure the chosen port is not already in use by another service on the proxy server. Attempting to start a proxy on an occupied port will result in a binding error.

# Check if a port is in use on Linux/macOS
sudo lsof -i :8080
sudo netstat -tuln | grep 8080

# Check if a port is in use on Windows
netstat -ano | findstr :8080

Security Considerations

The port number itself does not inherently provide security. Authentication, access control lists (ACLs), encryption (e.g., TLS for HTTPS proxy traffic), and robust server configuration are critical for proxy security. Using a non-standard port might deter casual port scanning but offers no protection against targeted attacks or sophisticated scanners. For internet-facing proxies, standard ports might be more expected and thus targeted, but security should be implemented at the application and network layers, not relied upon by port obscurity.

Auto-update: 03.03.2026
All Categories

Advantages of our proxies

25,000+ proxies from 120+ countries