config.proto 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. // Transport settings.
  26. // Deprecated. Each inbound and outbound should choose their own transport
  27. // config. Date to remove: 2020-01-13
  28. // xray.transport.Config transport = 5 [deprecated = true];
  29. }
  30. // InboundHandlerConfig is the configuration for inbound handler.
  31. message InboundHandlerConfig {
  32. // Tag of the inbound handler. The tag must be unique among all inbound
  33. // handlers
  34. string tag = 1;
  35. // Settings for how this inbound proxy is handled.
  36. xray.common.serial.TypedMessage receiver_settings = 2;
  37. // Settings for inbound proxy. Must be one of the inbound proxies.
  38. xray.common.serial.TypedMessage proxy_settings = 3;
  39. }
  40. // OutboundHandlerConfig is the configuration for outbound handler.
  41. message OutboundHandlerConfig {
  42. // Tag of this outbound handler.
  43. string tag = 1;
  44. // Settings for how to dial connection for this outbound handler.
  45. xray.common.serial.TypedMessage sender_settings = 2;
  46. // Settings for this outbound proxy. Must be one of the outbound proxies.
  47. xray.common.serial.TypedMessage proxy_settings = 3;
  48. // If not zero, this outbound will be expired in seconds. Not used for now.
  49. int64 expire = 4;
  50. // Comment of this outbound handler. Not used for now.
  51. string comment = 5;
  52. }