Proxy Format: user:pass@host:port vs host:port:user:pass
The same proxy can be written four ways. Pick the one your tool asks for, and convert the rest without retyping the password.
Four ways to write one proxy
Four ways to write one proxy
Item
Example
Typical place to type it
Fields in separate boxes
Host, Port, Login, Password
Browser, Telegram, system and app proxy forms
HOST:PORT:LOGIN:PASSWORD
HOST:2222:LOGIN:PASSWORD
Bulk-import boxes with one proxy per line
LOGIN:PASSWORD@HOST:PORT
LOGIN:PASSWORD@HOST:2222
Tools that take one proxy string without a protocol
URL form
http://LOGIN:PASSWORD@HOST:2222
curl, Python Requests, environment variables
Layouts as described in the curl manual and the Requests documentation (read 15 November 2026) and in the Proxy302 bulk-import and Dolphin {anty} format guides. The last column is typical, not a rule: the hint under the input box of your own tool decides.
A URL has the shape scheme://userinfo@host:port, so the login and password come first and are separated from the host by @. A list layout has no such marker, so the tool counts colons: first field host, second port, third login, fourth password.
That counting is what breaks when the password itself holds a colon or an @. In the URL form those characters must be percent-encoded, as the curl manual says: @ becomes %40 and a colon becomes %3a. In a bulk-import box there is usually no encoding; the safest fix is a password without those characters, or a tool that documents how it splits.
The scheme also matters. curl treats a proxy with no scheme or with http:// as an HTTP proxy, and socks5:// or socks5h:// as SOCKS5, so the port must match: 2222 for HTTP and 3333 for SOCKS5 on Proxy302.
from urllib.parse import quote
import re
def parse(line):
line = line.strip()
if "://" in line:
line = line.split("://", 1)[1]
if re.match(r"^[^:@/]+:\d+:", line): # HOST:PORT:LOGIN:PASSWORD
host, port, user, password = line.split(":", 3)
elif "@" in line: # LOGIN:PASSWORD@HOST:PORT
auth, _, hostport = line.rpartition("@")
user, _, password = auth.partition(":")
host, _, port = hostport.rpartition(":")
else:
raise ValueError("unknown format: " + line)
return host, port, user, password
def to_at(h, p, u, pw):
return f"{u}:{pw}@{h}:{p}"
def to_colon(h, p, u, pw):
return f"{h}:{p}:{u}:{pw}"
def to_url(h, p, u, pw, scheme="http"):
return f"{scheme}://{quote(u, safe='')}:{quote(pw, safe='')}@{h}:{p}"
for line in open("proxies.txt"):
if line.strip():
print(to_url(*parse(line), scheme="http"))
Example only. It reads proxies.txt with one proxy per line in either list or @ layout (an optional scheme is ignored) and prints http:// URLs with the login percent-encoded. Replace http with socks5h to print SOCKS5 URLs.
Example only: replace the placeholders with the values from My assets. Use the line that matches the protocol of that IP. If the password has special characters, percent-encode them.
The tool says the format is invalid or reads the port as part of the host
Check Is the order host, port, login, password, or login, password, host, port, exactly as the tool's hint shows?
Fix Swap to the layout in the hint. Remove spaces and a trailing newline from the line.
407 or a login prompt that keeps coming back
Check Does the password contain @, a colon or %?
Fix Percent-encode it in URL strings, or paste the login into separate fields. See the 407 guide.
Stop when If a copy-pasted login still fails in curl, stop editing strings and contact Support with the order number.
Connection reset or timeout on port 3333 with an IP bought as HTTP
Check Which protocol was the IP issued with?
Fix Use port 2222 with http://, or buy an IP with SOCKS5 for port 3333.
Proxy format FAQ
What is the correct proxy format?
There is no single one. The same five fields can be written as HOST:PORT:LOGIN:PASSWORD, LOGIN:PASSWORD@HOST:PORT or http://LOGIN:PASSWORD@HOST:PORT. Use the one the tool's input hint shows.
How do I convert host:port:user:pass to user:pass@host:port?
Split the line at the first three colons into host, port, login and password, then join them as login:password@host:port. The awk and Python examples on this page do it.
On Proxy302 the host, port, login and password of every IP are listed in My assets. HTTP uses port 2222 and SOCKS5 uses port 3333, and each IP is issued with one protocol, chosen when you buy.
A static residential IP costs US$0.50 for 1 day and US$7.99 for 30 days (7.99 ÷ 30 ≈ US$0.27 a day), the same in every country. There is no free trial; the smallest purchase is one IP for one day.
Read on 15 November 2026: the authority is [ userinfo "@" ] host [ ":" port ]; userinfo allows percent-encoded characters; the user:password form in userinfo is marked deprecated and a password in it should be treated with care.
Read on 15 November 2026: -x/--proxy takes [protocol://]host[:port]; no protocol or http:// means an HTTP proxy, socks5:// and socks5h:// request SOCKS5; user and password in the proxy string are URL decoded, so @ is written %40 and a colon %3a.
Read on 15 November 2026: for HTTP Basic Auth with a proxy use the http://user:password@host/ syntax in the proxies dictionary or in the HTTP_PROXY / HTTPS_PROXY variables; the docs warn that keeping credentials in environment variables or version-controlled files is a security risk.
Read on 15 November 2026: quote(string, safe) percent-encodes a string; the example quote('/El Niño/') gives '/El%20Ni%C3%B1o/'.
Proxy302 product facts and price list
Product observation · Confirmed on:
Product facts file of the site (values checked against the console, the backend and the price table in October 2026, protocol tests of 4 November 2026): products, prices in US$ (1 PTC = US$1), lease terms, protocols and ports, countries, no free trial.
Ready to try it?
Create an account, top up once, then pick rotating residential, static ISP or datacenter IPs and have one running in your browser within minutes.