> ## Documentation Index
> Fetch the complete documentation index at: https://help.decodo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 简介

> 移动代理高级参数规范以控制您的连接

Decodo 通过单个**回连**端点和端口提供可自定义的代理访问：`gate.decodo.com:7000`。

要在请求中指定所有代理参数，您可以使用以下两种方法之一：

1. [**用户名和密码**](https://help.decodo.com/docs/cn/mobile-proxy-user-pass-requests#/)。
2. [**白名单IP**](https://help.decodo.com/docs/cn/mobile-proxy-whitelisted-ip-requests#/)。

***

## 可用参数

| 参数                | 示例值               | 描述                                                                                |
| ----------------- | ----------------- | --------------------------------------------------------------------------------- |
| `country`         | `us`              | 国家代码。请以两个字母的ISO格式提供。您可以在[**这里**](https://www.iban.com/country-codes)查看大多数ISO国家代码。 |
| `city`            | `berlin`          | 城市名称。添加此参数可以指定您想要使用的IP地址所在的城市。请将此参数与`country`参数一起使用。                              |
| `state`           | `us_california`   | 美国州。当您选择`us`作为国家参数时支持**美国**位置。它将允许您指定想要使用的IP所在的美国州。                               |
| `session`         | `randomstring123` | 用于创建会话的随机字符串，允许在多个请求中使用相同的IP。会话默认在`10`分钟内自动过期。之后，将为此会话ID分配新的IP。                   |
| `sessionduration` | `180`             | 与`session`一起使用。以分钟为单位指定粘性会话时间 - 可以设置为`1`到`1440`之间的任何数字，以覆盖默认的`10`分钟粘性会话。          |
| `zip`             | `10001`           | **5位数**`ZIP`代码。添加此参数可以指定您想要定位的邮政编码位置。它仅适用于定位**美国**位置，应与`country-us`参数字符串一起使用。     |
| `asn`             | `20057`           | 定位特定运营商的ASN号码。您可以通过在线搜索查找运营商号码，例如[**这里**](https://asnlookup.com)。                 |
| `continent`       | `as`              | 大陆代码。                                                                             |

<Note>
  ### ASN过滤

  * 您必须在`city`定位和`asn`定位之间进行选择，因为它们不能同时使用。
  * 相同的逻辑也适用于`continent`、`state`和`country`参数。
</Note>

***

## 应用程序支持

### 用户名:密码方法

回连入口节点也可以在各种应用程序中使用。在这种情况下，您需要在**用户名**字段中传递会话的每个参数以及用户名，如下所示：

`user-username-country-country_code-city-city_name-session-randomstring`

在上面的示例中，`username`代表您的代理用户名，您需要从身份验证部分获取。在`password`字段中，您只需要输入代理用户的密码。

更多信息请参阅我们的[**用户名:密码请求**](https://help.decodo.com/docs/cn/mobile-proxy-user-pass-requests)部分。

<Note>
  **会话ID**可以由您选择的任何字符串定义（只需替换示例中的"randomstring123"）。仅在需要粘性会话时使用**会话ID**。否则，只需忽略该部分即可获得**轮换代理**。

  当城市或州名称由多个单词组成时，请使用下划线。例如：`las_vegas`、`us_new_york`或`us_rhode_island`。
</Note>

### 白名单IP方法

由于此方法不包含用户名，您必须在**端点**中指定回连参数，如下所示：

`https://country-country_code-city-city_name-session-randomstring.gate.smartproxy.com:7000`

更多信息请参阅我们的[**白名单IP请求**](https://help.decodo.com/docs/cn/mobile-proxy-whitelisted-ip-requests)部分。

<Warning>
  ### 白名单IP身份验证限制

  * **白名单IP**身份验证仅支持`HTTPS`请求。
  * 白名单IP身份验证目前不支持`IPv6` IP地址。请使用`IPv4`格式的IP（`xx.xx.xx.xx`）。
</Warning>

***

## cURL示例

要使用这些命令，只需将`username`和`password`替换为您的代理用户凭据，然后在终端或命令提示符中运行它们。

##### 从随机位置获取IP，使用轮换会话

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -U "username:password" -x "gate.decodo.com:7000" "https://ip.decodo.com/json"
  ```
</CodeGroup>

##### 从特定国家（在此示例中为意大利）获取IP，使用轮换会话

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -U "user-username-country-it:password" -x "gate.decodo.com:7000" "https://ip.decodo.com/json"
  ```
</CodeGroup>

##### 从特定城市（在此示例中为伦敦）获取IP，使用轮换会话

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -U "user-username-country-gb-city-london:password" -x "gate.decodo.com:7000" "https://ip.decodo.com/json"
  ```
</CodeGroup>

##### 从特定美国州（在此示例中为加利福尼亚州）获取IP

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -U "user-username-country-us-state-us_california:password" -x "gate.decodo.com:7000" "https://ip.decodo.com/json"
  ```
</CodeGroup>

##### 从特定ASN（在此示例中为AT\&T Mobility LLC）获取IP，使用轮换会话

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -U "user-username-asn-20057:password" -x "gate.decodo.com:7000" "https://ip.decodo.com/json"
  ```
</CodeGroup>

##### 从特定国家（在此示例中为葡萄牙）获取IP，使用会话ID

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -U "user-username-country-pt-session-randomstring123:password" -x "gate.decodo.com:7000" "https://ip.decodo.com/json"
  ```
</CodeGroup>

##### 使用邮政编码从特定美国位置（在此示例中为纽约）获取IP，使用会话ID和30分钟会话持续时间

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -U "user-username-country-us-zip-10001-session-randomstring123-sessionduration-30:password" -x "gate.decodo.com:7000" "https://ip.decodo.com/json"
  ```
</CodeGroup>

<Note>
  使用任何回连参数时，您的用户名也被视为参数之一。因此，您需要在指定用户名之前添加`user-`前缀，就像所有其他参数一样。
</Note>

***

<Columns cols={2}>
  <Card title="支持" href="https://direct.lc.chat/12092754" cta="让我们聊聊！">
    需要帮助或只是想打个招呼？我们的支持团队全天候为您服务。 \
    您也可以随时通过电子邮件 [support@decodo.com](mailto:support@decodo.com) 联系我们。
  </Card>

  <Card title="反馈" href="mailto:feedback@decodo.com" cta="分享反馈">
    找不到您要找的内容？请求一篇文章！ \
    有反馈意见？分享您对我们如何改进的想法。
  </Card>
</Columns>
