> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/products/cn/proxies/residential-proxies/advanced-filters.md).

# 高级筛选器

了解如何使用高级参数按操作系统 (OS) 或 IP 版本筛选住宅代理。

Oxylabs 住宅代理支持高级筛选参数，可按以下条件调整您的代理池 **操作系统（OS）** 平台指纹或 **IP 协议版本（IPv4 vs. IPv6）**.

{% hint style="success" %}
**要启用此功能**，请联系您的客户经理（详情可在 [仪表板](https://dashboard.oxylabs.io/)中查看）。您可能需要完成一个快速的 [KYC](https://oxylabs.io/kyc-and-safety) 流程。
{% endhint %}

<table><thead><tr><th width="117">筛选</th><th width="106">参数</th><th width="221">值</th><th>说明</th></tr></thead><tbody><tr><td><a href="#platform-os-filtering"><strong>平台（OS）</strong></a></td><td><code>平台</code></td><td><code>Windows</code>, <code>macOS</code>, <code>Linux</code>, <code>Android</code>, <code>iOS</code></td><td>将 TCP 连接指纹匹配到目标操作系统。</td></tr><tr><td><a href="#ip-version-selection-ipv4-ipv6"><strong>IP 版本</strong></a></td><td><code>ipversion</code></td><td><code>ipversion-4</code>, <code>ipversion-6</code></td><td>将代理池严格限制为 IPv4 或 IPv6。</td></tr></tbody></table>

## 平台（OS）

该 `平台` 该参数将住宅代理出口节点的传输控制协议（TCP）指纹与指定操作系统匹配。将代理的操作系统指纹与客户端 HTTP 头（例如，在 Windows 上模拟 Chrome）保持一致，可避免目标网站用于检测机器人流量的指纹不匹配。

支持 `平台` 值：

* `Windows`
* `macOS`
* `Linux`
* `Android`
* `iOS`

```
customer-USERNAME-platform-windows:PASSWORD
```

{% hint style="warning" %}
**注意：** 由于住宅代理是动态的对等设备，在组合 `平台` 与 [位置参数](/products/cn/proxies/residential-proxies/location-settings.md) （例如 `城市` 或 `postalcode`).&#x20;
{% endhint %}

#### 代码示例

{% tabs %}
{% tab title="cURL" %}

```bash
curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-platform-windows:PASSWORD" https://ip.oxylabs.io/location
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request

username = 'USERNAME'
password = 'PASSWORD'
entry = f'http://customer-{username}-platform-windows:{password}@pr.oxylabs.io:7777'

query = urllib.request.ProxyHandler({'http': entry, 'https': entry})
execute = urllib.request.build_opener(query)
print(execute.open('https://ip.oxylabs.io/location').read().decode('utf-8'))
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$username = 'USERNAME';
$password = 'PASSWORD';
$platform = 'windows';
$proxy = 'pr.oxylabs.io:7777';

$query = curl_init('https://ip.oxylabs.io/location');
curl_setopt($query, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($query, CURLOPT_PROXY, "http://$proxy");
curl_setopt($query, CURLOPT_PROXYUSERPWD, "customer-$username-platform-$platform:$password");
$output = curl_exec($query);
curl_close($query);
echo $output;
?>
```

{% endtab %}
{% endtabs %}

## IP 版本

默认情况下，Oxylabs 住宅代理同时使用 IPv4 和 IPv6 地址。要强制连接仅通过 IPv4 或 IPv6 出口节点，请传入 `ipversion` 参数，并将用户名字符串设置为以下任一形式 `ipversion-4` （IPv4 池）或 `ipversion-6` （IPv6 池）：

```
customer-USERNAME-ipversion-X:PASSWORD
```

如果你使用 `ipversion-6` 在不支持 IPv6 的目标网站上，Oxylabs 代理会默认通过 IPv4 自动解析请求，以防止连接失败。

{% hint style="info" %}
要禁用自动回退并强制使用严格的 IPv6 路由，请联系您的客户经理。如果启用严格路由且目标不支持 IPv6，请求将返回 HTTP `522 错误响应` 错误。
{% endhint %}

#### 代码示例

{% tabs %}
{% tab title="cURL" %}

```bash
curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-ipversion-6:PASSWORD" https://ip.oxylabs.io/location
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request

username = 'USERNAME'
password = 'PASSWORD'
entry = f'http://customer-{username}-ipversion-6:{password}@pr.oxylabs.io:7777'

query = urllib.request.ProxyHandler({'http': entry, 'https': entry})
execute = urllib.request.build_opener(query)
print(execute.open('https://ip.oxylabs.io/location').read().decode('utf-8'))
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$username = 'USERNAME';
$password = 'PASSWORD';
$proxy = 'pr.oxylabs.io:7777';

$query = curl_init('https://ip.oxylabs.io/location');
curl_setopt($query, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($query, CURLOPT_PROXY, "http://$proxy");
curl_setopt($query, CURLOPT_PROXYUSERPWD, "customer-$username-ipversion-6:$password");
$output = curl_exec($query);
curl_close($query);
echo $output;
?>
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.oxylabs.io/products/cn/proxies/residential-proxies/advanced-filters.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
