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

# 列出黑名单 IP/CIDR 条目



## OpenAPI

````yaml openapi/arc-gateway-control-plane.zh.openapi.yaml get /v1/xdp/blacklist
openapi: 3.1.0
info:
  title: Arc 网关控制面 API
  version: 1.0.0
  license:
    name: Apache-2.0
    identifier: Apache-2.0
  description: >
    Arc Gateway 控制面 HTTP 端点的 OpenAPI 定义，接口实现位于
    `crates/arc-gateway/src/control.rs`。


    鉴权行为：

    - 如果设置了 `control_plane.auth_token`，请求需要携带 `Authorization: Bearer <token>`。

    - 如果未设置 `control_plane.auth_token`，仅允许本机回环地址访问。
servers:
  - url: http://127.0.0.1:22100
security:
  - bearerAuth: []
  - {}
tags:
  - name: status
    description: 节点状态与代际相关端点。
  - name: config
    description: 配置获取、长轮询、校验与本地应用端点。
  - name: cluster
    description: 集群级配置推送与熔断快照端点。
  - name: gossip
    description: Gossip 成员、统计与生命周期端点。
  - name: xdp
    description: XDP 状态与映射管理端点。
paths:
  /v1/xdp/blacklist:
    get:
      tags:
        - xdp
      summary: 列出黑名单 IP/CIDR 条目
      operationId: listXdpBlacklist
      parameters:
        - name: max
          in: query
          required: false
          schema:
            type: integer
            format: int32
            minimum: 1
            maximum: 65536
            default: 1024
      responses:
        '200':
          description: 黑名单条目
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/XdpBlacklistListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          description: XDP 管理器未初始化
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    XdpBlacklistListResponse:
      type: object
      required:
        - count
        - items
      properties:
        count:
          type: integer
          format: int32
        items:
          type: array
          items:
            $ref: '#/components/schemas/XdpBlacklistItem'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    XdpBlacklistItem:
      type: object
      required:
        - ip
        - prefix_len
        - reason
        - blocked_at_ns
        - ttl_ms
        - remaining_ms
      properties:
        ip:
          type: string
        prefix_len:
          type: integer
          format: int32
        reason:
          type: string
        blocked_at_ns:
          type: integer
          format: int64
        ttl_ms:
          type: integer
          format: int64
        remaining_ms:
          type:
            - integer
            - 'null'
          format: int64
  responses:
    Unauthorized:
      description: 未授权
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: unauthorized
    InternalError:
      description: 内部错误
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque

````