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