# How to set up proxies from AsiaProxies

> Set up proxies from AsiaProxies in 5 tools: cURL, Python requests, Node.js, Playwright and Scrapy. Country, city and session targeting. No KYC, pay in crypto.

- URL: https://asiaproxies.com/guides/setup/
- Last updated: 2026-10-05
- Publisher: AsiaProxies (https://asiaproxies.com)

Copy-paste examples for the AsiaProxies gateway, with country, city and sticky-session targeting and mobile IP rotation.

**Quick answer — How do I set up proxies from AsiaProxies?**

To set up **AsiaProxies** proxies, point your tool to gw.asiaproxies.com on port 7777 for HTTP or 7778 for SOCKS5. Then log in with your dashboard username and password. You choose the country, city and session inside the username. Residential traffic costs from $0.50/GB, with **no KYC** and payment in crypto. Setup takes a few minutes.

## Connection details

| Attribute | Value |
| --- | --- |
| Gateway host | gw.asiaproxies.com |
| HTTP / HTTPS port | 7777 |
| SOCKS5 port | 7778 |
| Username template | `USERNAME-country-{cc}-city-{city}-session-{id}-ttl-{minutes}` |
| Sticky sessions | up to 60 minutes |
| Mobile IP rotation link | `https://asiaproxies.com/api/v1/mobile/{port}/rotate?key=API_KEY` |
| Blocked | Bank, government and payment-portal sites; SMTP ports |
| KYC | None — no ID, no selfie, no documents |

## How do I get from purchase to first request?

These five steps take a few minutes after your crypto payment confirms.

1. **Buy a pack** — Choose a residential pack, a dedicated port or mobile data on the pricing page. Pay in USDT, BTC, ETH, USDC, LTC or SOL.
2. **Copy your credentials** — Open the dashboard and copy your proxy username and password. Keep them private.
3. **Build the username** — Add the country code, and optionally a city, session ID and TTL, using the template USERNAME-country-{cc}-city-{city}-session-{id}-ttl-{minutes}.
4. **Configure your tool** — Enter host gw.asiaproxies.com and port 7777 (HTTP) or 7778 (SOCKS5) in your tool.
5. **Test the exit IP** — Request https://ipinfo.io/json through the proxy. The country and city in the reply should match your settings.

## How does the targeting syntax work?

You control the exit IP through the parts of the username. The template is `USERNAME-country-{cc}-city-{city}-session-{id}-ttl-{minutes}`.

| Part | What it does | Example |
| --- | --- | --- |
| `country-{cc}` | Two-letter country code of the exit IP | `country-jp`, `country-in`, `country-id` |
| `city-{city}` | City of the exit IP, as listed in your dashboard. Leave it out for any city. | `city-tokyo`, `city-jakarta` |
| `session-{id}` | Any short string. The same ID keeps the same IP. | `session-a1b2c3` |
| `ttl-{minutes}` | Length of the sticky session in minutes (up to 60 minutes) | `ttl-10`, `ttl-30` |

Leave out the session and ttl parts to get a new IP on every request. The dashboard can build the exact username for you.

Common codes in East Asia are `jp` Japan, `kr` South Korea, `hk` Hong Kong and `tw` Taiwan. In South-East Asia, use `id` Indonesia, `vn` Vietnam, `ph` Philippines, `th` Thailand, `sg` Singapore and `my` Malaysia. Use `in` for India and `au` for Australia. The [locations page](https://asiaproxies.com/locations/) lists every country.

## How do I use the proxies with cURL?

Use `-x` for the proxy address and `-U` for the username and password. For SOCKS5, use `--socks5-hostname`, so DNS lookups also happen in the target country.

*cURL: rotating, sticky and SOCKS5*

```bash
# Username template: USERNAME-country-{cc}-city-{city}-session-{id}-ttl-{minutes}

# 1. Rotating Korean IP (new IP on each request)
curl -x "http://gw.asiaproxies.com:7777" \
  -U "USERNAME-country-kr:PASSWORD" https://ipinfo.io/json

# 2. Sticky IP in Tokyo for 30 minutes
curl -x "http://gw.asiaproxies.com:7777" \
  -U "USERNAME-country-jp-city-tokyo-session-a1b2c3-ttl-30:PASSWORD" \
  https://ipinfo.io/json

# 3. Same over SOCKS5, with DNS resolved through the proxy
curl --socks5-hostname "gw.asiaproxies.com:7778" \
  -U "USERNAME-country-jp-city-tokyo-session-a1b2c3-ttl-30:PASSWORD" \
  https://ipinfo.io/json
```

## How do I use the proxies with Python requests?

Pass a `proxies` dictionary to each request. The username template contains `{cc}`, `{city}`, `{id}` and `{minutes}` placeholders, so Python's `str.format` fills it directly. For SOCKS5, install `requests[socks]` and use the `socks5h://` scheme.

*Python requests: sticky session in Jakarta*

```python
import requests

HOST = "gw.asiaproxies.com"
HTTP_PORT = 7777
SOCKS_PORT = 7778
TEMPLATE = "USERNAME-country-{cc}-city-{city}-session-{id}-ttl-{minutes}"
PASSWORD = "PASSWORD"

user = TEMPLATE.format(cc="id", city="jakarta", id="job42", minutes=15)

http_proxy = f"http://{user}:{PASSWORD}@{HOST}:{HTTP_PORT}"
proxies = {"http": http_proxy, "https": http_proxy}

# SOCKS5 alternative (pip install "requests[socks]")
# socks = f"socks5h://{user}:{PASSWORD}@{HOST}:{SOCKS_PORT}"
# proxies = {"http": socks, "https": socks}

r = requests.get("https://ipinfo.io/json", proxies=proxies, timeout=30)
print(r.status_code, r.json().get("country"), r.json().get("city"))
```

## How do I use the proxies with Node.js?

In Node.js 18 and later, use the `undici` package and its `ProxyAgent`. Pass the agent as the `dispatcher` option of `fetch`.

*Node.js (undici): rotating Indian IP*

```javascript
// npm install undici
import { ProxyAgent, fetch } from 'undici';

const template = 'USERNAME-country-{cc}-city-{city}-session-{id}-ttl-{minutes}';
console.log('Username template:', template);

// Rotating IP in India: only the country part
const user = 'USERNAME-country-in';
const agent = new ProxyAgent(
  `http://${user}:PASSWORD@gw.asiaproxies.com:7777`
);

const res = await fetch('https://ipinfo.io/json', { dispatcher: agent });
console.log(await res.json());
```

## How do I use the proxies with Playwright?

Pass the proxy server, username and password in the `proxy` option of `launch`. Use a sticky session, so the whole browser session keeps one IP.

*Playwright (Python): browse with a Singapore IP*

```python
# pip install playwright && playwright install chromium
from playwright.sync_api import sync_playwright

TEMPLATE = "USERNAME-country-{cc}-city-{city}-session-{id}-ttl-{minutes}"
user = TEMPLATE.format(cc="sg", city="singapore", id="pw01", minutes=20)

with sync_playwright() as p:
    browser = p.chromium.launch(proxy={
        "server": "http://gw.asiaproxies.com:7777",
        "username": user,
        "password": "PASSWORD",
    })
    page = browser.new_page()
    page.goto("https://ipinfo.io/json")
    print(page.inner_text("body"))
    browser.close()
```

## How do I use the proxies with Scrapy?

Scrapy's built-in `HttpProxyMiddleware` reads the `proxy` key in `request.meta`. Put the username and password in the proxy URL. Keep the request rate polite and follow each site's terms.

*Scrapy: rotating Thai IP for each request*

```python
import scrapy

PROXY = "http://USERNAME-country-th:PASSWORD@gw.asiaproxies.com:7777"

class PriceSpider(scrapy.Spider):
    name = "prices"
    custom_settings = {"DOWNLOAD_DELAY": 1.0, "CONCURRENT_REQUESTS": 8}

    def start_requests(self):
        yield scrapy.Request("https://ipinfo.io/json", meta={"proxy": PROXY})

    def parse(self, response):
        self.logger.info(response.text)
```

## How do I rotate the IP on a dedicated mobile port?

Call the rotation link of your port, wait a few seconds, then send new requests. The link is `https://asiaproxies.com/api/v1/mobile/{port}/rotate?key=API_KEY`. Replace `{port}` with your port number and `API_KEY` with the key from your dashboard. The host, port, username and password of each dedicated port are also in the dashboard. You can set an automatic timer there instead. Read more on the [mobile proxies page](https://asiaproxies.com/mobile-proxies/).

*cURL: rotate a dedicated 4G/5G port*

```bash
# 1. Check the current IP (HOST and PORT from your dashboard)
curl -x "http://USERNAME:PASSWORD@HOST:PORT" https://ipinfo.io/json

# 2. Ask the modem for a new IP (replace {port} and API_KEY)
curl "https://asiaproxies.com/api/v1/mobile/{port}/rotate?key=API_KEY"

# 3. Wait for the modem to reconnect, then check again
sleep 10
curl -x "http://USERNAME:PASSWORD@HOST:PORT" https://ipinfo.io/json
```

## Why is my proxy not working?

Most problems come from the username, the balance or a blocked target. Check the table, then contact support if the problem stays. Email replies within 12 hours, 7 days a week.

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| Error 407 Proxy Authentication Required | Wrong username or password, or a typo in the targeting parts | Copy both again from the dashboard. Check the country code. |
| Error 407 after it worked before | Your GB balance is empty or your port has expired | Check the balance in the dashboard and buy a new pack. |
| The exit IP is in the wrong country | The country part is missing, or the tool ignores the username | Test with cURL first. Then copy the same username into your tool. |
| The IP changes during a session | No session ID, or the TTL has ended | Add `session-{id}` and a longer `ttl-{minutes}` value. |
| Connection refused or timeout | Wrong port, or a firewall blocks outgoing traffic | Use 7777 for HTTP and 7778 for SOCKS5. Allow these ports. |
| A bank or government site does not load | The target is blocked by policy | This is expected. These targets are blocked for every account. |
| Email sending fails | SMTP ports are blocked | This is expected. Use your email provider's own service. |
| The mobile IP does not change | The rotation call used the wrong port or API key | Check `{port}` and `API_KEY`, then wait a few seconds. |

## Setup FAQ

### Do I need a different host for each country?

No. Every country uses the same gateway, gw.asiaproxies.com. You choose the country with the country code in the username, for example country-jp for Japan or country-vn for Vietnam. This keeps your tool settings the same when you switch countries. Only the username changes.

### Should I use HTTP or SOCKS5?

Use HTTP on port 7777 for most web scraping and browser tools, because almost every tool supports it. Use SOCKS5 on port 7778 when a tool needs other TCP traffic. With SOCKS5, use socks5h in Python or --socks5-hostname in cURL, so DNS lookups also go through the proxy.

### Can I whitelist my IP instead of using a password?

The examples in this guide use username and password login, because the username also carries your targeting settings. Check your dashboard for the login options available to your account. If you have a question about your setup, contact support, which replies within 12 hours.

### How do I check that targeting works?

Send a request to https://ipinfo.io/json through the proxy. The reply shows the country, city and network name of the exit IP. Compare them with the country and city in your username. Do this test once with cURL before you configure a larger tool.

### How many requests can I send at once?

Residential packs are billed per GB, so the number of parallel requests does not change the price. Keep your rate polite for each target site, and follow its terms. A delay of about one second per request is a good starting point for price monitoring jobs.

### Does setup require KYC or an email?

No. You get your proxy credentials right after your crypto payment confirms. There is no KYC: no ID, no selfie, no documents. Email is optional; you log in with your account number. The acceptable use policy applies to every account.

**Ready to connect?** Buy a 1 GB test pack for $1.50 (paid from a $25 minimum top-up; the rest stays on your balance, never expires and is not refundable), paid in crypto, no KYC. [See pricing](https://asiaproxies.com/pricing/) · [Read the FAQ](https://asiaproxies.com/faq/)

---

AsiaProxies: AsiaProxies — residential and 4G/5G proxies across Asia-Pacific: IPs in Japan, Korea, India, Indonesia, Vietnam, the Philippines, Thailand, Singapore and Australia, paid in crypto with no KYC. Residential from $0.50/GB.
