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 客户端占位页。
- 默认:空块。
- 行为:
server_name用于证书校验;cronet 只读取server_name和ca。
carrier
- 类型:字符串枚举。
- 必填:可选。
- 默认:Linux 上为
boring;其他平台或指定library时为cronet。 - 取值:
boring、cronet。
library
- 类型:路径。
- 必填:可选。
- 行为:cronet 动态库位置;相对路径以数据目录为基准。
- 限制:boring 承载不接受。
windows
- 类型:字符串枚举。
- 必填:可选。
- 取值:
naive、chrome。 - 行为:HTTP/2 窗口大小策略;只用于 cronet 承载。
说明
仅 Linux
carrier: boring 依赖 Linux 的 BoringSSL 后端。其他平台可显式使用 cronet,但运行时要能加载 libcronet。
naive 自己拨服务器,因此不能写 detour 或 transport,也不能作为链的非首跳。udp: connect-udp 只由 boring 承载发送。