config.proto 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 configuration. Must be one in the app directory.
  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. message InboundHandlerConfig {
  25. // Tag of the inbound handler.
  26. string tag = 1;
  27. // Settings for how this inbound proxy is handled. Must be ReceiverConfig above.
  28. v2ray.core.common.serial.TypedMessage receiver_settings = 2;
  29. // Settings for inbound proxy. Must be one of the inbound proxies.
  30. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  31. }
  32. message OutboundHandlerConfig {
  33. // Tag of this outbound handler.
  34. string tag = 1;
  35. // Settings for how to dial connection for this outbound handler. Must be SenderConfig above.
  36. v2ray.core.common.serial.TypedMessage sender_settings = 2;
  37. // Settings for this outbound proxy. Must be one of the outbound proxies.
  38. v2ray.core.common.serial.TypedMessage proxy_settings = 3;
  39. // If not zero, this outbound will be expired in seconds. Not used for now.
  40. int64 expire = 4;
  41. // Comment of this outbound handler. Not used for now.
  42. string comment = 5;
  43. }