config.proto 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. v2ray.core.transport.Config transport = 5;
  20. // Configuration for extensions. The config may not work if corresponding extension is not loaded into V2Ray.
  21. // V2Ray will ignore such config during initialization.
  22. repeated v2ray.core.common.serial.TypedMessage extension = 6;
  23. }
  24. // InboundHandlerConfig is the configuration for inbound handler.
  25. message InboundHandlerConfig {
  26. // Tag of the inbound handler. The tag must be unique among all inbound handlers
  27. string tag = 1;
  28. // Settings for how this inbound proxy is handled.
  29. v2ray.core.common.serial.TypedMessage receiver_settings = 2;
  30. // Settings for inbound proxy. Must be one of the inbound proxies.
  31. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  32. }
  33. // OutboundHandlerConfig is the configuration for outbound handler.
  34. message OutboundHandlerConfig {
  35. // Tag of this outbound handler.
  36. string tag = 1;
  37. // Settings for how to dial connection for this outbound handler.
  38. v2ray.core.common.serial.TypedMessage sender_settings = 2;
  39. // Settings for this outbound proxy. Must be one of the outbound proxies.
  40. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  41. // If not zero, this outbound will be expired in seconds. Not used for now.
  42. int64 expire = 4;
  43. // Comment of this outbound handler. Not used for now.
  44. string comment = 5;
  45. }