config.proto 2.7 KB

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