Insights

How to Use Static Residential Proxies: A Step-by-Step Guide

Set up a static residential proxy in a browser, curl, and Python, verify the exit IP, and diagnose authentication, timeout, routing, and location issues.

A desktop connects through one stable residential ISP gateway to a verified web endpoint

A static residential proxy gives a browser or application a consistent ISP-associated exit IP. The shortest reliable setup is: copy the five connection fields, configure one client, send a request to an IP-check endpoint, and confirm the same expected exit across repeated checks. The steps below use placeholders so you only replace your own connection values.

Connection fields to collect

Open the purchased static-proxy record in the MIYAIP dashboard and identify the protocol, host, port, username, password, intended location, and expiry. A client may request separate fields even when an exported record uses a colon-separated format.

Field

Where to read it

Check before use

Protocol

Purchased proxy record

Use exactly HTTP or SOCKS5 as shown

Host and port

Connection endpoint

Do not swap the proxy port with a local forwarding port

Username and password

Authentication fields

Copy without spaces; keep both values secret

Country or state

Allocation details

Compare it with the location required by the workload

Expiry

Subscription details

Confirm the allocation is active before debugging the client

Configure, request, and verify

  1. 1. Confirm the allocation and client requirements

    Choose a location that matches the authorized task. Confirm whether the client accepts HTTP, SOCKS5, or both, and whether it supports username/password authentication. Record the subscription expiry so a later expiration is not mistaken for a network failure.

  2. 2. Copy the connection parameters

    Copy each field from the purchased proxy record. If the dashboard exports one line, read it in the documented order below. Do not commit the resulting value.

    PROXY_HOST:PROXY_PORT:PROXY_USER:PROXY_PASSWORD
    MIYAIP static residential proxy dashboard; complete proxy format, proxy domain, IP, port, username, password, and exit IP are all redacted
    Connection fields in the MIYAIP dashboard. The complete proxy format, proxy domain, IP address, port, username, password, and exit IP have all been redacted.
  3. 3. Store the values outside the script

    Set environment variables in the current shell or load them from a secret manager. The following names are used by the commands in this tutorial.

    export PROXY_SCHEME="http"
    export PROXY_HOST="YOUR_PROXY_HOST"
    export PROXY_PORT="YOUR_PROXY_PORT"
    export PROXY_USER="YOUR_PROXY_USER"
    export PROXY_PASSWORD="YOUR_PROXY_PASSWORD"

    In PowerShell, set the same names with $env:PROXY_HOST and the corresponding variables. Clear the shell variables when the test ends.

  4. 4. Record the direct connection as a baseline

    Run the IP check without a proxy. This value is the baseline used to prove that the next request actually uses the proxy route.

    curl --fail --show-error --silent https://api.ipify.org
  5. 5. Send a request through the proxy with curl

    Use the command that matches the purchased protocol. --proxy-user keeps credentials separate from the proxy endpoint. socks5h asks curl to resolve the destination hostname through the SOCKS5 proxy.

    curl --fail --show-error --silent \
      --proxy "http://${PROXY_HOST}:${PROXY_PORT}" \
      --proxy-user "${PROXY_USER}:${PROXY_PASSWORD}" \
      https://api.ipify.org
    curl --fail --show-error --silent \
      --proxy "socks5://${PROXY_HOST}:${PROXY_PORT}" \
      --proxy-user "${PROXY_USER}:${PROXY_PASSWORD}" \
      https://api.ipify.org
    curl --fail --show-error --silent \
      --proxy "socks5h://${PROXY_HOST}:${PROXY_PORT}" \
      --proxy-user "${PROXY_USER}:${PROXY_PASSWORD}" \
      https://api.ipify.org

    On Windows, call curl.exe if PowerShell maps curl to another command.

  6. 6. Configure a browser or proxy-aware client

    Create an isolated browser profile, select the same protocol, and enter host, port, username, and password into their matching fields. Disable other VPN or system proxy routes during the first check. Run the client proxy test, then open an approved IP-check page and compare its result with the purchased allocation.

  7. 7. Verify from Python

    Install requests with SOCKS support, then run the script below. HTTP works with the default requests transport; socks5h requires the PySocks extra included by this install command.

    python -m pip install "requests[socks]==2.*"
    from datetime import datetime, timezone
    import os
    import sys
    import time
    from urllib.parse import quote
    
    import requests
    
    required = ["PROXY_HOST", "PROXY_PORT", "PROXY_USER", "PROXY_PASSWORD"]
    missing = [name for name in required if not os.getenv(name)]
    if missing:
        raise SystemExit(f"Missing environment variables: {', '.join(missing)}")
    
    scheme = os.getenv("PROXY_SCHEME", "http").lower()
    if scheme not in {"http", "socks5h"}:
        raise SystemExit("PROXY_SCHEME must be http or socks5h")
    
    user = quote(os.environ["PROXY_USER"], safe="")
    password = quote(os.environ["PROXY_PASSWORD"], safe="")
    host = os.environ["PROXY_HOST"]
    port = os.environ["PROXY_PORT"]
    proxy_url = f"{scheme}://{user}:{password}@{host}:{port}"
    proxies = {"http": proxy_url, "https": proxy_url}
    endpoint = os.getenv("IP_CHECK_URL", "https://api.ipify.org?format=json")
    interval = int(os.getenv("VERIFY_INTERVAL_SECONDS", "30"))
    
    def get_ip(proxy_config=None):
        with requests.Session() as session:
            session.trust_env = False
            response = session.get(endpoint, proxies=proxy_config, timeout=20)
            response.raise_for_status()
            return response.status_code, response.json()["ip"]
    
    print(f"verified_at_utc={datetime.now(timezone.utc).isoformat()}")
    print(f"client=Python {sys.version.split()[0]}, requests {requests.__version__}")
    
    direct_ip = "unavailable"
    try:
        direct_status, direct_ip = get_ip()
        print(f"direct_status={direct_status}")
    except requests.RequestException as error:
        print(f"direct_check_failed={type(error).__name__}", file=sys.stderr)
    print(f"direct_ip={direct_ip}")
    
    try:
        exits = []
        for attempt in range(3):
            status, exit_ip = get_ip(proxies)
            exits.append(exit_ip)
            print(f"t+{attempt * interval}s status={status} exit_ip={exit_ip}")
            if attempt < 2:
                time.sleep(interval)
        print(f"same_exit={len(set(exits)) == 1}")
        differs = "unavailable" if direct_ip == "unavailable" else direct_ip != exits[0]
        print(f"direct_differs_from_exit={differs}")
    except requests.RequestException as error:
        print(f"proxy_check_failed={type(error).__name__}", file=sys.stderr)
        raise SystemExit(1)
  8. 8. Interpret the repeated checks

    The direct IP and proxy exit should differ. The three proxy checks should normally show the allocated static exit during an active plan. If same_exit is false, first rule out another proxy or VPN, then compare the returned addresses with the dashboard and ask the provider whether an operational replacement occurred.

Verified output (sanitized)

Curl verification is a separate historical run completed at 2026-09-05T08:46:06Z: curl 8.16.0 returned HTTP 200 through http, socks5, and socks5h, with different direct and HTTP-proxy exits. The Python example above was executed on Windows 11 at 2026-10-01T06:27:18.086644+00:00 using Python 3.13.5 and requests 2.32.4 with an existing US/CA static allocation. The direct request and all three HTTP-proxy requests returned 200; the proxy exit stayed the same and differed from the direct exit. Credentials and addresses are redacted in both records.

Verified output (sanitized)
curl_verified_at_utc=2026-09-05T08:46:06Z
curl=8.16.0
curl_http_status=200
curl_socks5_status=200
curl_socks5h_status=200
curl_direct_and_http_exit_differed=true

python_verified_at_utc=2026-10-01T06:27:18.086644+00:00
operating_system=Windows 11
client=Python 3.13.5, requests 2.32.4
proxy_scheme=http
proxy_endpoint=PROXY_HOST_REDACTED:PROXY_PORT_REDACTED
requested_location=US / CA (dashboard allocation, not a geolocation measurement)
wait_between_proxy_requests_seconds=30
direct_status=200
direct_ip=IP_REDACTED_1
t+0s status=200 exit_ip=IP_REDACTED_2
t+30s status=200 exit_ip=IP_REDACTED_2
t+60s status=200 exit_ip=IP_REDACTED_2
same_exit=True
direct_differs_from_exit=True
proxy_request_elapsed_seconds=1.698,32.795,63.891
proxy_series_completed=true

The three Python proxy checks each used a fresh Requests session, with a 30-second wait between requests. Session.trust_env=False kept environment proxy settings out of both the direct baseline and proxy checks; the HTTPS destination used the allocation's HTTP proxy endpoint. These results confirm this allocation during the recorded test window. They do not establish long-term availability or independently verify the dashboard location. Retain UTC time, operating system, actual client versions, protocol, sanitized endpoint, intervals, status codes, and exit comparisons when repeating the check; never retain credentials.

Troubleshooting by symptom

Symptom

Exact checks

Next action

407 Proxy Authentication Required

Re-copy username and password; check field order, active subscription, and any IP allowlist; retry with --proxy-user

Reset or rotate credentials if needed; send support only the UTC time and sanitized error

Connection timeout

Confirm protocol, host, and port; test DNS and outbound firewall access; disable a conflicting VPN; use curl --connect-timeout 10 --max-time 30

Try the provider-recommended gateway, then report timestamp and destination without credentials

Exit IP is unchanged from the direct baseline

Run the direct and proxied commands in the same shell; add curl -v and confirm it connects to the proxy host; inspect system-proxy precedence

Fix the selected profile or route before testing the destination again

Country or state does not match

Compare the dashboard allocation with two approved IP databases; confirm the requested region and whether the result is country- or state-level

Treat geolocation as an estimate and request review or replacement when the mismatch affects the authorized task

Frequently asked questions

Should I choose HTTP or SOCKS5?

Choose the protocol that both the purchased endpoint and client support. HTTP is sufficient for browser and web-request traffic. SOCKS5 is more general; socks5h in curl also resolves the destination hostname through the proxy.

Why does the exit IP not match the purchased IP?

Check the gateway, protocol, port, authentication format, local forwarding rules, and any VPN first. If the proxy route is confirmed, compare the result with the current dashboard record because a provider may replace an allocation for operational reasons.

Will a static residential IP stay unchanged forever?

No. It should normally remain stable during the active allocation, but it can expire or be replaced under provider policy. Monitor expiry and verify the exit before an important authorized workflow.

Can I share one proxy across many environments?

Check the provider's concurrency and usage rules. Isolate unrelated environments and credentials even when reuse is technically possible.

Start small

Start with one verified static IP

Configure one endpoint, verify its exit IP and location, and run a small authorized workload before scaling to more profiles or applications.