# How to set up Japan and East Asia residential proxies

> Set up Japan, Korea, Taiwan or Hong Kong residential proxies in curl, Python, Node.js, Playwright, Puppeteer and browsers: username format and sessions.

- URL: https://japanproxies.com/guides/setup/
- Last updated: 2026-10-14
- Publisher: JapanProxies (https://japanproxies.com)

Everything goes in the proxy username: the country code and, if you want one IP for a while, a session ID and a duration. Copy-paste examples for the tools people use most.

**Quick answer — How do I connect to a Japanese residential proxy?**

Point your tool at `gw.japanproxies.com` on port 7777 for HTTP and HTTPS, or port 7778 for SOCKS5, with your **JapanProxies** password and the username `USERNAME-country-jp`. Use `kr`, `tw` or `hk` for South Korea, Taiwan or Hong Kong. Add `-session-ID-ttl-30` to keep one IP for 30 minutes. Plans start at $2.62 for 1 GB, paid in crypto with no KYC.

## Connection details

| Attribute | Value |
| --- | --- |
| Host | `gw.japanproxies.com` |
| HTTP / HTTPS port | 7777 |
| SOCKS5 port | 7778 |
| Username format | `USERNAME-country-{cc}-city-{city}-asn-{asn}-session-{id}-ttl-{minutes}` |
| Country codes | `jp` Japan · `kr` South Korea · `tw` Taiwan · `hk` Hong Kong |
| Session ID | Letters and digits you choose; the same ID keeps the same IP while the exit stays online |
| Session length (ttl) | the time you set (ttl, in minutes), up to 30 minutes; the IP can change earlier, for example if the residential device goes offline |
| Password | From your dashboard |

## What goes in the username?

*USERNAME is the base username shown in your dashboard. City segments are not supported in East Asia yet.*

| Username | What you get |
| --- | --- |
| `USERNAME-country-jp` | A Japanese residential IP; each new connection usually gets a different one |
| `USERNAME-country-jp-city-osaka` | A residential IP in Osaka when one is online (city availability varies) |
| `USERNAME-country-kr-asn-4766` | A Korean IP on KT's network (ASN 4766), at no extra cost |
| `USERNAME-country-kr-session-a1-ttl-30` | One Korean IP for up to 30 minutes, as long as you reuse session `a1` |
| `USERNAME-country-tw-session-b7-ttl-30` | One Taiwanese IP for up to 30 minutes; it can change earlier if the device goes offline |
| `USERNAME-country-hk-session-c2-ttl-10` | One Hong Kong IP for up to 10 minutes |

## How do I test the connection with curl?

Run these commands first. The first two print the exit IP and its country (HTTP, then SOCKS5); the third shows that a sticky session keeps the same IP. If both show the right country, any tool will work.

*curl: HTTP and SOCKS5 tests*

```bash
# HTTP proxy (also carries HTTPS through CONNECT)
curl -x http://USERNAME-country-jp:PASSWORD@gw.japanproxies.com:7777 https://ipinfo.io/json

# SOCKS5, with the hostname resolved at the exit
curl --socks5-hostname gw.japanproxies.com:7778 -U USERNAME-country-kr:PASSWORD https://ipinfo.io/json

# Sticky session: run twice, the IP stays the same
curl -x http://USERNAME-country-tw-session-test1-ttl-30:PASSWORD@gw.japanproxies.com:7777 https://ipinfo.io/ip
```

## How do I use the proxy in Python?

With `requests`, pass the same proxy URL for `http` and `https`: the gateway handles HTTPS through CONNECT. If your password contains characters such as `@` or `:`, URL-encode it. For SOCKS5, install `requests[socks]` and use `socks5h://` so DNS is resolved at the exit.

*Python (requests): rotating and sticky*

```python
from urllib.parse import quote

import requests

GATEWAY = "gw.japanproxies.com:7777"
PASSWORD = quote("PASSWORD", safe="")  # encode special characters


def proxies(user):
    url = f"http://{quote(user, safe='')}:{PASSWORD}@{GATEWAY}"
    return {"http": url, "https": url}


# Rotating: each new connection (one per request here) usually gets a new Japanese IP
for _ in range(3):
    print(requests.get("https://ipinfo.io/ip", proxies=proxies("USERNAME-country-jp"), timeout=30).text)

# Sticky: the same Korean IP for up to 30 minutes
sticky = proxies("USERNAME-country-kr-session-kr42-ttl-30")
for _ in range(3):
    print(requests.get("https://ipinfo.io/ip", proxies=sticky, timeout=30).text)
```

*Python (requests) over SOCKS5 — pip install "requests[socks]"*

```python
import requests

proxy = "socks5h://USERNAME-country-hk:PASSWORD@gw.japanproxies.com:7778"
r = requests.get("https://ipinfo.io/json", proxies={"http": proxy, "https": proxy}, timeout=30)
print(r.json()["country"])  # HK
```

## How do I use the proxy in Node.js?

The `undici` package, which powers Node's built-in `fetch`, has a `ProxyAgent` for HTTP proxies. Install it with `npm install undici` and pass the agent as the `dispatcher`.

*Node.js (undici): fetch through a Taiwanese IP*

```javascript
import { ProxyAgent, fetch } from "undici";

const agent = new ProxyAgent(
  "http://USERNAME-country-tw-session-tw7-ttl-30:PASSWORD@gw.japanproxies.com:7777"
);

const res = await fetch("https://ipinfo.io/json", { dispatcher: agent });
const info = await res.json();
console.log(info.ip, info.country); // TW
```

## How do I use the proxy in Playwright or Puppeteer?

Browsers take the server and the credentials separately. In Playwright, pass them in the `proxy` option of `launch()`; set the `locale` and `timezoneId` of the context to match the country when you test localization. In Puppeteer, pass `--proxy-server` at launch and call `page.authenticate()` before the first request.

*Playwright (Python): a Japanese browser context*

```python
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(proxy={
        "server": "http://gw.japanproxies.com:7777",
        "username": "USERNAME-country-jp-session-pw1-ttl-30",
        "password": "PASSWORD",
    })
    context = browser.new_context(locale="ja-JP", timezone_id="Asia/Tokyo")
    page = context.new_page()
    page.goto("https://ipinfo.io/json")
    print(page.inner_text("body"))
    browser.close()
```

*Puppeteer (Node.js): a Korean page*

```javascript
import puppeteer from "puppeteer";

const browser = await puppeteer.launch({
  args: ["--proxy-server=http://gw.japanproxies.com:7777"],
});
const page = await browser.newPage();
await page.authenticate({
  username: "USERNAME-country-kr-session-pp1-ttl-30",
  password: "PASSWORD",
});
await page.setExtraHTTPHeaders({ "Accept-Language": "ko-KR,ko;q=0.9" });
await page.goto("https://ipinfo.io/json");
console.log(await page.evaluate(() => document.body.innerText));
await browser.close();
```

## How do I use the proxy in a browser or on a phone?

- **Firefox:** Settings → Network Settings → Manual proxy configuration. Enter `gw.japanproxies.com` and port 7777 for HTTP, tick "Also use this proxy for HTTPS", then type your username and password when Firefox asks.
- **Chrome and Edge:** they use the system proxy settings; a proxy extension that supports authentication is easier for switching countries.
- **iPhone and iPad:** Settings → Wi-Fi → the (i) next to your network → Configure Proxy → Manual, with server, port and authentication.
- **Android:** the built-in Wi-Fi proxy setting does not ask for a username and password, so use an app or test tool that supports proxy authentication.

Open an IP-check page after you switch, to confirm the country.

## What do common errors mean?

- **407 Proxy Authentication Required:** the username or password is wrong, or a special character in the password is not encoded.
- **Connection timeout:** a firewall blocks outgoing traffic to port 7777 or 7778, or the home connection behind the IP went offline; retry with a new session ID.
- **Wrong country on an IP-check page:** some geolocation databases place IPs wrongly; see [why a proxy shows the wrong location](https://japanproxies.com/guides/check-proxy-location/).
- **A site refuses the connection:** check the site's terms. Banking, government and payment portals and SMTP ports are blocked on every plan.

Still stuck? Email support@japanproxies.com with the time, the country code, the tool and the exact error. Email replies within 12 hours, 7 days a week.

## Setup questions

### Can I use IP allowlisting instead of a password?

You can add up to 10 IPs to an allowlist; connections from those IPs need no password. A username and password work from any network and in every tool. Sub-users get their own credentials and traffic cap, and API keys can be revoked at any time.

### How do I get a new IP?

Without a session, each new connection gets an IP from the pool, usually a different one. To get a new IP on every request, send one request per connection (turn off keep-alive): browsers, `requests.Session` and undici keep connections open. With a sticky session, change the session ID: `session-a1` becomes `session-a2`.

### Can I use several countries at once?

Yes. Run several connections with different country codes in the username, all paid from the same plan.

### Is there an API?

Yes. Account, top-up, order and usage endpoints are documented in the [API reference](https://japanproxies.com/docs/api/), with API keys you can revoke at any time.

### Were these examples tested?

The code was checked for syntax and follows each library's documented proxy options. Replace USERNAME and PASSWORD with your own credentials, then run the curl test first.

### Can a teammate or a script have its own credentials?

Create a sub-user: it gets its own username, password and traffic cap, drawn from your plan, and you can remove it at any time. API keys can also be revoked at any time.

**Ready to connect?** 1 GB for $2.62 covers your first tests in all four countries. No KYC, pay in crypto. [Get started](https://japanproxies.com/pricing/) · [See local site checks](https://japanproxies.com/local-checks/)

---

JapanProxies: JapanProxies is a residential proxy provider for Japan, South Korea, Taiwan and Hong Kong: rotating residential IPs billed per GB, with traffic that never expires, paid in crypto with no KYC — no ID, no selfie, no documents.
