config.proto 2.4 KB

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