config.proto 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. syntax = "proto3";
  2. package xray.core;
  3. option csharp_namespace = "Xray.Core";
  4. option go_package = "github.com/xtls/xray-core/core";
  5. option java_package = "com.xray.core";
  6. option java_multiple_files = true;
  7. import "common/serial/typed_message.proto";
  8. // Config is the master config of Xray. Xray takes this config as input and
  9. // 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
  14. // item is used as default for routing.
  15. repeated OutboundHandlerConfig outbound = 2;
  16. reserved 3;
  17. // App is for configurations of all features in Xray. A feature must
  18. // implement the Feature interface, and its config type must be registered
  19. // through common.RegisterConfig.
  20. repeated xray.common.serial.TypedMessage app = 4;
  21. // Configuration for extensions. The config may not work if corresponding
  22. // extension is not loaded into Xray. Xray will ignore such config during
  23. // initialization.
  24. repeated xray.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
  29. // handlers
  30. string tag = 1;
  31. // Settings for how this inbound proxy is handled.
  32. xray.common.serial.TypedMessage receiver_settings = 2;
  33. // Settings for inbound proxy. Must be one of the inbound proxies.
  34. xray.common.serial.TypedMessage proxy_settings = 3;
  35. }
  36. // OutboundHandlerConfig is the configuration for outbound handler.
  37. message OutboundHandlerConfig {
  38. // Tag of this outbound handler.
  39. string tag = 1;
  40. // Settings for how to dial connection for this outbound handler.
  41. xray.common.serial.TypedMessage sender_settings = 2;
  42. // Settings for this outbound proxy. Must be one of the outbound proxies.
  43. xray.common.serial.TypedMessage proxy_settings = 3;
  44. // If not zero, this outbound will be expired in seconds. Not used for now.
  45. int64 expire = 4;
  46. // Comment of this outbound handler. Not used for now.
  47. string comment = 5;
  48. }