2016-10-02 23:43:58 +02:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package v2ray.core.transport.internet;
|
2016-12-23 00:24:28 +01:00
|
|
|
option csharp_namespace = "V2Ray.Core.Transport.Internet";
|
2022-01-02 15:16:23 +00:00
|
|
|
option go_package = "github.com/v2fly/v2ray-core/v5/transport/internet";
|
2016-10-02 23:43:58 +02:00
|
|
|
option java_package = "com.v2ray.core.transport.internet";
|
2017-02-03 23:15:10 +01:00
|
|
|
option java_multiple_files = true;
|
2016-10-02 23:43:58 +02:00
|
|
|
|
2021-06-23 14:34:03 +01:00
|
|
|
import "google/protobuf/any.proto";
|
2016-10-02 23:43:58 +02:00
|
|
|
|
2017-01-12 12:54:34 +01:00
|
|
|
enum TransportProtocol {
|
|
|
|
TCP = 0;
|
|
|
|
UDP = 1;
|
|
|
|
MKCP = 2;
|
|
|
|
WebSocket = 3;
|
2018-03-01 13:16:52 +01:00
|
|
|
HTTP = 4;
|
2018-04-09 17:09:24 +02:00
|
|
|
DomainSocket = 5;
|
2017-01-12 12:54:34 +01:00
|
|
|
}
|
|
|
|
|
2017-01-16 14:18:33 +01:00
|
|
|
message TransportConfig {
|
2016-10-18 00:09:49 +02:00
|
|
|
// Type of network that this settings supports.
|
2018-08-06 13:48:35 +02:00
|
|
|
// Deprecated. Use the string form below.
|
2020-11-20 15:18:44 +08:00
|
|
|
TransportProtocol protocol = 1 [ deprecated = true ];
|
2016-10-18 00:09:49 +02:00
|
|
|
|
2018-08-06 13:48:35 +02:00
|
|
|
// Type of network that this settings supports.
|
|
|
|
string protocol_name = 3;
|
|
|
|
|
2018-01-04 11:24:17 +01:00
|
|
|
// Specific settings. Must be of the transports.
|
2021-06-19 14:36:54 +01:00
|
|
|
google.protobuf.Any settings = 2;
|
2016-10-02 23:43:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
message StreamConfig {
|
2018-08-06 13:48:35 +02:00
|
|
|
// Effective network. Deprecated. Use the string form below.
|
2020-10-29 15:30:38 +08:00
|
|
|
TransportProtocol protocol = 1 [ deprecated = true ];
|
2018-08-06 13:48:35 +02:00
|
|
|
|
2016-10-18 00:09:49 +02:00
|
|
|
// Effective network.
|
2018-08-06 13:48:35 +02:00
|
|
|
string protocol_name = 5;
|
2016-10-18 00:09:49 +02:00
|
|
|
|
2017-01-16 14:18:33 +01:00
|
|
|
repeated TransportConfig transport_settings = 2;
|
2016-10-18 00:09:49 +02:00
|
|
|
|
|
|
|
// Type of security. Must be a message name of the settings proto.
|
2016-10-16 14:22:21 +02:00
|
|
|
string security_type = 3;
|
2020-10-05 08:36:40 +08:00
|
|
|
|
2018-01-04 11:24:17 +01:00
|
|
|
// Settings for transport security. For now the only choice is TLS.
|
2021-06-19 14:36:54 +01:00
|
|
|
repeated google.protobuf.Any security_settings = 4;
|
2018-09-06 10:06:57 +02:00
|
|
|
|
|
|
|
SocketConfig socket_settings = 6;
|
2016-11-10 23:41:28 +01:00
|
|
|
}
|
|
|
|
|
2021-02-28 17:50:45 +00:00
|
|
|
message ProxyConfig {
|
|
|
|
string tag = 1;
|
|
|
|
|
|
|
|
bool transportLayerProxy = 2;
|
|
|
|
}
|
2018-09-06 10:06:57 +02: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.
|
2021-09-10 16:18:26 +08:00
|
|
|
uint32 mark = 1;
|
2018-09-10 13:23:27 +02: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 11:05:42 +02:00
|
|
|
|
2018-09-17 15:12:58 +02:00
|
|
|
enum TProxyMode {
|
|
|
|
// TProxy is off.
|
|
|
|
Off = 0;
|
|
|
|
// TProxy mode.
|
|
|
|
TProxy = 1;
|
|
|
|
// Redirect mode.
|
|
|
|
Redirect = 2;
|
|
|
|
}
|
|
|
|
|
2018-09-14 11:05:42 +02:00
|
|
|
// TProxy is for enabling TProxy socket option.
|
2018-09-17 15:12:58 +02:00
|
|
|
TProxyMode tproxy = 3;
|
|
|
|
|
2020-10-05 08:36:40 +08:00
|
|
|
// ReceiveOriginalDestAddress is for enabling IP_RECVORIGDSTADDR socket
|
|
|
|
// option. This option is for UDP only.
|
2018-09-17 15:12:58 +02:00
|
|
|
bool receive_original_dest_address = 4;
|
2018-11-21 14:54:40 +01:00
|
|
|
|
|
|
|
bytes bind_address = 5;
|
|
|
|
|
|
|
|
uint32 bind_port = 6;
|
2020-10-29 15:30:38 +08:00
|
|
|
|
|
|
|
bool accept_proxy_protocol = 7;
|
2021-05-02 23:36:30 +04:30
|
|
|
|
2021-05-06 15:33:35 +01:00
|
|
|
int32 tcp_keep_alive_interval = 8;
|
2021-09-27 00:29:44 +08:00
|
|
|
|
|
|
|
uint32 tfo_queue_length = 9;
|
2021-11-13 20:43:07 +00:00
|
|
|
|
|
|
|
int32 tcp_keep_alive_idle = 10;
|
2022-01-16 21:45:31 +00:00
|
|
|
|
|
|
|
string bind_to_device = 11;
|
|
|
|
|
2022-01-16 22:58:58 +00:00
|
|
|
int64 rx_buf_size = 12;
|
|
|
|
int64 tx_buf_size = 13;
|
|
|
|
bool force_buf_size = 14;
|
2018-09-06 10:06:57 +02:00
|
|
|
}
|