// Copyright 2019 Istio Authors
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.

syntax = "proto3";

// $title: ALPN filter for overriding ALPN for upstream TLS connections.

package istio.envoy.config.filter.http.alpn.v2alpha1;

option go_package = "istio.io/api/envoy/config/filter/http/alpn/v2alpha1";

// FilterConfig is the config for Istio-specific filter.
message FilterConfig {
  // Upstream protocols
  enum Protocol {
    HTTP10 = 0;
    HTTP11 = 1;
    HTTP2 = 2;
  }

  message AlpnOverride {
    // Upstream protocol
    Protocol upstream_protocol = 1;
    // A list of ALPN that will override the ALPN for upstream TLS connections.
    repeated string alpn_override = 2;
  }

  // Map from upstream protocol to list of ALPN
  repeated AlpnOverride alpn_override = 1;
}