Connection guide

Point any HTTP, HTTPS or SOCKS5 client at one host and port. Everything else is a tag in the username.

Endpoint

SettingValue
Hostgw.hopnyx.com
Port8000 (HTTP, HTTPS CONNECT and SOCKS5, auto-detected)
Usernamelogin plus optional tags, for example login-country-us
PasswordThe password the bot shows for your proxy user

Get your login and password in @hopnyx_bot or the Mini App. The examples below use login and password as stand-ins.

Quick test

This asks an IP echo service which address it sees. You should get a US residential IP.

Linux and macOS

bash
curl -x http://gw.hopnyx.com:8000 \
  -U 'login-country-us:password' \
  https://api.ipify.org

Windows (cmd)

cmd.exe
curl -x http://gw.hopnyx.com:8000 ^
  -U "login-country-us:password" ^
  https://api.ipify.org

cmd.exe does not understand single quotes. Use double quotes around the login and password, and ^ to continue a line. PowerShell users can use the Linux form with curl.exe and a backtick for line breaks.

One-line form, with credentials in the proxy URL:

any shell
curl -x "http://login-country-us:[email protected]:8000" "https://api.ipify.org"

Tag grammar

The username is your login followed by key and value pairs, all joined with hyphens:

login-country-us-state-ca-city-losangeles-session-abc123-ttl-30m
TagValueMeaning
-country-two letters, usExit country (ISO 3166-1 alpha-2).
-state-letters and digits, caState or region inside the country.
-city-lowercase, no spaces, losangelesCity inside the state or country.
-isp-letters and digitsPreferred internet provider, where the plan supports it.
-session-1 to 32 letters and digits, abc123Sticky session ID. The same ID keeps the same exit IP. No session tag means a new IP per connection.
-ttl-number plus s, m or hHow long a sticky session lasts, for example 90s, 30m, 2h. Up to 24 h.
-privacy-1 or 01: we resolve the domain, the upstream sees only the IP.
  • Tags are case-insensitive, may come in any order, and each may appear once.
  • Values may contain only letters and digits, at most 32 characters. Write newyork, not new-york.
  • The login is 3 to 32 letters and digits. Everything before the first tag is the login.
  • If a place has no match, the gateway drops the narrowest tag it cannot honour and reports that in X-Proxy-Applied.

Sticky sessions

Add a session ID and a lifetime to hold one exit IP across requests. Reuse the same ID to stay on it, and pick a new ID to move to a fresh IP.

bash
for i in 1 2 3; do
  curl -s -x http://gw.hopnyx.com:8000 \
    -U 'login-country-us-session-abc123-ttl-30m:password' \
    https://api.ipify.org; echo
done

All three lines print the same address. Sessions last at most 24 hours. If the residential device behind the IP goes offline, the session can end early and the next request gets a new IP.

SOCKS5

The same host and port accept SOCKS5. Use socks5h so the domain name is sent to the gateway and not resolved on your machine. This also matters for privacy mode.

Linux and macOS

bash
curl --proxy socks5h://gw.hopnyx.com:8000 \
  --proxy-user 'login-country-de:password' \
  https://api.ipify.org

Windows (cmd)

cmd.exe
curl --proxy socks5h://gw.hopnyx.com:8000 ^
  --proxy-user "login-country-de:password" ^
  https://api.ipify.org

Privacy mode

With -privacy-1 the gateway resolves the domain itself and gives the upstream only an IP. Send the domain through the proxy (socks5h, or an HTTP proxy) and not a local DNS answer:

curl --proxy socks5h://gw.hopnyx.com:8000 \
  --proxy-user 'login-country-us-privacy-1:password' \
  https://example.com

IP whitelist

If your client cannot send a username and password, whitelist its public IP in the bot or the Mini App. Connections from that address then need no credentials, and use the default tags you saved for that IP, such as country, sticky lifetime and privacy.

from a whitelisted IP
curl -x http://gw.hopnyx.com:8000 https://api.ipify.org
  • Use a single address or a small range: IPv4 /24 or narrower, IPv6 /56 or narrower.
  • An address that another customer already whitelisted is refused.
  • Behind a shared NAT, everyone on that address uses your plan. Prefer credentials in that case.

Response headers

X-Proxy-Applied

Sent on the proxy response (on the 200 Connection Established reply to CONNECT, and on plain HTTP responses). It states which tags were honoured:

X-Proxy-Applied: country=us;state=ca;city=losangeles;session=sticky;ttl=30m
  • country, state, city: the value used, - if you did not ask, or dropped if we could not honour it.
  • session: sticky or rotating.
  • ttl: the sticky lifetime such as 30m, or -.

See it with curl -v, or on the first line of a CONNECT tunnel:

bash
curl -sv -x http://gw.hopnyx.com:8000 \
  -U 'login-country-us:password' \
  http://example.com -o /dev/null 2>&1 \
  | grep -i x-proxy
cmd.exe
curl -sv -x http://gw.hopnyx.com:8000 ^
  -U "login-country-us:password" ^
  http://example.com -o NUL 2>&1 ^
  | findstr /i x-proxy

X-Proxy-Error

When the gateway refuses or cannot complete a request it sets X-Proxy-Error to a short result code, sometimes followed by a detail after a colon:

HTTP/1.1 407 Proxy Authentication Required
X-Proxy-Error: bad_tags:country must be 2 letters

Errors

Every connection ends with one result code. These are the ones you are likely to see:

X-Proxy-ErrorHTTPWhat to do
auth_required407Send a username and password, or whitelist your IP.
auth_failed407Wrong login or password. Reset it in the bot.
bad_tags407A tag is malformed. The text after the colon says which.
too_many_auth_failures429Too many wrong logins from your IP. Wait and retry.
subscription_expired, subscription_inactive403Buy or renew a plan.
quota_exceeded403The plan's traffic is used up.
too_many_connections, rate_limited429You are over the plan's threads or request rate. Slow down.
account_disabled403The account is suspended. Contact support.
blocked403The destination is on a block list.
privacy_unavailable, privacy_not_allowed403Privacy mode needs a domain target, or is not part of your plan.
dns_not_found, privacy_dns_failed502The domain did not resolve.
upstream_unreachable, upstream_timeout, upstream_error, no_upstream502No exit available for those tags right now. Retry, or relax the city or state tag.
bad_request, bad_target400The request or the target address was malformed.
unavailable, admit_failed503Temporary problem on our side. Retry shortly.

Stuck? Write to @hopnyx_support with the time, your login (never the password) and the X-Proxy-Error value.