Docs menu
Docs

Proxy Format

A proxy format is the way a proxy's host, port, username and password are written on one line, and two formats cover almost every tool: host:port:user:pass, the list style that browsers, antidetect browsers and bots import, and the URL style protocol://user:pass@host:port that code and command-line tools expect. A SOCKS5 proxy uses the same shapes with socks5:// (or socks5h://) in front, and a proxy you reach through an IP allowlist needs only host:port. A ProxyField proxy in the URL style is http://<login>-country-us-city-new_york:<password>@gate.proxyfield.io:7000, residential from $1.95/GB, and you can try it with the Easy Trial: 1 GB for $2.95.

residential IPs
412M+
from, traffic never expires
$1.95/GB
Easy Trial
1 GB for $2.95
gate.proxyfield.io:7000
ProxyField in each proxy format
FormatProxyField value
host:port:username:passwordgate.proxyfield.io:7000:<login>-country-us-city-new_york:<password>
URLhttp://<login>-country-us-city-new_york:<password>@gate.proxyfield.io:7000
SOCKS5 URLsocks5h:// in front, with the same username and password, so the gateway resolves the site's name
host:port (allowlist)gate.proxyfield.io and the port you set up in the dashboard, for up to 100 allowlisted IPv4 addresses
Host and portgate.proxyfield.io and 7000 for HTTP, HTTPS and SOCKS5 alike
Username<login>-country-us-city-new_york; the optional keys are -country-<cc>, -region-<region>, -city-<city>, -session-<id> and -ttl-<seconds> (30 to 129,600 s, 20 min when ttl is left out); add -mobile or -dc right after the login for mobile or rotating datacenter IPs (-dc takes the country only)
Passwordyour ProxyField password; in URL form, percent-encode @, :, / and #
Linesthe dashboard's configurator generates as many proxy lines as you need
IP behavioura new IP on every request, or one IP for 30 s to 36 h with -session-<id>-ttl-<seconds>
Headersthe gateway adds no Via, X-Forwarded-For or Forwarded header; the headers your tool sends pass through; your Proxy-Authorization is removed before the request goes to the site

Write a proxy line for ProxyField

  1. Copy your login and password from your account, or let the configurator generate the lines.
  2. Add the location and session to the username, as in <login>-country-us-city-new_york.
  3. Pick the format your tool expects: host:port:username:password for lists and antidetect browsers, a URL for code and command-line tools.
  4. In URL form, percent-encode special characters in the password.
  5. Test one line in the proxy checker or with curl before you load the list.

The full line, with region, city and a 60-second session (host:port:username:password):

gate.proxyfield.io:7000:<login>-country-au-region-australian_capital_territory-city-canberra-session-he9f2qga-ttl-60:<password>

curl's own reference for the URL form: URL syntax (curl).

On this page 8 sections

The common proxy formats

The same proxy, written six ways. All of them carry the same four values; only the order and the separators change.

FormatExampleUsed by
host:portgate.proxyfield.io:<port>, where <port> is the port you set up in the dashboard for your allowlisted IPIP-allowlisted proxies, device settings (in two fields), Chrome's --proxy-server
host:port:user:passgate.proxyfield.io:7000:<login>:<password>proxy lists, antidetect browsers, extensions, many bots
user:pass@host:port<login>:<password>@gate.proxyfield.io:7000some tools and list imports
user:pass:host:port<login>:<password>:gate.proxyfield.io:7000a few tools; easy to confuse with the line above
http://user:pass@host:porthttp://<login>:<password>@gate.proxyfield.io:7000curl, Python, Node.js, Scrapy, environment variables
socks5h://user:pass@host:portsocks5h://<login>:<password>@gate.proxyfield.io:7000SOCKS5 in curl, Python with SOCKS support and environment variables; tools that take only socks5:// use that scheme

<login> and <password> stand for your credentials; with ProxyField the username also carries the targeting, as in <login>-country-us-city-new_york. SOCKS5 runs on the same gate.proxyfield.io:7000. Each line has the form host:port:username:password, as in gate.proxyfield.io:7000:<login>-country-us-city-new_york:<password>.

The URL format, part by part

The URL style follows the generic URI syntax (RFC 3986): scheme, then //, then the optional login and @, then host and port.

SchemeMeaning
http://talk to the proxy in plain HTTP; HTTPS sites still travel encrypted inside a CONNECT tunnel
https://open a TLS connection to the proxy itself, then send requests through it
socks4://SOCKS version 4: a user ID but no password; hostnames are resolved on your side unless the proxy speaks SOCKS4a
socks5://SOCKS5; your machine resolves the website's hostname, then sends the IP to the proxy
socks5h://SOCKS5 with the hostname resolved by the proxy, so DNS lookups go through it too

The scheme describes how your tool talks to the proxy, not the website's protocol. An http:// proxy URL is the normal choice for fetching https:// sites.

SOCKS5 proxy format

A SOCKS5 proxy is written like any other, with the SOCKS scheme:

socks5h://<login>-country-us-city-new_york:<password>@gate.proxyfield.io:7000
socks5://<login>-country-us-city-new_york:<password>@gate.proxyfield.io:7000
gate.proxyfield.io:7000:<login>-country-us-city-new_york:<password>

These lines show the format; ProxyField's gateway takes SOCKS5 on the same port, 7000, with the same username and password as HTTP. In list format there is no scheme, so the tool has a protocol selector, and you pick SOCKS5 there. ProxyField's examples use socks5h://, so the gateway resolves the website's hostname, for example to get DNS answers for the proxy's country; use socks5:// in tools that accept only that scheme. In Python, requests needs the requests[socks] extra for SOCKS URLs (Requests: SOCKS). Not every client sends a SOCKS5 username and password; proxy authentication explains which ones don't. More on the protocol: SOCKS5 proxies.

What proxy format does each tool use?

ToolFormat it expectsGuide
curlURL (-x http://user:pass@host:port) or -x host:port -U user:passcurl
Python requestsURL in proxies={"http": url, "https": url}Python requests
Node.jsURL, passed to a proxy agent or the client's proxy optionNode.js
Playwrightserver: "http://host:port", with username and password as separate fieldsPlaywright
Puppeteer--proxy-server=host:port, login through page.authenticate()Puppeteer
Selenium with Chrome--proxy-server=host:port, no login in the flagSelenium
ScrapyURL in request.meta["proxy"]Scrapy
Environment variablesURL in HTTP_PROXY, HTTPS_PROXY, ALL_PROXYcommand line proxy
Device and browser settingshost and port in two fields, login in a prompthow to set up a proxy
Antidetect browsers, extensionsusually host:port:user:pass, sometimes URLantidetect browsers

When a tool asks for "proxy" in one box, try the URL style first; when it imports a list, host:port:user:pass is the usual default.

Convert between proxy formats

This short Python script turns any of the list styles into URLs, percent-encoding the login so special characters can't break it. Save your proxies one per line in proxies.txt:

Python
from urllib.parse import quote

def to_url(line, scheme="http"):
    line = line.strip()
    if "://" in line:
        return line  # already a URL
    parts = line.split(":")
    if len(parts) == 2:  # host:port
        return f"{scheme}://{line}"
    # note: a user:pass:host:port line whose password is all digits is read as host:port:user:pass
    if len(parts) >= 4 and parts[1].isdigit():  # host:port:user:pass
        host, port, user, password = parts[0], parts[1], parts[2], ":".join(parts[3:])
    elif "@" in line:  # user:pass@host:port
        login, hostport = line.rsplit("@", 1)
        user, password = login.split(":", 1)
        host, port = hostport.rsplit(":", 1)
    else:  # user:pass:host:port
        user, password, host, port = parts[0], parts[1], parts[2], parts[3]
    return f"{scheme}://{quote(user, safe='')}:{quote(password, safe='')}@{host}:{port}"

with open("proxies.txt") as f:
    for line in f:
        if line.strip():
            print(to_url(line))

Going the other way is one f-string: f"{host}:{port}:{user}:{password}". A converter only rewrites text; to see whether a line works, test it with the proxy checker.

proxy.example.com:8080 is a placeholder

Guides and settings screens write proxies as proxy.example.com:8080 or http://user:[email protected]:8080 to show the format. example.com is a domain reserved for documentation, so the line cannot work; replace the host, port and login with your own. The proxy server address explainer covers what each part means, and proxy port covers the number after the colon.

Common proxy format mistakes

  • A scheme in a host field. Device settings want gate.proxyfield.io, not http://gate.proxyfield.io:7000.
  • Special characters in the password. In a URL, @, :, / and # must be percent-encoded (@ is %40). The script above does it.
  • Swapped order. user:pass:host:port and host:port:user:pass look alike; if a tool rejects every line, check which order it wants.
  • Hidden spaces and line endings. Lists copied from spreadsheets can carry spaces or Windows line endings that become part of the password.
  • The wrong scheme for the protocol. A SOCKS5 proxy written as http://, or the reverse, fails at the first byte.

ProxyField's configurator in the dashboard generates as many proxy lines as you need, and every line points at the same gateway, gate.proxyfield.io:7000; the username carries the targeting (country and city in the example, <login>-country-us-city-new_york). Region, session and session time go in the same username: -region-<region>, -session-<id> and -ttl-<seconds> (30 to 129,600 seconds, 20 minutes by default), as in <login>-country-us-region-new_york-city-new_york-session-he9f2qga-ttl-600; every part after the login is optional. The quick start walks from purchase to the first request.

Proxy Format FAQ

What is the proxy format?

ProxyField proxies, from $1.95/GB, are written in either proxy format: host:port:user:pass or a URL, protocol://user:pass@host:port, with gate.proxyfield.io:7000 plus your username and password. Lists and antidetect browsers usually take the first, code and command-line tools the second.

What is a proxy server URL?

It is a proxy written as a URL: the scheme (http, https, socks5 or socks5h), then ://, the optional login and @, and the host and port, as in http://<login>:<password>@gate.proxyfield.io:7000. Code, curl and environment variables expect this form.

What is the SOCKS5 proxy format?

The same as other proxies with a SOCKS scheme: socks5://user:pass@host:port, or socks5h:// to resolve website names at the proxy. In list form it is host:port:user:pass, with SOCKS5 chosen in the tool's protocol menu.

What format should my proxy list be in?

One proxy per line, in the format the tool documents, most often host:port:user:pass or host:port for IP-allowlisted proxies. Keep every line in the same format, with no spaces or blank lines.

What proxy format do most tools use?

Code libraries and command-line tools take the URL format; browsers, antidetect browsers and bots usually import host:port:user:pass; device settings ask for host and port in separate fields. Playwright and Puppeteer take the login in separate fields or calls.

In what order do the IP, port, username and password go?

In the common list format: IP or host, port, username, password, separated by colons. Some tools use user:pass:host:port or user:pass@host:port instead, so check the tool's documentation when every line is rejected.

What is a valid proxy address format?

A hostname or IPv4 address, a colon and a port from 1 to 65535, such as gate.proxyfield.io:7000, optionally with a scheme and a login in front. A missing port, a scheme in a host-only field, or unencoded special characters in the password make it invalid.

Can I use proxy.example.com:8080 as a proxy?

No. It is a placeholder from documentation: example.com is reserved for examples, so the line points to no proxy. Replace it with the host, port and login your provider gives you.

What is a proxy formatter?

A tool or script that rewrites proxy lines from one format to another, for example host:port:user:pass into URLs. A few lines of Python do the same and keep your credentials on your machine.

Does reformatting a proxy list tell me if the proxies work?

No. A formatter only rewrites text; whether a proxy works depends on the server, the login and your network. Test the lines with a proxy checker or a curl request after you convert them.

Show 2 more questionsShow fewer questions

What proxy formats does ProxyField support?

ProxyField's gateway speaks HTTP, HTTPS and SOCKS5. With a username and password, write it as an http:// URL or a host:port:user:pass line, whichever your tool wants; SOCKS5 runs on the same gate.proxyfield.io:7000 with the same username and password. The dashboard's configurator generates the lines.

How do I convert host:port:user:pass to a proxy URL?

Rearrange it as http://user:pass@host:port, percent-encoding any @, :, / or # in the username or password. For a whole list, a short script that splits each line on colons does it in one pass.

Easy Trial: 1 GB for $2.95.

Try for the price of 1 GB, no subscription, traffic never expires.