> For the complete documentation index, see [llms.txt](https://docs.talordata.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.talordata.com/cn-tw/proxy/mobile-proxies/advanced-features/locations.md).

# 位置設定

為代理 IP 選擇合適的地理位置，對於模擬用戶行為、訪問本地化內容等場景至關重要。

{% hint style="warning" icon="lightbulb-exclamation-on" %}
請將 <mark style="color:$primary;">`username:password`</mark> 和 <mark style="color:$primary;">`host:port`</mark> 替換為您的真實憑證
{% endhint %}

***

### 如何設定位置

您可以通過以下兩種方式指定地區：

1. 在控制面板中直接選擇。
2. 通過用戶名參數設定。在用戶名中添加 `-region-<國家代碼>` 參數，即可指定地區。

&#x20; **示例：**

* **獲取美國 IP：**

```http
curl -x host:port -U "username-zone-roam-region-us:password" ipinfo.io
```

* **獲取英國 IP：**

```http
curl -x host:port -U "username-zone-roam-region-uk:password" ipinfo.io
```

***

### 驗證位置設定

執行測試命令後，檢查 `ipinfo.io` 返回的 `country` 字段是否與您選擇的地區代碼一致。

**輸出示例：**

```http
{
  "ip": "86.189.212.71",
  "city": "Wallsend",
  "region": "England",
  "country": "GB",
  "loc": "54.9911,-1.5340",
  "org": "AS2856 British Telecommunications PLC",
  "postal": "NE28",
  "timezone": "Europe/London",
  "readme": "https://ipinfo.io/missingauth"
}
```
