# Mixed HTTP + TCP on the Same Server
#
# HTTP and TCP listeners run on a single server instance.
# Each protocol gets its own filter chains.
#
# Usage:
#   cargo run -p praxis-proxy -- -c examples/configs/protocols/mixed-protocol.yaml

insecure_options:
  allow_private_upstreams: true

listeners:
  - name: web
    address: "127.0.0.1:8080"
    filter_chains:
      - observability
      - routing

  - name: db
    address: "127.0.0.1:5432"
    protocol: tcp
    upstream: "10.0.0.1:5432"

filter_chains:
  - name: observability
    filters:
      - filter: request_id
      - filter: access_log

  - name: routing
    filters:
      - filter: router
        routes:
          - path_prefix: "/"
            cluster: backend
      - filter: load_balancer
        clusters:
          - name: backend
            endpoints:
              - "10.0.0.1:8080"
