Premip
← All guides

Proxy setup

How to use cURL with a Premip proxy

cURL is the reference client. If cURL cannot connect, fix HOST, PORT, user, password, and protocol before debugging Scrapy, browsers, or GUIs.

HTTP proxy

Pass -x http://USERNAME:PASSWORD@HOST:PORT. This is the default for most Premip jobs.

SOCKS5

Use --socks5-hostname HOST:PORT and --proxy-user USERNAME:PASSWORD when the client must resolve DNS through the proxy.

Common failures

Exit code 5 often means the proxy handshake failed: wrong port, protocol, or credentials. Exit code 7 is a failed connect to HOST. Timeouts can be the target, not Premip — try example.com first.

Instructions

  1. 1. Export secrets

    export PREMIP_PROXY=http://USERNAME:PASSWORD@HOST:PORT so the command line does not keep passwords in history if you can avoid it.

  2. 2. HTTP test

    curl -x "$PREMIP_PROXY" -I https://example.com

  3. 3. SOCKS5 test

    curl --socks5-hostname HOST:PORT --proxy-user USERNAME:PASSWORD -I https://example.com

  4. 4. Only then point at the real URL

    When example.com works, retry the destination with the same flags.

HTTP proxy with cURL
Replace USERNAME, PASSWORD, HOST, and PORT with values from your dashboard.
curl -x http://USERNAME:PASSWORD@HOST:PORT https://example.com

Related sections

If you still need help, message us on Telegram or email. Include your account email and, if you have one, your order ID.