github.com/xraypb/Xray-core@v1.8.1/transport/internet/config.proto (about) 1 syntax = "proto3"; 2 3 package xray.transport.internet; 4 option csharp_namespace = "Xray.Transport.Internet"; 5 option go_package = "github.com/xraypb/Xray-core/transport/internet"; 6 option java_package = "com.xray.transport.internet"; 7 option java_multiple_files = true; 8 9 import "common/serial/typed_message.proto"; 10 11 enum TransportProtocol { 12 TCP = 0; 13 UDP = 1; 14 MKCP = 2; 15 WebSocket = 3; 16 HTTP = 4; 17 DomainSocket = 5; 18 } 19 20 enum DomainStrategy { 21 AS_IS = 0; 22 USE_IP = 1; 23 USE_IP4 = 2; 24 USE_IP6 = 3; 25 } 26 27 message TransportConfig { 28 // Type of network that this settings supports. 29 // Deprecated. Use the string form below. 30 TransportProtocol protocol = 1 [ deprecated = true ]; 31 32 // Type of network that this settings supports. 33 string protocol_name = 3; 34 35 // Specific settings. Must be of the transports. 36 xray.common.serial.TypedMessage settings = 2; 37 } 38 39 message StreamConfig { 40 // Effective network. Deprecated. Use the string form below. 41 TransportProtocol protocol = 1 [ deprecated = true ]; 42 43 // Effective network. 44 string protocol_name = 5; 45 46 repeated TransportConfig transport_settings = 2; 47 48 // Type of security. Must be a message name of the settings proto. 49 string security_type = 3; 50 51 // Settings for transport security. For now the only choice is TLS. 52 repeated xray.common.serial.TypedMessage security_settings = 4; 53 54 SocketConfig socket_settings = 6; 55 } 56 57 message ProxyConfig { 58 string tag = 1; 59 bool transportLayerProxy = 2; 60 } 61 62 // SocketConfig is options to be applied on network sockets. 63 message SocketConfig { 64 // Mark of the connection. If non-zero, the value will be set to SO_MARK. 65 int32 mark = 1; 66 67 // TFO is the state of TFO settings. 68 int32 tfo = 2; 69 70 enum TProxyMode { 71 // TProxy is off. 72 Off = 0; 73 // TProxy mode. 74 TProxy = 1; 75 // Redirect mode. 76 Redirect = 2; 77 } 78 79 // TProxy is for enabling TProxy socket option. 80 TProxyMode tproxy = 3; 81 82 // ReceiveOriginalDestAddress is for enabling IP_RECVORIGDSTADDR socket 83 // option. This option is for UDP only. 84 bool receive_original_dest_address = 4; 85 86 bytes bind_address = 5; 87 88 uint32 bind_port = 6; 89 90 bool accept_proxy_protocol = 7; 91 92 DomainStrategy domain_strategy = 8; 93 94 string dialer_proxy = 9; 95 96 int32 tcp_keep_alive_interval = 10; 97 98 int32 tcp_keep_alive_idle = 11; 99 100 string tcp_congestion = 12; 101 102 string interface = 13; 103 104 bool v6only = 14; 105 106 int32 tcp_window_clamp = 15; 107 }