> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 配置开发网络访问

> 开发 XBOX GDK 游戏以及将开发电脑连接到网络上的 XBOX Series X|S 开发工具包所需的域、端口、CIDR 块和防火墙例外。

请与网络管理员合作，在组织网络上允许下列域和端口，并在本地开发电脑上开放防火墙例外。必须先在开发电脑和目标设备之间建立 LAN 连接，然后才能针对该设备进行开发。

> [!NOTE]
>
> 从 XDK 迁移到 GDK 时，请将所有特定于文件夹的限制或防火墙规则更新为新的安装路径 `C:\Program Files (x86)\Microsoft GDK`。

## XBOX services 的域

```text theme={null}
https://*.xboxlive.com
https://*.xbox.com
https://*.bing.com
https://*.microsoft.com
https://*.akamai.net
```

## XBOX services 的端口

TCP 443。

## 开发电脑的端口

2303、3076、4016、11442、11443、49152、49157、49160。

## 多人游戏和 Teredo 的端口

* UDP 500 (入站和出站)。
* UDP 3544 (出站)。
* UDP 4500 (入站和出站)。

若要在不同网络上的设备之间运行测试，请关闭所有入站数据包筛选。

## 服务器到服务器 XBOX 网络配置

如果你的游戏会进行服务器到服务器的 XBOX 网络 (XBOX Live) 调用，请为所有 XBOX 沙盒 (包括 `RETAIL`、`CERT`、`*.1` 和 `*.99`) 将以下 CIDR 块加入允许列表：

* 134.170.28.0/23
* 191.232.80.128/25
* 191.232.82.128/25
* 191.234.78.0/23
* 131.253.28.0/23
* 134.170.176.0/22
* 157.56.70.0/23
* 65.55.42.0/23
* 131.253.22.0/23
* 191.234.240.0/21

## XBOX One 系列主机上 GDK 的端口

| 端口 | 使用者 |
| - | - |
| 22 | SSH |
| 445 | XBOX Manager、SMB |
| 4024 | Visual Studio 2019 远程调试器 |
| 4201 | XBOX Manager、PIX、Xtf、XbtpLinkSvc |
| 4211 | XBOX Manager、PIX、Xtf |
| 4221 | XBOX Manager、PIX、Xtf |
| 4224 | PIX |
| 4600 | PIX |
| 4601 | PIX |
| 9002 | XBOX 游戏流式传输 |
| 9269 | Touch Adaptation Kit 工具 |
| 11442 | XBOX Manager |
| 11443 | XBOX Manager、Windows Device Portal |
| 8116 | Visual Studio 集成 |
| 8117 | Visual Studio 集成 |

> [!NOTE]
>
> 请为 TCP 和 UDP 同时开放上述端口。大多数 UI 工具只需要 TCP，但 XBOX 游戏流式传输需要 UDP。

### Submission Validator 工具

* 端口：443。
* 域：`https://*.xboxlive.com`。

### XBOX 开发工具包的网络唤醒

`xbreboot` 和 XBOX Manager 的部分功能需要此设置。网络唤醒幻数据包 (magic packet) 发送到：

* UDP 7。
* UDP 9。

### 仅 IPv6 网络

大多数 XBOX services (包括登录和身份验证) 目前仅公开 IPv4 终结点。开发和测试需要 IPv4 连接，IPv6 是可选的。XBOX 不支持纯 IPv6 网络。主机套接字 API 和开发工具支持 IPv6。


## Related topics

- [XBOX 游戏串流开发最佳实践](https://devdocs.xbox.com/zh-CN/build/core-features/common/game-streaming/game-streaming-optimizing-your-game.md)
- [XBOX 开发套件上的网络压力测试](https://devdocs.xbox.com/zh-CN/build/console-features/networking/tools/netstress-networking.md)
- [为串流设置 XBOX 开发工具包](https://devdocs.xbox.com/zh-CN/build/core-features/common/game-streaming/game-streaming-setup-xbox-developer-kit.md)
- [XBOX 主机游戏开发环境与工具](https://devdocs.xbox.com/zh-CN/tools/tools-console/gc-tools-console-toc.md)
- [XBOX 环境工具和 API](https://devdocs.xbox.com/zh-CN/tools/tools-console/gc-xbox-tools-and-apis-toc.md)
