# PROXY entry without a port

Source: https://findproxyforurl.net/rules/proxy-without-port/ · last updated 2026-10-11

Rule PAC-X013 (`proxy-without-port`), severity medium, category: Security and fail-safety, top 20 #15.

"PROXY proxy.corp.example" names no port. Chromium and Windows (WinHTTP) assume 80; Firefox is reported to reject the entry, and a rejected sole entry means a direct connection. Always write host:port.

## Why it matters

The PAC return grammar is `PROXY host:port`. Chromium fills in a per-scheme default (80 for
PROXY, 443 for HTTPS, 1080 for SOCKS), so the entry works there if the proxy happens to
listen on that port, which enterprise proxies on 8080, 3128 or 9090 do not. Windows (WinHTTP)
also uses port 80 (lab, 2026-10-11). Firefox is reported to discard the unported entry; if
nothing valid remains, the request goes DIRECT. pacparser returns the string verbatim (lab, 2026-05-20), so desk tests do not
reveal the problem. This is mechanism (c) of the "silent DIRECT" family.


## How to fix

Write the port explicitly, e.g. "PROXY proxy.corp.example:8080".

## Bad

```js
function FindProxyForURL(url, host) {
  return "PROXY proxy.corp.example";
}
```

## Good

```js
function FindProxyForURL(url, host) {
  return "PROXY proxy.corp.example:8080";
}
```

## Engine behaviour

- chromium: Missing port is replaced by the scheme default (PROXY 80, HTTPS 443, SOCKS/SOCKS4/SOCKS5 1080; ProxyServer::GetDefaultPortForScheme). "host:" with an empty port is rejected as an invalid entry. (source: code, verified 2026-10-04)
- firefox: Reported to reject the entry; needs lab confirmation. (source: expert, unverified)
- pacparser: Returns the unported string unchanged; no validation. (source: lab, verified 2026-05-20)
- winhttp: A missing port becomes 80; the entry is kept, not rejected. (source: lab, verified 2026-10-11)
