config.proto 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. syntax = "proto3";
  2. package v2ray.core.app.proxyman;
  3. option csharp_namespace = "V2Ray.Core.App.Proxyman";
  4. option go_package = "github.com/v2fly/v2ray-core/v5/app/proxyman";
  5. option java_package = "com.v2ray.core.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 "google/protobuf/any.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 {
  23. uint32 value = 1;
  24. }
  25. // Number of handlers (ports) running in parallel.
  26. // Default value is 3 if unset.
  27. AllocationStrategyConcurrency concurrency = 2;
  28. message AllocationStrategyRefresh {
  29. uint32 value = 1;
  30. }
  31. // Number of minutes before a handler is regenerated.
  32. // Default value is 5 if unset.
  33. AllocationStrategyRefresh refresh = 3;
  34. }
  35. enum KnownProtocols {
  36. HTTP = 0;
  37. TLS = 1;
  38. }
  39. message SniffingConfig {
  40. // Whether or not to enable content sniffing on an inbound connection.
  41. bool enabled = 1;
  42. // Override target destination if sniff'ed protocol is in the given list.
  43. // Supported values are "http", "tls", "fakedns".
  44. repeated string destination_override = 2;
  45. // Whether should only try to sniff metadata without waiting for client input.
  46. // Can be used to support SMTP like protocol where server send the first message.
  47. bool metadata_only = 3;
  48. }
  49. message ReceiverConfig {
  50. // PortRange specifies the ports which the Receiver should listen on.
  51. v2ray.core.common.net.PortRange port_range = 1;
  52. // Listen specifies the IP address that the Receiver should listen on.
  53. v2ray.core.common.net.IPOrDomain listen = 2;
  54. AllocationStrategy allocation_strategy = 3;
  55. v2ray.core.transport.internet.StreamConfig stream_settings = 4;
  56. bool receive_original_destination = 5;
  57. reserved 6;
  58. // Override domains for the given protocol.
  59. // Deprecated. Use sniffing_settings.
  60. repeated KnownProtocols domain_override = 7 [deprecated = true];
  61. SniffingConfig sniffing_settings = 8;
  62. }
  63. message InboundHandlerConfig {
  64. string tag = 1;
  65. google.protobuf.Any receiver_settings = 2;
  66. google.protobuf.Any proxy_settings = 3;
  67. }
  68. message OutboundConfig {}
  69. message SenderConfig {
  70. enum DomainStrategy {
  71. AS_IS = 0;
  72. USE_IP = 1;
  73. USE_IP4 = 2;
  74. USE_IP6 = 3;
  75. }
  76. // Send traffic through the given IP. Only IP is allowed.
  77. v2ray.core.common.net.IPOrDomain via = 1;
  78. v2ray.core.transport.internet.StreamConfig stream_settings = 2;
  79. v2ray.core.transport.internet.ProxyConfig proxy_settings = 3;
  80. MultiplexingConfig multiplex_settings = 4;
  81. DomainStrategy domain_strategy = 5;
  82. }
  83. message MultiplexingConfig {
  84. // Whether or not Mux is enabled.
  85. bool enabled = 1;
  86. // Max number of concurrent connections that one Mux connection can handle.
  87. uint32 concurrency = 2;
  88. }