config.proto 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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/destination.proto";
  10. import "v2ray.com/core/common/net/port.proto";
  11. import "v2ray.com/core/transport/internet/config.proto";
  12. message InboundConfig {
  13. }
  14. message AllocationStrategy {
  15. enum Type {
  16. // Always allocate all connection handlers.
  17. Always = 0;
  18. // Randomly allocate specific range of handlers.
  19. Random = 1;
  20. // External. Not supported yet.
  21. External = 2;
  22. }
  23. Type type = 1;
  24. message AllocationStrategyConcurrency {
  25. uint32 value = 1;
  26. }
  27. // Number of handlers (ports) running in parallel.
  28. // Default value is 3 if unset.
  29. AllocationStrategyConcurrency concurrency = 2;
  30. message AllocationStrategyRefresh {
  31. uint32 value = 1;
  32. }
  33. // Number of minutes before a handler is regenerated.
  34. // Default value is 5 if unset.
  35. AllocationStrategyRefresh refresh = 3;
  36. }
  37. message ReceiverConfig {
  38. v2ray.core.common.net.PortRange port_range = 1;
  39. v2ray.core.common.net.IPOrDomain listen = 2;
  40. AllocationStrategy allocation_strategy = 3;
  41. v2ray.core.transport.internet.StreamConfig stream_settings = 4;
  42. bool receive_original_destination = 5;
  43. bool allow_passive_connection = 6 [deprecated=true];
  44. }
  45. message InboundHandlerConfig {
  46. string tag = 1;
  47. v2ray.core.common.serial.TypedMessage receiver_settings = 2;
  48. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  49. }
  50. message OutboundConfig {
  51. }
  52. message SenderConfig {
  53. // Send traffic through the given IP. Only IP is allowed.
  54. v2ray.core.common.net.IPOrDomain via = 1;
  55. v2ray.core.transport.internet.StreamConfig stream_settings = 2;
  56. v2ray.core.transport.internet.ProxyConfig proxy_settings = 3;
  57. MultiplexingConfig multiplex_settings = 4;
  58. }
  59. message OutboundHandlerConfig {
  60. string tag = 1;
  61. v2ray.core.common.serial.TypedMessage sender_settings = 2;
  62. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  63. int64 expire = 4;
  64. string comment = 5;
  65. }
  66. message MultiplexingConfig {
  67. // Whether or not Mux is enabled.
  68. bool enabled = 1;
  69. // Max number of concurrent connections that one Mux connection can handle.
  70. uint32 concurrency = 2;
  71. }