> ## 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.

# 用户名:密码请求

> 通过用户名:密码身份验证使用专用ISP代理高级参数

***

使用**回连**时，端点代理**服务器**保持不变：`isp.decodo.com`

对于**静态**连接会话，代理**端口**是以下范围内的任意数字：`10001`-`63000`

<Note>
  如果您使用的端口号超过了您计划购买的IP总数，端口将循环使用您现有的IP。
</Note>

对于**轮换**连接会话，代理**端口**是：`10000`

下面的示例中将显示`cURL`代码。您可以在您的机器上尝试它们。

<Note>
  ### 城市、州和ASN参数

  * 客户必须已购买某个国家/地区的IP，才能定位其城市或ASN。
  * 用户必须在城市定位、州定位和ASN定位之间进行选择，因为它们不能同时使用。
</Note>

***

## **用户名:密码**

<Note>
  **用户名和密码参数**

  要使用代理用户名和密码，请注意您的用户名行将**始终**以`user-`开头，后跟您的代理用户名。
</Note>

使用代理用户名和密码的**轮换代理**示例，从随机位置返回IP地址：

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

将`username`和`password`替换为您的凭据，并在您的**终端**或**命令提示符**中运行该命令。

您将在输出中看到为此特定请求分配给您的IP地址，以及该IP地址的信息，包括其位置。

***

## **直接IP定位**

可以从您购买的代理IP列表中将特定IP地址作为参数进行定位。要查找您的代理IP，请导航至[**<u>静态住宅 → 专用ISP → 代理设置</u>**](https://dashboard.decodo.com/dedicated-isp-proxies/proxy-setup?tab=endpoints)仪表板页面。然后，点击**我的IP列表**选项卡。在下面的表格中，您将找到您购买的**IP地址**、它们的原产**国家**和**ASN**。

<Note>
  请记住，列出的某些IP可能没有关联的ASN。
</Note>

<img src="https://mintcdn.com/decodo/7ZKpc3GV1DKO_XQr/images/51ba1aef76c64abbe5314fea8231d2d6ac1f03ffd8a351c4fe733da1fc61c1c6-Group_427323599.png?fit=max&auto=format&n=7ZKpc3GV1DKO_XQr&q=85&s=9016480b6c774c45add30703b124acea" alt="51ba1aef76c64abbe5314fea8231d2d6ac1f03ffd8a351c4fe733da1fc61c1c6 Group 427323599" style={{ width:"89%" }} width="3516" height="2504" data-path="images/51ba1aef76c64abbe5314fea8231d2d6ac1f03ffd8a351c4fe733da1fc61c1c6-Group_427323599.png" />

如果您希望生成**端点列表**（然后可以导出）或带有特定IP地址的**请求示例**，在同一**代理设置**页面中，点击**直接IP**字段，在下拉菜单中勾选您首选的代理IP地址。在那里，您可以选择所有IP或使用搜索栏查找特定IP。

<img src="https://mintcdn.com/decodo/7ZKpc3GV1DKO_XQr/images/af7a44ee10eb94abde71e1ddcae5a1bafe85da6c54c6b895fb822f43409d13b0-Group_427323600.png?fit=max&auto=format&n=7ZKpc3GV1DKO_XQr&q=85&s=4df221ea43108cf971c14132218bdca1" alt="Af7a44ee10eb94abde71e1ddcae5a1bafe85da6c54c6b895fb822f43409d13b0 Group 427323600" style={{ width:"89%" }} width="3784" height="2516" data-path="images/af7a44ee10eb94abde71e1ddcae5a1bafe85da6c54c6b895fb822f43409d13b0-Group_427323600.png" />

返回**特定IP地址**的**静态代理**示例。代理IP保持未指定。

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

***

### 国家定位

如果需要来自特定国家的IP，则修改用户名以包含`country-xx`参数。使用两个字母的Alpha-2代码。[**<u>这里</u>**](https://www.iban.com/country-codes)有完整的列表。

<Note>
  [**<u>这里</u>**](https://help.decodo.com/docs/cn/dedicated-isp-proxy-locations)是ISP按IP付费代理可购买位置的完整列表。
</Note>

要查找IP的国家，请前往[**<u>静态住宅 → 专用ISP → 代理设置</u>**](https://dashboard.decodo.com/dedicated-isp-proxies/proxy-setup)仪表板页面。点击**位置**字段，在下拉菜单中，随意选择一个或所有国家。

**请注意**，您只能定位您已**购买**代理IP的国家。

<img src="https://mintcdn.com/decodo/7ZKpc3GV1DKO_XQr/images/6db4e0e5b1a3b82011b73de622ebc023b48847694afceabf3494fdb55a22aa5e-Group_427323607_1.png?fit=max&auto=format&n=7ZKpc3GV1DKO_XQr&q=85&s=e5b3b9f7277ff254dbefb4caedf37894" alt="6db4e0e5b1a3b82011b73de622ebc023b48847694afceabf3494fdb55a22aa5e Group 427323607 1" style={{ width:"91%" }} width="2472" height="1864" data-path="images/6db4e0e5b1a3b82011b73de622ebc023b48847694afceabf3494fdb55a22aa5e-Group_427323607_1.png" />

返回美国IP的**轮换代理**示例：

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

返回意大利IP的**静态代理**示例：

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

***

## 城市定位

在用户名中添加`city-xxxx`参数，以指定某个国家/地区内的城市。

它与`country`参数配合使用，不能单独使用。

如果城市名称由多个单词组成，请使用下划线。

返回纽约市IP的**轮换代理**示例：

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -U "user-username-country-us-city-new_york:password" -x "isp.decodo.com:10000" "https://ip.decodo.com/json?provider=IPinfo"
  ```
</CodeGroup>

返回罗马IP的**轮换代理**示例：

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -U "user-username-country-it-city-rome:password" -x "isp.decodo.com:10000" "https://ip.decodo.com/json?provider=IPinfo"
  ```
</CodeGroup>

***

## 州定位

在用户名中添加`state-xxxxx`将允许进行州定位。目前仅支持美国各州。

返回纽约州IP的**轮换代理**示例：

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -U "user-username-country-us-state-new_york:password" -x "isp.decodo.com:10000" "https://ip.decodo.com/json?provider=IPinfo"
  ```
</CodeGroup>

来自加利福尼亚州的**轮换**IP：

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -U "user-username-country-us-state-california:password" -x "isp.decodo.com:10000" "https://ip.decodo.com/json?provider=IPinfo"
  ```
</CodeGroup>

***

## ASN定位

添加`asn`参数将允许您定位来自特定运营商的IP。

* 您必须在`city`、`state`定位和`asn `定位之间进行选择，因为它们不能同时使用。
  * 相同的逻辑适用于`continent`和`country`参数。
* 使用**AT\&T Mobility LLC** `asn`编号并采用轮换会话的代理示例：

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

***

<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>
