config.proto 3.2 KB

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