v2ray-core/transport/internet/headers/http/config.proto

61 lines
1.4 KiB
Protocol Buffer
Raw Normal View History

2016-10-31 21:26:46 +00:00
syntax = "proto3";
2016-12-08 15:27:41 +00:00
package v2ray.core.transport.internet.headers.http;
2016-10-31 21:26:46 +00:00
option go_package = "http";
2016-12-08 15:27:41 +00:00
option java_package = "com.v2ray.core.transport.internet.headers.http";
2016-10-31 21:26:46 +00:00
option java_outer_classname = "ConfigProto";
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;
}
2016-11-02 21:26:21 +00:00
// HTTP version. Default value "1.1".
message Version {
string value = 1;
}
// HTTP method. Default value "GET".
message Method {
2016-10-31 21:26:46 +00:00
string value = 1;
}
message RequestConfig {
// Full HTTP version like "1.1".
2016-11-02 21:26:21 +00:00
Version version = 1;
2016-10-31 21:26:46 +00:00
// GET, POST, CONNECT etc
2016-11-02 21:26:21 +00:00
Method method = 2;
2016-10-31 21:26:46 +00:00
// URI like "/login.php"
repeated string uri = 3;
repeated Header header = 4;
}
2016-11-02 21:26:21 +00:00
message Status {
// Status code. Default "200".
string code = 1;
// Statue reason. Default "OK".
string reason = 2;
}
2016-10-31 21:26:46 +00:00
message ResponseConfig {
2016-11-02 21:26:21 +00:00
Version version = 1;
2016-10-31 21:26:46 +00:00
2016-11-02 21:26:21 +00:00
Status status = 2;
2016-10-31 21:26:46 +00:00
2016-11-02 21:26:21 +00:00
repeated Header header = 3;
}
2016-10-31 21:26:46 +00:00
2016-11-02 21:26:21 +00:00
message Config {
2016-11-03 22:14:27 +00:00
// Settings for authenticating requests. If not set, client side will not send authenication header, and server side will bypass authentication.
2016-11-02 21:26:21 +00:00
RequestConfig request = 1;
2016-11-03 22:14:27 +00:00
// Settings for authenticating responses. If not set, client side will bypass authentication, and server side will not send authentication header.
2016-11-02 21:26:21 +00:00
ResponseConfig response = 2;
2016-10-31 21:26:46 +00:00
}