v2fly/transport/internet/config.proto

97 lines
2.3 KiB
Protocol Buffer
Raw Normal View History

2016-10-02 21:43:58 +00:00
syntax = "proto3";
package v2ray.core.transport.internet;
2016-12-22 23:24:28 +00:00
option csharp_namespace = "V2Ray.Core.Transport.Internet";
2021-02-16 20:31:50 +00:00
option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet";
2016-10-02 21:43:58 +00:00
option java_package = "com.v2ray.core.transport.internet";
2017-02-03 22:15:10 +00:00
option java_multiple_files = true;
2016-10-02 21:43:58 +00:00
import "common/serial/typed_message.proto";
2016-10-02 21:43:58 +00:00
enum TransportProtocol {
TCP = 0;
UDP = 1;
MKCP = 2;
WebSocket = 3;
2018-03-01 12:16:52 +00:00
HTTP = 4;
2018-04-09 15:09:24 +00:00
DomainSocket = 5;
}
message TransportConfig {
2016-10-17 22:09:49 +00:00
// Type of network that this settings supports.
2018-08-06 11:48:35 +00:00
// Deprecated. Use the string form below.
TransportProtocol protocol = 1 [ deprecated = true ];
2016-10-17 22:09:49 +00:00
2018-08-06 11:48:35 +00:00
// Type of network that this settings supports.
string protocol_name = 3;
2018-01-04 10:24:17 +00:00
// Specific settings. Must be of the transports.
2021-06-19 13:36:54 +00:00
google.protobuf.Any settings = 2;
2016-10-02 21:43:58 +00:00
}
message StreamConfig {
2018-08-06 11:48:35 +00:00
// Effective network. Deprecated. Use the string form below.
2020-10-29 07:30:38 +00:00
TransportProtocol protocol = 1 [ deprecated = true ];
2018-08-06 11:48:35 +00:00
2016-10-17 22:09:49 +00:00
// Effective network.
2018-08-06 11:48:35 +00:00
string protocol_name = 5;
2016-10-17 22:09:49 +00:00
repeated TransportConfig transport_settings = 2;
2016-10-17 22:09:49 +00:00
// Type of security. Must be a message name of the settings proto.
2016-10-16 12:22:21 +00:00
string security_type = 3;
2018-01-04 10:24:17 +00:00
// Settings for transport security. For now the only choice is TLS.
2021-06-19 13:36:54 +00:00
repeated google.protobuf.Any security_settings = 4;
2018-09-06 08:06:57 +00:00
SocketConfig socket_settings = 6;
2016-11-10 22:41:28 +00:00
}
message ProxyConfig {
string tag = 1;
bool transportLayerProxy = 2;
}
2018-09-06 08:06:57 +00:00
// SocketConfig is options to be applied on network sockets.
message SocketConfig {
// Mark of the connection. If non-zero, the value will be set to SO_MARK.
int32 mark = 1;
2018-09-10 11:23:27 +00:00
enum TCPFastOpenState {
// AsIs is to leave the current TFO state as is, unmodified.
AsIs = 0;
// Enable is for enabling TFO explictly.
Enable = 1;
// Disable is for disabling TFO explictly.
Disable = 2;
}
// TFO is the state of TFO settings.
TCPFastOpenState tfo = 2;
2018-09-14 09:05:42 +00:00
2018-09-17 13:12:58 +00:00
enum TProxyMode {
// TProxy is off.
Off = 0;
// TProxy mode.
TProxy = 1;
// Redirect mode.
Redirect = 2;
}
2018-09-14 09:05:42 +00:00
// TProxy is for enabling TProxy socket option.
2018-09-17 13:12:58 +00:00
TProxyMode tproxy = 3;
// ReceiveOriginalDestAddress is for enabling IP_RECVORIGDSTADDR socket
// option. This option is for UDP only.
2018-09-17 13:12:58 +00:00
bool receive_original_dest_address = 4;
bytes bind_address = 5;
uint32 bind_port = 6;
2020-10-29 07:30:38 +00:00
bool accept_proxy_protocol = 7;
int32 tcp_keep_alive_interval = 8;
2018-09-06 08:06:57 +00:00
}