github.com/EagleQL/Xray-core@v1.4.3/app/proxyman/config.proto (about)

     1  syntax = "proto3";
     2  
     3  package xray.app.proxyman;
     4  option csharp_namespace = "Xray.App.Proxyman";
     5  option go_package = "github.com/xtls/xray-core/app/proxyman";
     6  option java_package = "com.xray.app.proxyman";
     7  option java_multiple_files = true;
     8  
     9  import "common/net/address.proto";
    10  import "common/net/port.proto";
    11  import "transport/internet/config.proto";
    12  import "common/serial/typed_message.proto";
    13  
    14  message InboundConfig {}
    15  
    16  message AllocationStrategy {
    17    enum Type {
    18      // Always allocate all connection handlers.
    19      Always = 0;
    20  
    21      // Randomly allocate specific range of handlers.
    22      Random = 1;
    23  
    24      // External. Not supported yet.
    25      External = 2;
    26    }
    27  
    28    Type type = 1;
    29  
    30    message AllocationStrategyConcurrency {
    31      uint32 value = 1;
    32    }
    33  
    34    // Number of handlers (ports) running in parallel.
    35    // Default value is 3 if unset.
    36    AllocationStrategyConcurrency concurrency = 2;
    37  
    38    message AllocationStrategyRefresh {
    39      uint32 value = 1;
    40    }
    41  
    42    // Number of minutes before a handler is regenerated.
    43    // Default value is 5 if unset.
    44    AllocationStrategyRefresh refresh = 3;
    45  }
    46  
    47  enum KnownProtocols {
    48    HTTP = 0;
    49    TLS = 1;
    50  }
    51  
    52  message SniffingConfig {
    53    // Whether or not to enable content sniffing on an inbound connection.
    54    bool enabled = 1;
    55  
    56    // Override target destination if sniff'ed protocol is in the given list.
    57    // Supported values are "http", "tls", "fakedns".
    58    repeated string destination_override = 2;
    59    repeated string domains_excluded = 3;
    60    
    61    // Whether should only try to sniff metadata without waiting for client input.
    62    // Can be used to support SMTP like protocol where server send the first message.
    63    bool metadata_only = 4;
    64  }
    65  
    66  message ReceiverConfig {
    67    // PortRange specifies the ports which the Receiver should listen on.
    68    xray.common.net.PortRange port_range = 1;
    69    // Listen specifies the IP address that the Receiver should listen on.
    70    xray.common.net.IPOrDomain listen = 2;
    71    AllocationStrategy allocation_strategy = 3;
    72    xray.transport.internet.StreamConfig stream_settings = 4;
    73    bool receive_original_destination = 5;
    74    reserved 6;
    75    // Override domains for the given protocol.
    76    // Deprecated. Use sniffing_settings.
    77    repeated KnownProtocols domain_override = 7 [deprecated = true];
    78    SniffingConfig sniffing_settings = 8;
    79  }
    80  
    81  message InboundHandlerConfig {
    82    string tag = 1;
    83    xray.common.serial.TypedMessage receiver_settings = 2;
    84    xray.common.serial.TypedMessage proxy_settings = 3;
    85  }
    86  
    87  message OutboundConfig {}
    88  
    89  message SenderConfig {
    90    // Send traffic through the given IP. Only IP is allowed.
    91    xray.common.net.IPOrDomain via = 1;
    92    xray.transport.internet.StreamConfig stream_settings = 2;
    93    xray.transport.internet.ProxyConfig proxy_settings = 3;
    94    MultiplexingConfig multiplex_settings = 4;
    95  }
    96  
    97  message MultiplexingConfig {
    98    // Whether or not Mux is enabled.
    99    bool enabled = 1;
   100    // Max number of concurrent connections that one Mux connection can handle.
   101    uint32 concurrency = 2;
   102  }