syntax = "proto3";

package envoy.extensions.bootstrap.reverse_tunnel.downstream_socket_interface.v3;

import "envoy/config/core/v3/base.proto";

import "udpa/annotations/status.proto";

option java_package = "io.envoyproxy.envoy.extensions.bootstrap.reverse_tunnel.downstream_socket_interface.v3";
option java_outer_classname = "DownstreamReverseConnectionSocketInterfaceProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/bootstrap/reverse_tunnel/downstream_socket_interface/v3;downstream_socket_interfacev3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Bootstrap settings for downstream reverse connection socket interface]
// [#extension: envoy.bootstrap.reverse_tunnel.downstream_socket_interface]

// Configuration for the downstream reverse connection socket interface.
// This interface initiates reverse connections to upstream Envoys and provides
// them as socket connections for downstream requests.
message DownstreamReverseConnectionSocketInterface {
  // HTTP handshake settings for initiator envoy initiated reverse tunnels.
  message HttpHandshakeConfig {
    // Request path used when issuing the HTTP reverse-connection handshake. Defaults to
    // "/reverse_connections/request".
    string request_path = 1;

    // Additional headers to include in the HTTP handshake request.
    repeated config.core.v3.HeaderValueOption additional_headers = 2;
  }

  // Stat prefix to be used for downstream reverse connection socket interface stats.
  string stat_prefix = 1;

  // Enable detailed per-host and per-cluster statistics.
  // When enabled, emits hidden statistics for individual hosts and clusters.
  // Defaults to ``false``.
  bool enable_detailed_stats = 2;

  // Optional HTTP handshake configuration. When unset, the initiator envoy uses the defaults
  // provided by ``HttpHandshakeConfig``.
  HttpHandshakeConfig http_handshake = 3;
}
