# SOCKS keywords mean different versions on different engines

Source: https://findproxyforurl.net/rules/socks-version-keyword/ · last updated 2026-10-11

Rule PAC-K005 (`socks-version-keyword`), severity medium, category: Compatibility across engines.

The PAC format defines only "SOCKS host:port" without a protocol version. Chromium treats plain SOCKS as SOCKS4, Firefox is reported to use SOCKS5, Windows misreads SOCKS4 and SOCKS5 entries, and .NET programs on Windows ignore SOCKS entries and connect directly.

## Why it matters

A SOCKS return is ambiguous by design: the original format predates the SOCKS4/SOCKS5
distinction. Chromium resolves the ambiguity towards SOCKS4 "for compatibility" (code,
2026-10-04) and understands the explicit `SOCKS4` and `SOCKS5` keywords. Firefox is
reported to speak SOCKS5 for plain `SOCKS`. An entry with a keyword an engine does not know
is dropped (PAC-E011). Windows (WinHTTP) passed `SOCKS host:port` on unchanged in the lab
(2026-10-11), but read `SOCKS5 host:port` and `SOCKS4 host:port` as a plain SOCKS entry with a
broken host name such as `5 host`, and programs built on .NET Framework or .NET 8 used no proxy at all for
a SOCKS entry. The result is that the same return string may use different protocol
versions on different clients, or no proxy at all. SOCKS proxies are rare in enterprise
web routing; where one is needed, confirm the keyword and version on every target engine
and keep a `PROXY` fallback. The Firefox behaviour is from reports and has not been
checked in the lab.


## How to fix

Prefer an HTTP proxy (PROXY host:port); if SOCKS is required, verify keyword and version per target engine and add a PROXY fallback.

## Bad

```js
function FindProxyForURL(url, host) {
  return "SOCKS5 socks.corp.example:1080";
}
```

## Good

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

## Engine behaviour

- chromium: Keywords SOCKS, SOCKS4 and SOCKS5 are accepted (case-insensitive); plain SOCKS is mapped to SOCKS4. (source: code, verified 2026-10-04)
- firefox: Reported to treat plain SOCKS as SOCKS5; versioned keywords unverified. (source: expert, unverified)
- winhttp: "SOCKS s:1080" is returned as a SOCKS entry; a missing port becomes 1080. "SOCKS5 s:1080" and "SOCKS4 s:1080" are misread as a plain SOCKS entry with the broken host name "5 s" or "4 s". .NET Framework and .NET 8 programs went direct instead of using a SOCKS entry. (source: lab, verified 2026-10-11)
