Skip to content

HTTP

HttpBlock pydantic-model

Bases: BindBaseModel

HTTP configuration block for DNS-over-HTTPS (DoH) in BIND.

Grammar:

http <string> {
    endpoints { <quoted_string>; ... };
    listener-clients <integer>;
    streams-per-connection <integer>;
}; // may occur multiple times

Show JSON schema:
{
  "description": "HTTP configuration block for DNS-over-HTTPS (DoH) in BIND.\n\nGrammar:\n```\nhttp <string> {\n    endpoints { <quoted_string>; ... };\n    listener-clients <integer>;\n    streams-per-connection <integer>;\n}; // may occur multiple times\n```",
  "properties": {
    "comment": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optional comment for this block",
      "title": "Comment"
    },
    "name": {
      "description": "Name of the HTTP configuration",
      "title": "Name",
      "type": "string"
    },
    "endpoints": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "HTTP query paths to listen on",
      "title": "Endpoints"
    },
    "listener_clients": {
      "anyOf": [
        {
          "ge": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Per-listener quota for active connections",
      "title": "Listener Clients"
    },
    "streams_per_connection": {
      "anyOf": [
        {
          "ge": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Maximum concurrent HTTP/2 streams per connection",
      "title": "Streams Per Connection"
    }
  },
  "required": [
    "name"
  ],
  "title": "HttpBlock",
  "type": "object"
}

Fields:

Validators:

name pydantic-field

name: string_BIND

Name of the HTTP configuration

endpoints pydantic-field

endpoints: list[quoted_string_BIND] | None = None

HTTP query paths to listen on

listener_clients pydantic-field

listener_clients: integer_BIND | None = None

Per-listener quota for active connections

streams_per_connection pydantic-field

streams_per_connection: integer_BIND | None = None

Maximum concurrent HTTP/2 streams per connection

validate_endpoints pydantic-validator

validate_endpoints(
    endpoints: list[str] | None,
) -> list[str] | None

Validate HTTP endpoints format.