# Proxy connection format: IP:PORT:USERNAME:PASSWORD

> Proxy connection format IP:PORT:USERNAME:PASSWORD: convert to a URL, encode special characters, read TXT and CSV. RackProxies: 1 IP per line, no KYC, crypto.

- URL: https://rackproxies.com/docs/connection-format/
- Last updated: 2026-10-19
- Publisher: RackProxies (https://rackproxies.com)

Each RackProxies IP arrives as one line with four fields. Here is how to turn it into the form your tool expects.

**Quick answer — What is the proxy connection format?**

The proxy connection format at **RackProxies** is one line per IP: `IP:PORT:USERNAME:PASSWORD`, exportable as TXT or CSV. Most tools want a URL instead: `http://USERNAME:PASSWORD@IP:PORT`, with special characters in the password URL-encoded (`@` becomes `%40`). Plans start at $1.29 for one dedicated IPv4 for 30 days. No KYC, paid in crypto.

## The four fields of a line

Example line, with a documentation address: `203.0.113.24:8000:USERNAME:PASSWORD`.

*Each IP is delivered as a line IP:PORT:USERNAME:PASSWORD in your account, exportable as TXT or CSV.*

| Position | Field | Example | Notes |
| --- | --- | --- | --- |
| 1 | IP | 203.0.113.24 | The dedicated IPv4 address; also the exit IP websites see |
| 2 | PORT | 8000 | The port to connect to; use the one listed for the protocol you use |
| 3 | USERNAME | USERNAME | Proxy login; not needed when your own IP is on the allowlist |
| 4 | PASSWORD | PASSWORD | Proxy password; can contain characters that need URL-encoding |

## How do I convert a line to a proxy URL?

Move the username and password to the front, joined by `:`, then add `@`, the IP, `:` and the port, and put a scheme in front. Most libraries accept this URL form.

| Use | Format | Example |
| --- | --- | --- |
| HTTP and HTTPS sites | `http://USERNAME:PASSWORD@IP:PORT` | `http://USERNAME:PASSWORD@203.0.113.24:8000` |
| SOCKS5, DNS on the proxy | `socks5h://USERNAME:PASSWORD@IP:PORT` | `socks5h://USERNAME:PASSWORD@203.0.113.24:PORT` |
| IP allowlist, no login | `http://IP:PORT` | `http://203.0.113.24:8000` |
| Tools with separate fields | server, username, password | `http://203.0.113.24:8000` + `USERNAME` + `PASSWORD` |

The scheme of an HTTP proxy is `http://` even when the website is `https://`: the scheme describes the connection to the proxy, and HTTPS sites go through a CONNECT tunnel. The [SOCKS5 vs HTTP guide](https://rackproxies.com/guides/socks5-vs-http-proxies/) explains `socks5` and `socks5h`.

## How do I URL-encode special characters in a proxy password?

Replace each reserved character with `%` and its hexadecimal code, or let your language do it: `urllib.parse.quote(password, safe='')` in Python, `encodeURIComponent(password)` in JavaScript. RFC 3986 reserves these characters because they separate the parts of a URL. An unencoded `@` in a password, for example, makes the tool read the rest of the password as the host.

| Character | Encoded | Why it breaks a URL |
| --- | --- | --- |
| `@` | `%40` | Separates the login from the host |
| `:` | `%3A` | Separates username from password, and host from port |
| `/` | `%2F` | Starts the path |
| `#` | `%23` | Starts the fragment |
| `?` | `%3F` | Starts the query |
| `%` | `%25` | Starts an encoded character |
| space | `%20` | Not allowed in a URL |

Only the username and password need this. The IP and port never contain reserved characters. In the original `IP:PORT:USERNAME:PASSWORD` line nothing is encoded, so split it on the first three colons only: a password may contain `:` itself.

## Can I convert a whole list at once?

Yes. Export your list as TXT from your account, then run one of the scripts below. Each reads `proxies.txt` (or the file you pass), splits each line on its first three colons, encodes the login and prints an HTTP URL and a `socks5h://` URL per IP. If your account lists a separate SOCKS5 port, use that port in the SOCKS5 URL.

*to_urls.py (Python 3, standard library only)*

```python
"""Turn IP:PORT:USERNAME:PASSWORD lines into proxy URLs, with safe encoding."""
import sys
from urllib.parse import quote


def to_proxy_url(line, scheme='http'):
    # maxsplit=3 keeps a password that itself contains ':' in one piece
    ip, port, user, password = line.strip().split(':', 3)
    return f'{scheme}://{quote(user, safe="")}:{quote(password, safe="")}@{ip}:{port}'


path = sys.argv[1] if len(sys.argv) > 1 else 'proxies.txt'
with open(path, encoding='utf-8') as handle:
    for line in handle:
        if line.strip():
            print(to_proxy_url(line))                    # HTTP proxy URL
            print(to_proxy_url(line, scheme='socks5h'))  # SOCKS5, DNS on the proxy
```

*to_urls.mjs (Node.js 18 or later)*

```javascript
// Turn IP:PORT:USERNAME:PASSWORD lines into proxy URLs (Node.js 18 or later).
import { readFileSync } from 'node:fs';

function toProxyUrl(line, scheme = 'http') {
  const [ip, port, user, ...rest] = line.trim().split(':');
  const password = rest.join(':'); // a password may itself contain ':'
  return `${scheme}://${encodeURIComponent(user)}:${encodeURIComponent(password)}@${ip}:${port}`;
}

const lines = readFileSync(process.argv[2] ?? 'proxies.txt', 'utf8').split(/\r?\n/).filter(Boolean);
for (const line of lines) {
  console.log(toProxyUrl(line));
  console.log(toProxyUrl(line, 'socks5h'));
}
```

*Output for a password containing @, : and /*

```text
http://user-7:p%40ss%3Aw%2Frd%231@203.0.113.97:8000
socks5h://user-7:p%40ss%3Aw%2Frd%231@203.0.113.97:8000
```

## What is in the TXT and CSV exports?

The TXT export has one `IP:PORT:USERNAME:PASSWORD` line per IP and nothing else, which suits scripts and tools that import proxy lists. The CSV export contains at least IP, port, username, password, country and end date, which suits spreadsheets and inventory.

Before you read the CSV in code, open it once and check the header row for the exact column names; read columns by name, not by position. Python's `csv.DictReader` does this. Keep both files private: they contain your proxy passwords. If a file leaks, write to support with the affected IPs, never the passwords.

## Which format does my tool expect?

Most tools want either the URL form or separate fields:

- **curl:** `-x http://USERNAME:PASSWORD@IP:PORT`, or `-x http://IP:PORT -U USERNAME:PASSWORD`.
- **Python requests and aiohttp:** the URL form; see the [code examples](https://rackproxies.com/docs/code-examples/).
- **Node.js (undici, https-proxy-agent):** the URL form.
- **Playwright and browsers:** separate fields: `server`, `username`, `password`.
- **Scraping frameworks and proxy managers:** often the raw `IP:PORT:USERNAME:PASSWORD` line or `USERNAME:PASSWORD@IP:PORT`; check their import screen.

With the IP allowlist, every format drops the username and password: `IP:PORT` or `http://IP:PORT`. Username and password, or an IP allowlist (up to 10 IPs).

## Connection format questions

### Why does my tool read the password as part of the host?

Because the password contains `@`, `:` or `/` and was not URL-encoded. The tool sees the first `@` as the end of the login. Encode the password with `urllib.parse.quote(password, safe='')` in Python or `encodeURIComponent(password)` in JavaScript, then build the URL again.

### Is the port the same for HTTP and SOCKS5?

Use the port listed in your account for the protocol you want. HTTP, HTTPS (CONNECT) and SOCKS5 are supported on every IP. If your account shows one port per IP, that port is the one to use; if it shows a separate SOCKS5 port, use that one in `socks5h://` URLs.

### Why do I get a 407 error with a line that looks right?

Look for invisible characters first: a trailing space or a Windows line ending (``) copied with the line becomes part of the password. Then check that special characters are URL-encoded and that the port matches the protocol. Strip each line before splitting it, as the scripts above do with `strip()` and `trim()`.

### Does the CSV include the country and end date of each IP?

Yes. The CSV export contains at least IP, port, username, password, country and end date. Read the header row for the exact column names before you parse it in code. The TXT export holds only the `IP:PORT:USERNAME:PASSWORD` lines, which suits tools that import a plain list.

### What does the line look like with the allowlist?

The line stays the same in your account, but you only need the first two fields: `IP:PORT`, or `http://IP:PORT` as a URL. The proxy recognises your connection by its source IP, so no username or password is sent. Add the public IP of each machine that connects, up to the allowlist limit.

### Do I need ID to get a proxy list?

No. No KYC: no ID, no selfie, no documents to sign up, top up or buy. You pay in BTC, USDT, USDC, ETH, SOL, LTC, and the list appears in your account after the plan is bought from your confirmed balance. One IP costs $1.29 for 30 days; see [pricing](https://rackproxies.com/pricing/).

**Get your first line** 1 IP for $1.29. No KYC, paid in crypto. [See pricing](https://rackproxies.com/pricing/) · [Quickstart](https://rackproxies.com/docs/quickstart/)

## References

1. [RFC 3986: Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986) — IETF (2026-10-19)
2. [urllib.parse.quote: Python standard library](https://docs.python.org/3/library/urllib.parse.html) — Python Software Foundation (2026-10-19)
3. [encodeURIComponent()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) — MDN Web Docs (2026-10-19)
4. [curl man page (-x, -U)](https://curl.se/docs/manpage.html) — curl project (2026-10-19)
5. [RFC 5737: IPv4 Address Blocks Reserved for Documentation](https://www.rfc-editor.org/rfc/rfc5737) — IETF (2026-10-19)

---

RackProxies: RackProxies is a dedicated datacenter proxy provider: IPv4 addresses rented per IP for 30 days, paid in crypto with no ID upload. Pages cover 22 countries and 34 datacenter cities with public network data.
