2020-11-25 11:01:53 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package xray.transport.internet;
|
|
|
|
option csharp_namespace = "Xray.Transport.Internet";
|
2020-12-04 01:36:16 +00:00
|
|
|
option go_package = "github.com/xtls/xray-core/transport/internet";
|
2020-11-25 11:01:53 +00:00
|
|
|
option java_package = "com.xray.transport.internet";
|
|
|
|
option java_multiple_files = true;
|
|
|
|
|
|
|
|
import "common/serial/typed_message.proto";
|
2024-10-31 07:31:19 +00:00
|
|
|
import "common/net/address.proto";
|
2020-11-25 11:01:53 +00:00
|
|
|
|
2021-03-06 16:29:17 +00:00
|
|
|
enum DomainStrategy {
|
|
|
|
AS_IS = 0;
|
|
|
|
USE_IP = 1;
|
|
|
|
USE_IP4 = 2;
|
|
|
|
USE_IP6 = 3;
|
2023-11-12 21:37:02 +00:00
|
|
|
USE_IP46 = 4;
|
|
|
|
USE_IP64 = 5;
|
|
|
|
FORCE_IP = 6;
|
|
|
|
FORCE_IP4 = 7;
|
|
|
|
FORCE_IP6 = 8;
|
|
|
|
FORCE_IP46 = 9;
|
|
|
|
FORCE_IP64 = 10;
|
2021-03-06 16:29:17 +00:00
|
|
|
}
|
|
|
|
|
2020-11-25 11:01:53 +00:00
|
|
|
message TransportConfig {
|
2024-11-07 16:00:04 +00:00
|
|
|
// Transport protocol name.
|
2020-11-25 11:01:53 +00:00
|
|
|
string protocol_name = 3;
|
|
|
|
|
2024-11-07 16:00:04 +00:00
|
|
|
// Specific transport protocol settings.
|
2020-11-25 11:01:53 +00:00
|
|
|
xray.common.serial.TypedMessage settings = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message StreamConfig {
|
2024-10-31 07:31:19 +00:00
|
|
|
xray.common.net.IPOrDomain address = 8;
|
|
|
|
uint32 port = 9;
|
|
|
|
|
2020-11-25 11:01:53 +00:00
|
|
|
// Effective network.
|
|
|
|
string protocol_name = 5;
|
|
|
|
|
|
|
|
repeated TransportConfig transport_settings = 2;
|
|
|
|
|
|
|
|
// Type of security. Must be a message name of the settings proto.
|
|
|
|
string security_type = 3;
|
|
|
|
|
2024-11-07 16:00:04 +00:00
|
|
|
// Transport security settings. They can be either TLS or REALITY.
|
2020-11-25 11:01:53 +00:00
|
|
|
repeated xray.common.serial.TypedMessage security_settings = 4;
|
|
|
|
|
|
|
|
SocketConfig socket_settings = 6;
|
|
|
|
}
|
|
|
|
|
2021-03-06 16:29:17 +00:00
|
|
|
message ProxyConfig {
|
|
|
|
string tag = 1;
|
|
|
|
bool transportLayerProxy = 2;
|
|
|
|
}
|
2020-11-25 11:01:53 +00:00
|
|
|
|
2024-07-09 16:19:31 +00:00
|
|
|
message CustomSockopt {
|
|
|
|
string level = 1;
|
|
|
|
string opt = 2;
|
|
|
|
string value = 3;
|
|
|
|
string type = 4;
|
|
|
|
}
|
|
|
|
|
2020-11-25 11:01:53 +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;
|
|
|
|
|
|
|
|
// TFO is the state of TFO settings.
|
2021-03-06 14:45:12 +00:00
|
|
|
int32 tfo = 2;
|
2020-11-25 11:01:53 +00:00
|
|
|
|
|
|
|
enum TProxyMode {
|
|
|
|
// TProxy is off.
|
|
|
|
Off = 0;
|
|
|
|
// TProxy mode.
|
|
|
|
TProxy = 1;
|
|
|
|
// Redirect mode.
|
|
|
|
Redirect = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// TProxy is for enabling TProxy socket option.
|
|
|
|
TProxyMode tproxy = 3;
|
|
|
|
|
|
|
|
// ReceiveOriginalDestAddress is for enabling IP_RECVORIGDSTADDR socket
|
|
|
|
// option. This option is for UDP only.
|
|
|
|
bool receive_original_dest_address = 4;
|
|
|
|
|
|
|
|
bytes bind_address = 5;
|
|
|
|
|
|
|
|
uint32 bind_port = 6;
|
|
|
|
|
|
|
|
bool accept_proxy_protocol = 7;
|
2021-03-06 16:29:17 +00:00
|
|
|
|
|
|
|
DomainStrategy domain_strategy = 8;
|
2021-10-12 15:39:08 +00:00
|
|
|
|
2021-03-06 16:29:17 +00:00
|
|
|
string dialer_proxy = 9;
|
2021-10-12 15:39:08 +00:00
|
|
|
|
|
|
|
int32 tcp_keep_alive_interval = 10;
|
2022-07-31 13:55:40 +00:00
|
|
|
|
|
|
|
int32 tcp_keep_alive_idle = 11;
|
2022-10-10 17:13:50 +00:00
|
|
|
|
|
|
|
string tcp_congestion = 12;
|
2023-01-09 14:26:23 +00:00
|
|
|
|
|
|
|
string interface = 13;
|
2023-02-24 16:54:40 +00:00
|
|
|
|
|
|
|
bool v6only = 14;
|
2023-03-09 13:51:16 +00:00
|
|
|
|
|
|
|
int32 tcp_window_clamp = 15;
|
2023-03-12 09:44:41 +00:00
|
|
|
|
|
|
|
int32 tcp_user_timeout = 16;
|
2023-04-30 00:03:30 +00:00
|
|
|
|
|
|
|
int32 tcp_max_seg = 17;
|
2023-05-22 02:59:58 +00:00
|
|
|
|
|
|
|
bool tcp_no_delay = 18;
|
2023-09-07 17:32:27 +00:00
|
|
|
|
|
|
|
bool tcp_mptcp = 19;
|
2024-07-09 16:19:31 +00:00
|
|
|
|
|
|
|
repeated CustomSockopt customSockopt = 20;
|
2020-11-25 11:01:53 +00:00
|
|
|
}
|