syntax = "proto3";

package v2ray.core.transport.internet.headers.http;
option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Http";
option go_package = "http";
option java_package = "com.v2ray.core.transport.internet.headers.http";
option java_multiple_files = true;

message Header {
  // "Accept", "Cookie", etc
  string name = 1;

  // Each entry must be valid in one piece. Random entry will be chosen if multiple entries present.
  repeated string value = 2;
}

// HTTP version. Default value "1.1".
message Version {
  string value = 1;
}

// HTTP method. Default value "GET".
message Method {
  string value = 1;
}

message RequestConfig {
  // Full HTTP version like "1.1".
  Version version = 1;

  // GET, POST, CONNECT etc
  Method method = 2;

  // URI like "/login.php"
  repeated string uri = 3;

  repeated Header header = 4;
}

message Status {
  // Status code. Default "200".
  string code = 1;

  // Statue reason. Default "OK".
  string reason = 2;
}

message ResponseConfig {
  Version version = 1;

  Status status = 2;

  repeated Header header = 3;
}

message Config {
  // Settings for authenticating requests. If not set, client side will not send authenication header, and server side will bypass authentication.
  RequestConfig request = 1;

  // Settings for authenticating responses. If not set, client side will bypass authentication, and server side will not send authentication header.
  ResponseConfig response = 2;
}