config.proto 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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/serial/typed_message.proto";
  8. import "v2ray.com/core/common/net/address.proto";
  9. import "v2ray.com/core/common/net/port.proto";
  10. import "v2ray.com/core/transport/internet/config.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 ReceiverConfig {
  41. v2ray.core.common.net.PortRange port_range = 1;
  42. v2ray.core.common.net.IPOrDomain listen = 2;
  43. AllocationStrategy allocation_strategy = 3;
  44. v2ray.core.transport.internet.StreamConfig stream_settings = 4;
  45. bool receive_original_destination = 5;
  46. reserved 6;
  47. repeated KnownProtocols domain_override = 7;
  48. }
  49. message InboundHandlerConfig {
  50. // Tag of the inbound handler.
  51. string tag = 1;
  52. // Settings for how this inbound proxy is handled. Must be ReceiverConfig above.
  53. v2ray.core.common.serial.TypedMessage receiver_settings = 2;
  54. // Settings for inbound proxy. Must be one of the inbound proxies.
  55. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  56. }
  57. message OutboundConfig {
  58. }
  59. message SenderConfig {
  60. // Send traffic through the given IP. Only IP is allowed.
  61. v2ray.core.common.net.IPOrDomain via = 1;
  62. v2ray.core.transport.internet.StreamConfig stream_settings = 2;
  63. v2ray.core.transport.internet.ProxyConfig proxy_settings = 3;
  64. MultiplexingConfig multiplex_settings = 4;
  65. }
  66. message OutboundHandlerConfig {
  67. // Tag of this outbound handler.
  68. string tag = 1;
  69. // Settings for how to dial connection for this outbound handler. Must be SenderConfig above.
  70. v2ray.core.common.serial.TypedMessage sender_settings = 2;
  71. // Settings for this outbound proxy. Must be one of the outbound proxies.
  72. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  73. // If not zero, this outbound will be expired in seconds. Not used for now.
  74. int64 expire = 4;
  75. // Comment of this outbound handler. Not used for now.
  76. string comment = 5;
  77. }
  78. message MultiplexingConfig {
  79. // Whether or not Mux is enabled.
  80. bool enabled = 1;
  81. // Max number of concurrent connections that one Mux connection can handle.
  82. uint32 concurrency = 2;
  83. }