1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-18 02:16:10 -05:00
v2fly/transport/internet/config.proto

107 lines
2.5 KiB
Protocol Buffer
Raw Normal View History

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";
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
import "google/protobuf/any.proto";
2016-10-02 17:43:58 -04: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;
}
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.
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
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;
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
}
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.
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;
// 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;
bytes bind_address = 5;
uint32 bind_port = 6;
2020-10-29 03:30:38 -04:00
bool accept_proxy_protocol = 7;
int32 tcp_keep_alive_interval = 8;
uint32 tfo_queue_length = 9;
2021-11-13 15:43:07 -05:00
int32 tcp_keep_alive_idle = 10;
string bind_to_device = 11;
2022-01-16 17:58:58 -05:00
int64 rx_buf_size = 12;
int64 tx_buf_size = 13;
bool force_buf_size = 14;
2018-09-06 04:06:57 -04:00
}