# 回源设置

设置上游协议，启用 WebSocket，并设置回源主机头。

<div align="left"><figure><img src="/files/lsDMa8Taz8TTOxMrt9wM" alt="" width="383"><figcaption></figcaption></figure></div>

* 上游协议
  * 将上游协议设置为 HTTP：请求将通过你定义的端口重定向到**内网 IP**，使用 HTTP 协议。
  * 将上游协议设置为 HTTPS：请求将通过你定义的端口重定向到**公网 IP**，使用 HTTPS 协议。
* WebSocket\
  基于 TCP 的协议，适用于需要长时间双向连接的客户端与服务器之间的通信。持久连接通常是实时应用的要求。你可能会在以下场景中使用 WebSocket：社交聊天平台、在线协作工作空间、多人游戏和提供实时数据流的服务（如金融交易平台）。WebSocket 连接中的数据可以双向流动，实现全双工通信。
* 回源主机头\
  可以配置不同的回源 HOST 头来访问同一加速域名下的目标源之一。


---

# 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://docs.console.zenlayer.com/welcome/cn/content-delivery-network/domain-management/cdn-settings/back-to-origin-settings.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.
