config.proto 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. syntax = "proto3";
  2. package v2ray.core.app.receiver;
  3. option csharp_namespace = "V2Ray.Core.App.Receiver";
  4. option go_package = "receiver";
  5. option java_package = "com.v2ray.core.app.receiver";
  6. option java_outer_classname = "ConfigProto";
  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 AllocationStrategy {
  12. enum Type {
  13. // Always allocate all connection handlers.
  14. Always = 0;
  15. // Randomly allocate specific range of handlers.
  16. Random = 1;
  17. // External. Not supported yet.
  18. External = 2;
  19. }
  20. Type type = 1;
  21. message AllocationStrategyConcurrency {
  22. uint32 value = 1;
  23. }
  24. // Number of handlers (ports) running in parallel.
  25. // Default value is 3 if unset.
  26. AllocationStrategyConcurrency concurrency = 2;
  27. message AllocationStrategyRefresh {
  28. uint32 value = 1;
  29. }
  30. // Number of minutes before a handler is regenerated.
  31. // Default value is 5 if unset.
  32. AllocationStrategyRefresh refresh = 3;
  33. }
  34. message StreamReceiverConfig {
  35. v2ray.core.common.net.PortRange port_range = 1;
  36. v2ray.core.common.net.IPOrDomain listen = 2;
  37. AllocationStrategy allocation_strategy = 3;
  38. v2ray.core.transport.internet.StreamConfig stream_settings = 4;
  39. }
  40. message DatagramReceiverConfig {
  41. v2ray.core.common.net.PortRange port_range = 1;
  42. v2ray.core.common.net.IPOrDomain listen = 2;
  43. AllocationStrategy allocation_strategy = 3;
  44. }
  45. message PerProxyConfig {
  46. string tag = 1;
  47. repeated v2ray.core.common.serial.TypedMessage settings = 2;
  48. }
  49. message Config {
  50. repeated PerProxyConfig settings = 1;
  51. }