config.proto 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. syntax = "proto3";
  2. package v2ray.core;
  3. option csharp_namespace = "V2Ray.Core";
  4. option go_package = "github.com/v2fly/v2ray-core/v5;core";
  5. option java_package = "com.v2ray.core";
  6. option java_multiple_files = true;
  7. import "google/protobuf/any.proto";
  8. import "transport/config.proto";
  9. // Config is the master config of V2Ray. V2Ray takes this config as input and
  10. // functions accordingly.
  11. message Config {
  12. // Inbound handler configurations. Must have at least one item.
  13. repeated InboundHandlerConfig inbound = 1;
  14. // Outbound handler configurations. Must have at least one item. The first
  15. // item is used as default for routing.
  16. repeated OutboundHandlerConfig outbound = 2;
  17. reserved 3;
  18. // App is for configurations of all features in V2Ray. A feature must
  19. // implement the Feature interface, and its config type must be registered
  20. // through common.RegisterConfig.
  21. repeated google.protobuf.Any app = 4;
  22. // Transport settings.
  23. // Deprecated. Each inbound and outbound should choose their own transport
  24. // config. Date to remove: 2020-01-13
  25. v2ray.core.transport.Config transport = 5 [deprecated = true];
  26. // Configuration for extensions. The config may not work if corresponding
  27. // extension is not loaded into V2Ray. V2Ray will ignore such config during
  28. // initialization.
  29. repeated google.protobuf.Any extension = 6;
  30. }
  31. // InboundHandlerConfig is the configuration for inbound handler.
  32. message InboundHandlerConfig {
  33. // Tag of the inbound handler. The tag must be unique among all inbound
  34. // handlers
  35. string tag = 1;
  36. // Settings for how this inbound proxy is handled.
  37. google.protobuf.Any receiver_settings = 2;
  38. // Settings for inbound proxy. Must be one of the inbound proxies.
  39. google.protobuf.Any proxy_settings = 3;
  40. }
  41. // OutboundHandlerConfig is the configuration for outbound handler.
  42. message OutboundHandlerConfig {
  43. // Tag of this outbound handler.
  44. string tag = 1;
  45. // Settings for how to dial connection for this outbound handler.
  46. google.protobuf.Any sender_settings = 2;
  47. // Settings for this outbound proxy. Must be one of the outbound proxies.
  48. google.protobuf.Any proxy_settings = 3;
  49. // If not zero, this outbound will be expired in seconds. Not used for now.
  50. int64 expire = 4;
  51. // Comment of this outbound handler. Not used for now.
  52. string comment = 5;
  53. }