---
url: /configuration/outbound/naive.md
description: 通过 naive HTTP/2 over TLS 服务器出站
---

# naive

在 HTTP/2 over TLS 上使用 naive CONNECT；Linux 默认使用内建 BoringSSL 承载，其他平台使用 libcronet。

```yaml
outbounds:
  proxy:
    type: naive
    server: proxy.example:443
    username: alice
    password: secret
    tls:
      server_name: proxy.example
```

## 字段

### type

* 类型：字符串。
* 必填：是，第一项。
* 取值：`naive`。

### server

* 类型：端点。
* 必填：是。
* 默认端口：`443`。

### username

* 类型：字符串。
* 必填：可选。

### password

* 类型：字符串。
* 必填：可选。
* 行为：有 `username` 时作为对应密码；无用户名时省略即为空密码。

### connect_ip

* 类型：布尔值。
* 默认：`false`。
* 行为：启用 CONNECT-IP 探测；只有 boring 承载能发送扩展 CONNECT。

### tls

* 类型：[TLS 客户端占位页](/configuration/shared/tls-client)。
* 默认：空块。
* 行为：`server_name` 用于证书校验；cronet 只读取 `server_name` 和 `ca`。

### carrier

* 类型：字符串枚举。
* 必填：可选。
* 默认：Linux 上为 `boring`；其他平台或指定 `library` 时为 `cronet`。
* 取值：`boring`、`cronet`。

### library

* 类型：路径。
* 必填：可选。
* 行为：cronet 动态库位置；相对路径以数据目录为基准。
* 限制：boring 承载不接受。

### windows

* 类型：字符串枚举。
* 必填：可选。
* 取值：`naive`、`chrome`。
* 行为：HTTP/2 窗口大小策略；只用于 cronet 承载。

## 说明

::: info 仅 Linux
`carrier: boring` 依赖 Linux 的 BoringSSL 后端。其他平台可显式使用 cronet，但运行时要能加载 libcronet。
:::

naive 自己拨服务器，因此不能写 `detour` 或 `transport`，也不能作为链的非首跳。`udp: connect-udp` 只由 boring 承载发送。

## 相关

* [出站总览](/configuration/outbound/)
* [共享 TLS 客户端](/configuration/shared/tls-client)
* [共享 UDP](/configuration/shared/udp)
