Network policy fields

Last published : Nov 26, 2026
Citrix SecurSpaces™ 网络策略的专家模式 YAML 编辑器中可用的字段。有关如何访问 编辑器,请参阅 创建网络策略。

策略字段

字段 类型 必需 描述
name 字符串 是 策略名称。不能为空。
description 字符串 是 策略的作用。不能为空。
restrictedTraffic 布尔值 是 true 将出站流量限制到附加资源和允许列表。false 监控流量而不进行阻止。
customEndpointsEnabled 布尔值 否 启用 custom-endpoints-via-proxy 允许列表。仅当平台使用外部代理时相关。
whitelistedDomains 域名条目列表 否 工作区允许访问的域。
whitelistedIps 字符串列表 否 工作区允许访问的 IPv4 地址或 CIDR 范围。
customEndpointsViaProxyDomains 域名条目列表 否 可通过外部代理访问的域。仅当 customEndpointsEnabled 为 true 时使用。
customEndpointsViaProxyIps 字符串列表 否 可通过外部代理访问的 IPv4 地址或 CIDR 范围。仅当 customEndpointsEnabled 为 true 时使用。
重要提示:
编辑器会拒绝此表中不存在的任何字段。包含无法识别字段的策略将无法 验证。

域名条目

whitelistedDomains 和 customEndpointsViaProxyDomains 中的每个条目都具有此形状。
字段 类型 描述
domain 字符串 允许的域名,例如 example.com。
includeSubdomains 布尔值 当 true 时,允许该域名及其所有子域名。
这两个列表对 domain 的验证方式不同:
  • 在 whitelistedDomains 中,该值必须是纯域名,例如 example.com 或 pypi.internal.example.com。使用 includeSubdomains 来覆盖子域名,而不是使用通配符。
  • 在 customEndpointsViaProxyDomains 中,允许使用前导前缀,因此像 *.example.com 这样的值 是有效的。

IP 地址条目

whitelistedIps 和 customEndpointsViaProxyIps 接受:
  • 单个 IPv4 地址,例如 192.168.1.50。
  • 一个 IPv4 CIDR 范围,前缀长度从 /0 到 /32,例如 10.0.0.0/24。
不接受 IPv6 地址。

示例

name: Backend services policy
description: Restrict workspaces to internal package mirrors and the corporate API.
restrictedTraffic: true
whitelistedDomains:
  - domain: pypi.internal.example.com
    includeSubdomains: false
  - domain: example.com
    includeSubdomains: true
whitelistedIps:
  - 10.0.0.0/24
  - 192.168.1.50
注意:
当 customEndpointsEnabled 为 false 时,自定义端点列表将被忽略并清除。仅当使用外部代理时才设置这些 字段。

相关信息