> 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/integrations/cn/proxy-integrations/firefox.md).

# Firefox

按照分步指南了解如何在 Firefox 浏览器环境中集成 Oxylabs 代理。

[Mozilla Firefox](https://www.mozilla.org/firefox/) 是一款适用于 Windows、macOS 和 Linux 的免费开源网页浏览器，其设置中直接内置了代理支持。

请按照下面的分步指南，在 Firefox 中配置以下 Oxylabs 代理：

* [**住宅代理和移动代理**](#residential-and-mobile-proxies)
* [**数据中心代理**](#datacenter-proxies)
* [**独享数据中心代理（企业版）**](#dedicated-datacenter-proxies-enterprise)
* [**独享数据中心代理（自助服务版）**](#dedicated-datacenter-proxies-self-service)
* [**ISP代理**](#isp-proxies)
* [**独享ISP代理**](#dedicated-isp-proxies)

{% hint style="info" %}
**注意：** Firefox 会将代理设置应用于整个浏览器配置文件，其原生设置界面中没有代理用户名和密码字段——Firefox 在首次连接时会在单独的对话框中询问这些信息。

如果你需要并排使用多个代理配置，或在它们之间一键切换，请改用 [Oxy® 代理扩展](/integrations/cn/proxy-integrations/oxy-proxy-extension-for-chrome.md) 适用于 Firefox，或者 [FoxyProxy](/integrations/cn/proxy-integrations/foxyproxy.md) 请直接使用
{% endhint %}

{% stepper %}
{% step %}

### 打开 Firefox 设置

打开 **☰ 菜单** 右上角的并选择 **设置**.

<img src="https://1216392379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU4lV7kLC2Df45W0aLQlX%2Fuploads%2Fgit-blob-d0eaf26a140ed34ae20248f40fa00e3abcb8b41b%2Funknown.png?alt=media" alt="" height="372" width="624">
{% endstep %}

{% step %}

### 转到高级设置

选择 **隐私与安全** 选项卡，并向下滚动到 **连接和软件安全** 部分，然后点击 A**高级设置**.

<img src="https://1216392379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU4lV7kLC2Df45W0aLQlX%2Fuploads%2Fgit-blob-ddbceb7d11924ec0d752eb0b87c411adb848d54b%2Funknown.png?alt=media" alt="" height="372" width="624">
{% endstep %}

{% step %}

### 打开代理设置

点击 **配置代理** 选项，在 **代理设置**.

<img src="https://1216392379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU4lV7kLC2Df45W0aLQlX%2Fuploads%2Fgit-blob-d0eaf26a140ed34ae20248f40fa00e3abcb8b41b%2Funknown.png?alt=media" alt="" height="288" width="597">
{% endstep %}

{% step %}

### 手动代理配置

点击 **手动代理配置** 中设置你自己的代理连接，并勾选 **同时将此代理用于 HTTPS 的选项**.

![](https://1216392379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU4lV7kLC2Df45W0aLQlX%2Fuploads%2Fgit-blob-75e6e97dbeba2c90da2437a59c6a264af412317f%2Funknown.png?alt=media)
{% endstep %}

{% step %}

### 添加代理详情

填写以下任一项： **HTTP 代理** 或 **SOCKS 主机** （确保已选择 SOCKS v5）以及与你所选代理类型对应的端口：

* [住宅代理和移动代理](#residential-and-mobile-proxies)
* [数据中心代理](#datacenter-proxies)
* [独享数据中心代理（企业版）](#dedicated-datacenter-proxies-enterprise)
* [独享数据中心代理（自助服务版）](#dedicated-datacenter-proxies-self-service)
* [ISP代理](#isp-proxies)
* [独享ISP代理](#dedicated-isp-proxies)

#### 住宅代理和移动代理

**代理类型：** `HTTP`, `HTTPS`，或 `SOCKS5`

**主机：** `pr.oxylabs.io`

**端口：** `7777`

![](https://1216392379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU4lV7kLC2Df45W0aLQlX%2Fuploads%2Fgit-blob-444830b9b6ba8a1e9318d24bf997fda7ea5210a2%2Funknown.png?alt=media)

你还可以使用 **附加参数** 与住宅代理和移动代理一起设置地理位置（国家、州、省、市等）并控制会话。请查看 [住宅代理文档](/products/cn/proxies/residential-proxies.md) 了解更多。下表概述了可用参数及其示例值。

<table><thead><tr><th width="147.5">代理参数</th><th width="412">示例</th><th width="129.5">协议</th></tr></thead><tbody><tr><td><a href="/products/cn/proxies/residential-proxies/location-settings/select-country.md#country-specific-entry-nodes">国家入口节点</a></td><td><p><strong>主机：</strong> <code>//us-pr.oxylabs.io</code></p><p><strong>端口：</strong> <code>10000</code></p></td><td>HTTP、HTTPS</td></tr><tr><td><a href="/products/cn/proxies/residential-proxies/location-settings/select-country.md">国家</a></td><td><strong>用户：</strong> <code>customer-username-cc-US</code></td><td>HTTP、HTTPS、SOCKS5</td></tr><tr><td><a href="/products/cn/proxies/residential-proxies/location-settings/select-state.md">州</a></td><td><strong>用户：</strong> <code>customer-username-st-US_texas</code></td><td>HTTP、HTTPS、SOCKS5</td></tr><tr><td><a href="/products/cn/proxies/residential-proxies/location-settings/select-city.md">城市</a></td><td><strong>用户：</strong> <code>customer-username-city-paris</code></td><td>HTTP、HTTPS、SOCKS5</td></tr><tr><td><a href="/products/cn/proxies/residential-proxies/location-settings/continent.md">洲</a></td><td><strong>用户：</strong> <code>customer-username-cn-NA</code></td><td>HTTP、HTTPS、SOCKS5</td></tr><tr><td><a href="/products/cn/proxies/residential-proxies/location-settings/zip-postal-code.md">邮政编码</a></td><td><strong>用户：</strong> <code>customer-username-cc-US-postalcode-90210</code></td><td>HTTP、HTTPS、SOCKS5</td></tr><tr><td><a href="/products/cn/proxies/residential-proxies/location-settings/asn-targeting.md">ASN 定位</a></td><td><strong>用户：</strong> <code>customer-username-ASN-21928</code></td><td>HTTP、HTTPS、SOCKS5</td></tr><tr><td><a href="/products/cn/proxies/residential-proxies/session-control.md">会话</a> （最长 1440 分钟）</td><td><strong>用户：</strong> <code>customer-username-sessid-qwerty123-sesstime-30</code></td><td>HTTP、HTTPS、SOCKS5</td></tr><tr><td><a href="/products/cn/proxies/residential-proxies/session-control.md#sticky-proxy-entry-nodes">粘性会话</a></td><td><p><strong>主机：</strong> <code>//us-pr.oxylabs.io</code></p><p><strong>端口：</strong> <code>10001</code></p></td><td>HTTP、HTTPS</td></tr></tbody></table>

{% hint style="info" %}
Firefox 会为每个主机和端口保存一个代理登录信息。当你更改用户名以切换国家时，Firefox 仍会使用旧用户名登录——请先删除已保存的登录信息。

国家入口节点可避免这一点。位置信息包含在主机名中，因此每个节点都会有自己保存的登录信息。
{% endhint %}

#### 数据中心代理

**代理类型：** `HTTP`, `HTTPS`，或 `SOCKS5`

**主机：** `dc.oxylabs.io`

**端口：** `8001`

<img src="https://1216392379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU4lV7kLC2Df45W0aLQlX%2Fuploads%2Fgit-blob-8adbc2ee45db5f5174a3064d211eb4513c89b93f%2Funknown.png?alt=media" alt="" height="316" width="624">

{% tabs %}
{% tab title="按 IP 付费代理" %}
端口是分配给来自 [代理列表](/products/cn/proxies/datacenter-proxies/proxy-list.md)的 IP 地址的顺序编号。因此，端口 `8001` 将始终使用你列表中的第一个 IP 地址。你也可以通过将端口设置为 [代理 IP 轮换](/products/cn/proxies/datacenter-proxies/ip-control.md) 来启用 `8000`.

此外，你还可以指定 [地理位置](/products/cn/proxies/datacenter-proxies/select-country.md)，例如美国，方法是将 **代理用户名** 设置为 `user-USERNAME-country-US`.
{% endtab %}

{% tab title="按流量付费代理" %}
该端口 `8001` 会随机选择一个 IP 地址，但在会话期间保持一致。或者，你可以通过使用端口 [轮换代理 IP](/products/cn/proxies/datacenter-proxies/ip-control.md) 来在每个请求中更换 IP `8000`.

如果你想使用特定的 [地理位置](/products/cn/proxies/datacenter-proxies/select-country.md)，例如美国，请将 **代理用户名** 设置为 `user-USERNAME-country-US`.
{% endtab %}
{% endtabs %}

#### 独享数据中心代理（企业版）

**代理类型：** `HTTP`, `SOCKS5`

**主机：** `1.2.3.4` （来自你的 [代理列表](/products/cn/proxies/dedicated-datacenter-proxies/enterprise/proxy-lists.md))

**端口：** `60000` （HTTP）或 `1180` (SOCKS5)

![](https://1216392379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU4lV7kLC2Df45W0aLQlX%2Fuploads%2Fgit-blob-0ee4c1a36df1b1c8abfa2187909477747ffb3348%2Funknown.png?alt=media)

对于通过销售购买的企业独享数据中心代理，你必须从已获取的 [代理列表](/products/cn/proxies/dedicated-datacenter-proxies/enterprise/proxy-lists.md).

#### 独享数据中心代理（自助服务）

**代理类型：** `HTTP`, `HTTPS`，或 `SOCKS5`

**主机：** `ddc.oxylabs.io`

**端口：** `8001`

![](https://1216392379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU4lV7kLC2Df45W0aLQlX%2Fuploads%2Fgit-blob-7efcdd581a476ea1fb28cadc7deb6b1030823453%2Funknown.png?alt=media)

对于通过 Oxylabs 控制面板购买的自助服务独享数据中心代理，端口表示来自已获取的某个 IP 地址的顺序编号 [代理列表](/products/cn/proxies/datacenter-proxies/proxy-list.md)。如果你希望每个请求都获取不同的 IP，请更改 **端口** 设置为 `8000` 以启用 [代理轮换](/products/cn/proxies/dedicated-datacenter-proxies/self-service/proxy-rotation.md).

#### ISP代理

**代理类型：** `HTTP`, `HTTPS`，或 `SOCKS5`

**主机：** `isp.oxylabs.io`

**端口：** `8001`

![](https://1216392379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU4lV7kLC2Df45W0aLQlX%2Fuploads%2Fgit-blob-afe68d22d367e9f7d185b00060f04a246fa5c713%2Funknown.png?alt=media)

ISP 代理会将每个端口分配给特定的 IP 地址和位置。端口 `8001` 始终使用你的 [代理列表](/products/cn/proxies/isp-proxies/proxy-list.md)中的第一个 IP。使用端口 `8000` 以启用 [代理轮换](/products/cn/proxies/isp-proxies/proxy-rotation.md).

若要从特定国家的代理池获取轮换 IP，请按以下格式设置用户名： `user-USERNAME-country-XX`，其中 `XX` 是国家代码（例如 `US` 表示美国）。

#### 独享ISP代理

**代理类型：** `HTTP`, `HTTPS`，或 `SOCKS5`

**主机：** `disp.oxylabs.io`

**端口：** `8001`

<img src="https://1216392379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU4lV7kLC2Df45W0aLQlX%2Fuploads%2Fgit-blob-b410579e45e781b2222f8085ee6f2fff398c3aad%2Funknown.png?alt=media" alt="" height="316" width="624">

您需要选择分配给所购买的 IP 地址的端口 [代理列表](/products/cn/proxies/dedicated-isp-proxies/self-service/proxy-list.md)，你可以在 Oxylabs 控制面板中找到。 `8001` 端口将为所有请求选取列表中的第一个 IP 地址。使用端口 `8000` 可自动进行 [代理 IP 轮换](/products/cn/proxies/dedicated-isp-proxies/self-service/proxy-rotation.md).
{% endstep %}

{% step %}

### 保存设置

点击 **确定** 以保存并关闭对话框。
{% endstep %}

{% step %}

### 输入你的凭据

打开任意网站。会出现一个“需要身份验证”对话框，其中会显示你配置的代理名称。输入你的 Oxylabs 代理 `username` 并 `password`，然后点击 **登录**:

{% hint style="info" %}
你可以在我们的 [**控制面板**](https://dashboard.oxylabs.io/en/)**.**
{% endhint %}

![](https://1216392379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU4lV7kLC2Df45W0aLQlX%2Fuploads%2Fgit-blob-76397ccb4853081515bc8e0409efdbbe97a84187%2Funknown.png?alt=media)

| 代理类型           | 示例                                                                                                           |
| -------------- | ------------------------------------------------------------------------------------------------------------ |
| 住宅代理和移动代理      | <p><strong>用户名：</strong> <code>customer-USERNAME</code></p><p><strong>密码：</strong> <code>PASSWORD</code></p> |
| 数据中心代理         | <p><strong>用户名：</strong> <code>user-USERNAME</code></p><p><strong>密码：</strong> <code>PASSWORD</code></p>     |
| 独享数据中心代理（企业版）  | <p><strong>用户名：</strong> <code>USERNAME</code></p><p><strong>密码：</strong> <code>PASSWORD</code></p>          |
| 独享数据中心代理（自助服务） | <p><strong>用户名：</strong> <code>user-USERNAME</code></p><p><strong>密码：</strong> <code>PASSWORD</code></p>     |
| ISP代理          | <p><strong>用户名：</strong> <code>user-USERNAME</code></p><p><strong>密码：</strong> <code>PASSWORD</code></p>     |
| 独享ISP代理        | <p><strong>用户名：</strong> <code>user-USERNAME</code></p><p><strong>密码：</strong> <code>PASSWORD</code></p>     |

{% hint style="warning" %}
请务必添加 `customer-` 或 `user-` 如果您的代理类型需要，请为您的用户名添加前缀。
{% endhint %}
{% endstep %}

{% step %}

### 检查你的代理连接

访问 [ip.oxylabs.io/location](https://ip.oxylabs.io/location)。页面会返回网站看到的 IP 地址和位置——请确认它与你配置的代理一致，而不是你自己的连接。

<figure><img src="https://1216392379-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FU4lV7kLC2Df45W0aLQlX%2Fuploads%2Fgit-blob-bafe1996eb00ba82c016767a6a545c6a9abcc414%2FScreenshot%202026-08-14%20at%2012.11.19.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

你现在正在使用 Firefox 和你自己配置的代理。

如果你想改为在代理配置文件之间一键切换，请参阅我们针对以下内容的指南： [Oxy® 代理扩展](/integrations/cn/proxy-integrations/oxy-proxy-extension-for-chrome.md) 并 [FoxyProxy](/integrations/cn/proxy-integrations/foxyproxy.md).


---

# 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/integrations/cn/proxy-integrations/firefox.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.
