Connection guide
Point any HTTP, HTTPS or SOCKS5 client at one host and port. Everything else is a tag in the username.
Endpoint
| Setting | Value |
|---|---|
| Host | gw.hopnyx.com |
| Port | 8000 (HTTP, HTTPS CONNECT and SOCKS5, auto-detected) |
| Username | login plus optional tags, for example login-country-us |
| Password | The 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
curl -x http://gw.hopnyx.com:8000 \
-U 'login-country-us:password' \
https://api.ipify.org
Windows (cmd)
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:
curl -x "http://login-country-us:[email protected]:8000" "https://api.ipify.org"
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.
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
curl --proxy socks5h://gw.hopnyx.com:8000 \
--proxy-user 'login-country-de:password' \
https://api.ipify.org
Windows (cmd)
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.
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, ordroppedif we could not honour it.session:stickyorrotating.ttl: the sticky lifetime such as30m, or-.
See it with curl -v, or on the first line of a CONNECT tunnel:
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
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-Error | HTTP | What to do |
|---|---|---|
auth_required | 407 | Send a username and password, or whitelist your IP. |
auth_failed | 407 | Wrong login or password. Reset it in the bot. |
bad_tags | 407 | A tag is malformed. The text after the colon says which. |
too_many_auth_failures | 429 | Too many wrong logins from your IP. Wait and retry. |
subscription_expired, subscription_inactive | 403 | Buy or renew a plan. |
quota_exceeded | 403 | The plan's traffic is used up. |
too_many_connections, rate_limited | 429 | You are over the plan's threads or request rate. Slow down. |
account_disabled | 403 | The account is suspended. Contact support. |
blocked | 403 | The destination is on a block list. |
privacy_unavailable, privacy_not_allowed | 403 | Privacy mode needs a domain target, or is not part of your plan. |
dns_not_found, privacy_dns_failed | 502 | The domain did not resolve. |
upstream_unreachable, upstream_timeout, upstream_error, no_upstream | 502 | No exit available for those tags right now. Retry, or relax the city or state tag. |
bad_request, bad_target | 400 | The request or the target address was malformed. |
unavailable, admit_failed | 503 | Temporary 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.