# Proxies 类

## 简要

代表一个或多个代理服务器配置的类。通过利用该类，您可以快速为通用或抽象产品客户端配置代理服务器，而无需关注实现细节。

```python
class Proxies
```

## 构造

该类仅支持构造类实例后使用，其构造实例方法签名如下：

```python
def __init__(self,
    proxy_name: str,
    proxy_type: str,
    proxy_endpoint: str,
    proxy_auth: dict = None
)
```

构造实例方法参数和参数描述如下：

| 参数              | 类型                                                                                                         | 必选 | 描述                                                            |
| --------------- | ---------------------------------------------------------------------------------------------------------- | -- | ------------------------------------------------------------- |
| proxy\_name     | str                                                                                                        | 是  | <p>默认代理服务器的名称。</p><p>例如：<code>default</code></p>              |
| proxy\_type     | str                                                                                                        | 是  | <p>默认代理服务器的类型。</p><p>受支持的代理服务器类型定义在 ProxyType 枚举器。</p>        |
| proxy\_endpoint | str                                                                                                        | 是  | <p>默认代理服务器的端点主机名和端口。</p><p>例如：<code>127.0.0.1:1081</code></p> |
| proxy\_auth     | [ProxyAuth](https://smallso.gitbook.io/tencent-cloud-sdk/python-docs/other-products/data-types/proxy-auth) | 否  | 包含默认代理服务器的访问凭据上下文的字典实例。                                       |

## 示例

在下文中我们将向您演示如何构造一个通用产品客户端类实例：

```python
from tencent.cloud.core import client
from tencent.cloud.core import proxies

virtual_machine_client: client.UniversalClient = client.UniversalClient(
    product_id = 'cvm',
    access_credentials = ...,
    access_proiexs = proxies.Proxies(
        proxy_name = 'default',
        proxy_type = proxies.ProxyType.Http,
        proxy_endpoint = '127.0.0.1:1081',
        proxy_auth = {
            'username': 'root',
            'password': 'default-password'
        }
    )
)
```

## 适用于

#### Tencent Cloud SDK for Python

产品软件包：tencent-cloud-sdk-serverless-functions >= 0.1.1


---

# Agent Instructions: 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:

```
GET https://smallso.gitbook.io/tencent-cloud-sdk/python-docs/other-products/class-and-method/proxies.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
