config.proto 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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/transport/internet/domainsocket/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 UnixReceiverConfig {
  50. reserved 1;
  51. v2ray.core.internet.domainsocket.DomainSocketSettings domainSockSettings = 2;
  52. reserved 3;
  53. v2ray.core.transport.internet.StreamConfig stream_settings = 4;
  54. reserved 5,6;
  55. repeated KnownProtocols domain_override = 7;
  56. }
  57. message InboundHandlerConfig {
  58. string tag = 1;
  59. v2ray.core.common.serial.TypedMessage receiver_settings = 2;
  60. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  61. }
  62. message OutboundConfig {
  63. }
  64. message SenderConfig {
  65. // Send traffic through the given IP. Only IP is allowed.
  66. v2ray.core.common.net.IPOrDomain via = 1;
  67. v2ray.core.transport.internet.StreamConfig stream_settings = 2;
  68. v2ray.core.transport.internet.ProxyConfig proxy_settings = 3;
  69. MultiplexingConfig multiplex_settings = 4;
  70. }
  71. message MultiplexingConfig {
  72. // Whether or not Mux is enabled.
  73. bool enabled = 1;
  74. // Max number of concurrent connections that one Mux connection can handle.
  75. uint32 concurrency = 2;
  76. }