github.com/xtls/xray-core@v1.8.12-0.20240518155711-3168d27b0bdb/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/xtls/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    HTTPUpgrade = 6;
    19  }
    20  
    21  enum DomainStrategy {
    22    AS_IS = 0;
    23    USE_IP = 1;
    24    USE_IP4 = 2;
    25    USE_IP6 = 3;
    26    USE_IP46 = 4;
    27    USE_IP64 = 5;
    28    FORCE_IP = 6;
    29    FORCE_IP4 = 7;
    30    FORCE_IP6 = 8;
    31    FORCE_IP46 = 9;
    32    FORCE_IP64 = 10;
    33  }
    34  
    35  message TransportConfig {
    36    // Type of network that this settings supports.
    37    // Deprecated. Use the string form below.
    38    TransportProtocol protocol = 1 [ deprecated = true ];
    39  
    40    // Type of network that this settings supports.
    41    string protocol_name = 3;
    42  
    43    // Specific settings. Must be of the transports.
    44    xray.common.serial.TypedMessage settings = 2;
    45  }
    46  
    47  message StreamConfig {
    48    // Effective network. Deprecated. Use the string form below.
    49    TransportProtocol protocol = 1 [ deprecated = true ];
    50  
    51    // Effective network.
    52    string protocol_name = 5;
    53  
    54    repeated TransportConfig transport_settings = 2;
    55  
    56    // Type of security. Must be a message name of the settings proto.
    57    string security_type = 3;
    58  
    59    // Settings for transport security. For now the only choice is TLS.
    60    repeated xray.common.serial.TypedMessage security_settings = 4;
    61  
    62    SocketConfig socket_settings = 6;
    63  }
    64  
    65  message ProxyConfig {
    66    string tag = 1;
    67    bool transportLayerProxy = 2;
    68  }
    69  
    70  // SocketConfig is options to be applied on network sockets.
    71  message SocketConfig {
    72    // Mark of the connection. If non-zero, the value will be set to SO_MARK.
    73    int32 mark = 1;
    74  
    75    // TFO is the state of TFO settings.
    76    int32 tfo = 2;
    77  
    78    enum TProxyMode {
    79      // TProxy is off.
    80      Off = 0;
    81      // TProxy mode.
    82      TProxy = 1;
    83      // Redirect mode.
    84      Redirect = 2;
    85    }
    86  
    87    // TProxy is for enabling TProxy socket option.
    88    TProxyMode tproxy = 3;
    89  
    90    // ReceiveOriginalDestAddress is for enabling IP_RECVORIGDSTADDR socket
    91    // option. This option is for UDP only.
    92    bool receive_original_dest_address = 4;
    93  
    94    bytes bind_address = 5;
    95  
    96    uint32 bind_port = 6;
    97  
    98    bool accept_proxy_protocol = 7;
    99  
   100    DomainStrategy domain_strategy = 8;
   101  
   102    string dialer_proxy = 9;
   103  
   104    int32 tcp_keep_alive_interval = 10;
   105  
   106    int32 tcp_keep_alive_idle = 11;
   107    
   108    string tcp_congestion = 12;
   109    
   110    string interface = 13;
   111  
   112    bool   v6only = 14;
   113  
   114    int32 tcp_window_clamp = 15;
   115  
   116    int32 tcp_user_timeout = 16;
   117  
   118    int32 tcp_max_seg = 17;
   119  
   120    bool tcp_no_delay = 18;
   121  
   122    bool tcp_mptcp = 19;
   123  }