config.proto 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. syntax = "proto3";
  2. package v2ray.core;
  3. option go_package = "core";
  4. option java_package = "com.v2ray.core";
  5. option java_outer_classname = "ConfigProto";
  6. import "v2ray.com/core/app/router/config.proto";
  7. import "v2ray.com/core/app/dns/config.proto";
  8. import "v2ray.com/core/common/net/port.proto";
  9. import "v2ray.com/core/common/net/address.proto";
  10. import "v2ray.com/core/common/log/config.proto";
  11. import "v2ray.com/core/transport/internet/config.proto";
  12. import "v2ray.com/core/transport/config.proto";
  13. import "google/protobuf/any.proto";
  14. message AllocationStrategyConcurrency {
  15. uint32 value = 1;
  16. }
  17. message AllocationStrategyRefresh {
  18. uint32 value = 1;
  19. }
  20. message AllocationStrategy {
  21. enum Type {
  22. // Always allocate all connection handlers.
  23. Always = 0;
  24. // Randomly allocate specific range of handlers.
  25. Random = 1;
  26. // External. Not supported yet.
  27. External = 2;
  28. }
  29. Type type = 1;
  30. // Number of handlers (ports) running in parallel.
  31. AllocationStrategyConcurrency concurrency = 2;
  32. // Number of minutes before a handler is regenerated.
  33. AllocationStrategyRefresh refresh = 3;
  34. }
  35. // Config for an inbound connection handler.
  36. message InboundConnectionConfig {
  37. string protocol = 1;
  38. v2ray.core.common.net.PortRange port_range = 2;
  39. v2ray.core.common.net.IPOrDomain listen_on = 3;
  40. string tag = 4;
  41. AllocationStrategy allocation_strategy = 5;
  42. v2ray.core.transport.internet.StreamConfig stream_settings = 6;
  43. google.protobuf.Any settings = 7;
  44. bool allow_passive_connection = 8;
  45. }
  46. message OutboundConnectionConfig {
  47. string protocol = 1;
  48. v2ray.core.common.net.IPOrDomain send_through = 2;
  49. v2ray.core.transport.internet.StreamConfig stream_settings = 3;
  50. string tag = 4;
  51. google.protobuf.Any settings = 5;
  52. }
  53. message Config {
  54. repeated InboundConnectionConfig inbound = 1;
  55. repeated OutboundConnectionConfig outbound = 2;
  56. v2ray.core.common.log.Config log = 3;
  57. v2ray.core.app.router.Config router = 4;
  58. v2ray.core.app.dns.Config dns = 5;
  59. v2ray.core.transport.Config transport = 6;
  60. }