mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-25 18:11:27 +00:00
66 lines
1.5 KiB
Protocol Buffer
66 lines
1.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package xray.transport.internet.headers.http;
|
|
option csharp_namespace = "Xray.Transport.Internet.Headers.Http";
|
|
option go_package = "github.com/xtls/xray-core/transport/internet/headers/http";
|
|
option java_package = "com.xray.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
|
|
// authentication 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;
|
|
}
|